summaryrefslogtreecommitdiff
path: root/dhall_generator/src
diff options
context:
space:
mode:
Diffstat (limited to 'dhall_generator/src')
-rw-r--r--dhall_generator/src/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/dhall_generator/src/lib.rs b/dhall_generator/src/lib.rs
index 528f0ea..107144c 100644
--- a/dhall_generator/src/lib.rs
+++ b/dhall_generator/src/lib.rs
@@ -60,6 +60,9 @@ fn dhall_to_tokenstream(
let b = dhall_to_tokenstream_bx(b, ctx);
quote! { BinOp(#o, #a, #b) }
}
+ NaturalLit(n) => {
+ quote! { NaturalLit(#n) }
+ }
OptionalLit(t, e) => {
let t = option_to_tokenstream(t, ctx);
let e = option_to_tokenstream(e, ctx);
@@ -77,6 +80,10 @@ fn dhall_to_tokenstream(
let m = map_to_tokenstream(m, ctx);
quote! { Record(#m) }
}
+ RecordLit(m) => {
+ let m = map_to_tokenstream(m, ctx);
+ quote! { RecordLit(#m) }
+ }
e => unimplemented!("{:?}", e),
}
}
@@ -139,6 +146,7 @@ fn map_to_tokenstream(
})
.unzip();
quote! { {
+ use std::collections::BTreeMap;
let mut m = BTreeMap::new();
#( m.insert(#keys, #values); )*
m