diff options
author | Nadrieril | 2019-03-18 05:27:17 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-18 05:27:17 +0100 |
commit | 92ea98da2f89348c3dfdc7d49594a4d876d06ba2 (patch) | |
tree | 90de90c45a361538d50d875fa5543fbd4b6ad9d8 /dhall_generator/src | |
parent | 5c33165e95eb264fa9d305c097b183f6622aad03 (diff) |
Split List literal between empty and non-empty
Diffstat (limited to '')
-rw-r--r-- | dhall_generator/src/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dhall_generator/src/lib.rs b/dhall_generator/src/lib.rs index 9c0aacf..528f0ea 100644 --- a/dhall_generator/src/lib.rs +++ b/dhall_generator/src/lib.rs @@ -65,10 +65,13 @@ fn dhall_to_tokenstream( let e = option_to_tokenstream(e, ctx); quote! { OptionalLit(#t, #e) } } - ListLit(t, es) => { - let t = option_to_tokenstream(t, ctx); + EmptyListLit(t) => { + let t = dhall_to_tokenstream_bx(t, ctx); + quote! { EmptyListLit(#t) } + } + NEListLit(es) => { let es = vec_to_tokenstream(es, ctx); - quote! { ListLit(#t, #es) } + quote! { NEListLit(#es) } } Record(m) => { let m = map_to_tokenstream(m, ctx); |