summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2019-04-16 22:35:26 +0200
committerNadrieril2019-04-16 22:35:26 +0200
commitc8db72fee29f6b7e3dc37873803ac0ac9eee9fdc (patch)
treec329972fc52bf04ce8d1b9d0fa2a33726ddf5203
parente5d40d38735afb4252d6f25ee8f834f9b097e0f7 (diff)
Update dhall-lang submodule
Diffstat (limited to '')
m---------dhall-lang0
-rw-r--r--dhall/src/normalize.rs1
-rw-r--r--dhall_core/src/parser.rs17
-rw-r--r--dhall_generated_parser/src/dhall.pest.visibility3
4 files changed, 14 insertions, 7 deletions
diff --git a/dhall-lang b/dhall-lang
-Subproject af74785a3fd8f7c5ae212af7557ef64b52407a5
+Subproject 1c8335d9362342c64d3b4ffaa2afac0eecdff20
diff --git a/dhall/src/normalize.rs b/dhall/src/normalize.rs
index 7f56669..2bbaf52 100644
--- a/dhall/src/normalize.rs
+++ b/dhall/src/normalize.rs
@@ -651,6 +651,7 @@ mod spec_tests {
// norm!(success_unit_RecursiveRecordTypeMergeNoCollision, "unit/RecursiveRecordTypeMergeNoCollision");
// norm!(success_unit_RecursiveRecordTypeMergeNormalizeArguments, "unit/RecursiveRecordTypeMergeNormalizeArguments");
// norm!(success_unit_RecursiveRecordTypeMergeRhsEmpty, "unit/RecursiveRecordTypeMergeRhsEmpty");
+ // norm!(success_unit_RecursiveRecordTypeMergeSorts, "unit/RecursiveRecordTypeMergeSorts");
// norm!(success_unit_RightBiasedRecordMergeCollision, "unit/RightBiasedRecordMergeCollision");
// norm!(success_unit_RightBiasedRecordMergeLhsEmpty, "unit/RightBiasedRecordMergeLhsEmpty");
// norm!(success_unit_RightBiasedRecordMergeNoCollision, "unit/RightBiasedRecordMergeNoCollision");
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)..] => {
diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_generated_parser/src/dhall.pest.visibility
index 4d8f3db..c3f7540 100644
--- a/dhall_generated_parser/src/dhall.pest.visibility
+++ b/dhall_generated_parser/src/dhall.pest.visibility
@@ -1,7 +1,7 @@
# end_of_line
# tab
# block_comment
-# block_comment_chunk
+# block_comment_char
# block_comment_continue
# not_end_of_line
# line_comment
@@ -118,6 +118,7 @@ times_expression
equal_expression
not_equal_expression
application_expression
+first_application_expression
# import_expression
selector_expression
selector