From c8db72fee29f6b7e3dc37873803ac0ac9eee9fdc Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 16 Apr 2019 22:35:26 +0200 Subject: Update dhall-lang submodule --- dhall-lang | 2 +- dhall/src/normalize.rs | 1 + dhall_core/src/parser.rs | 17 +++++++++++------ dhall_generated_parser/src/dhall.pest.visibility | 3 ++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dhall-lang b/dhall-lang index af74785..1c8335d 160000 --- a/dhall-lang +++ b/dhall-lang @@ -1 +1 @@ -Subproject commit af74785a3fd8f7c5ae212af7557ef64b52407a5f +Subproject commit 1c8335d9362342c64d3b4ffaa2afac0eecdff209 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> 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> 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> 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 -- cgit v1.2.3