diff options
Diffstat (limited to 'dhall_core/src/parser.rs')
-rw-r--r-- | dhall_core/src/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs index 02242bf..9cbd878 100644 --- a/dhall_core/src/parser.rs +++ b/dhall_core/src/parser.rs @@ -648,7 +648,7 @@ rule!(merge_expression<BoxExpr>; rule!(empty_collection<BoxExpr>; children!(x: str, y: expression) => { match x { - "Optional" => bx(Expr::OptionalLit(Some(y), vec![])), + "Optional" => bx(Expr::OptionalLit(Some(y), None)), "List" => bx(Expr::ListLit(Some(y), vec![])), _ => unreachable!(), } @@ -657,7 +657,7 @@ rule!(empty_collection<BoxExpr>; rule!(non_empty_optional<BoxExpr>; children!(x: expression, _y: str, z: expression) => { - bx(Expr::OptionalLit(Some(z), vec![*x])) + bx(Expr::OptionalLit(Some(z), Some(x))) } ); |