diff options
Diffstat (limited to 'dhall_syntax/src/parser.rs')
-rw-r--r-- | dhall_syntax/src/parser.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs index defa79b..24ecc1e 100644 --- a/dhall_syntax/src/parser.rs +++ b/dhall_syntax/src/parser.rs @@ -827,6 +827,7 @@ make_parser! { rule!(assert<()>); rule!(if_<()>); rule!(in_<()>); + rule!(toMap<()>); rule!(empty_list_literal<ParsedExpr>; span; children!( [application_expression(e)] => { @@ -863,6 +864,9 @@ make_parser! { [assert(()), expression(x)] => { spanned(span, Assert(x)) }, + [toMap(()), import_expression(x), application_expression(y)] => { + spanned(span, ToMap(x, Some(y))) + }, [operator_expression(e)] => e, [operator_expression(e), expression(annot)] => { spanned(span, Annot(e, annot)) @@ -934,7 +938,6 @@ make_parser! { )); rule!(Some_<()>); - rule!(toMap<()>); rule!(application_expression<ParsedExpr>; children!( [first_application_expression(e)] => e, @@ -951,6 +954,9 @@ make_parser! { [merge(()), import_expression(x), import_expression(y)] => { spanned(span, Merge(x, y, None)) }, + [toMap(()), import_expression(x)] => { + spanned(span, ToMap(x, None)) + }, [import_expression(e)] => e, )); |