summaryrefslogtreecommitdiff
path: root/dhall_core
diff options
context:
space:
mode:
authorNadrieril2019-04-16 22:35:26 +0200
committerNadrieril2019-04-16 22:35:26 +0200
commitc8db72fee29f6b7e3dc37873803ac0ac9eee9fdc (patch)
treec329972fc52bf04ce8d1b9d0fa2a33726ddf5203 /dhall_core
parente5d40d38735afb4252d6f25ee8f834f9b097e0f7 (diff)
Update dhall-lang submodule
Diffstat (limited to 'dhall_core')
-rw-r--r--dhall_core/src/parser.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs
index c541283..016ad6a 100644
--- a/dhall_core/src/parser.rs
+++ b/dhall_core/src/parser.rs
@@ -292,6 +292,7 @@ fn can_be_shortcutted(rule: Rule) -> bool {
| equal_expression
| not_equal_expression
| application_expression
+ | first_application_expression
| selector_expression
| annotated_expression => true,
_ => false,
@@ -619,9 +620,6 @@ make_parser! {
[merge(()), expression(x), expression(y), expression(z)] => {
spanned(span, Merge(rc(x), rc(y), Some(rc(z))))
},
- [merge(()), expression(x), expression(y)] => {
- spanned(span, Merge(rc(x), rc(y), None))
- },
[expression(e)] => e,
));
@@ -747,14 +745,21 @@ make_parser! {
rule!(application_expression<ParsedExpr<'a>> as expression; span; children!(
[expression(e)] => e,
- [Some_(()), expression(e), expression(rest)..] => {
- spanned(span, app(NEOptionalLit(rc(e)), rest.map(rc).collect()))
- },
[expression(first), expression(rest)..] => {
spanned(span, app(first, rest.map(rc).collect()))
},
));
+ rule!(first_application_expression<ParsedExpr<'a>> as expression; span; children!(
+ [expression(e)] => e,
+ [Some_(()), expression(e)] => {
+ spanned(span, NEOptionalLit(rc(e)))
+ },
+ [merge(()), expression(x), expression(y)] => {
+ spanned(span, Merge(rc(x), rc(y), None))
+ },
+ ));
+
rule!(selector_expression<ParsedExpr<'a>> as expression; children!(
[expression(e)] => e,
[expression(first), selector(rest)..] => {