From 92ea98da2f89348c3dfdc7d49594a4d876d06ba2 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 18 Mar 2019 05:27:17 +0100 Subject: Split List literal between empty and non-empty --- dhall_generator/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'dhall_generator') 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); -- cgit v1.2.3