From 3e157f0a05b0b93753ed377332597a37fa379541 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 6 Aug 2019 21:28:12 +0200 Subject: Add toMap keyword --- dhall-lang | 2 +- dhall/build.rs | 21 +++++++++++++++++++++ dhall_generated_parser/src/dhall.pest.visibility | 1 + dhall_syntax/src/parser.rs | 1 + 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/dhall-lang b/dhall-lang index 40c3e57..cd29db9 160000 --- a/dhall-lang +++ b/dhall-lang @@ -1 +1 @@ -Subproject commit 40c3e57a4f09448b5a7c9d203a81b64f50ed30bd +Subproject commit cd29db992660788fa5d75ccc465562fa3d96fcee diff --git a/dhall/build.rs b/dhall/build.rs index c78f8f9..2d75cbf 100644 --- a/dhall/build.rs +++ b/dhall/build.rs @@ -101,6 +101,8 @@ fn main() -> std::io::Result<()> { || path == "success/unit/import/urls/emptyPath1" || path == "success/unit/import/urls/emptyPathSegment" || path == "success/unit/import/urls/potPourri" + // TODO: toMap + || path == "success/toMap" }, )?; @@ -125,6 +127,8 @@ fn main() -> std::io::Result<()> { || path == "success/unit/import/urls/emptyPath0" || path == "success/unit/import/urls/emptyPath1" || path == "success/unit/import/urls/emptyPathSegment" + // TODO: toMap + || path == "success/toMap" }, )?; @@ -154,6 +158,9 @@ fn main() -> std::io::Result<()> { || path == "success/unit/import/urls/emptyPath0" || path == "success/unit/import/urls/emptyPath1" || path == "success/unit/import/urls/emptyPathSegment" + || path == "success/unit/import/urls/potPourri" + // TODO: toMap + || path == "success/toMap" }, )?; @@ -173,6 +180,10 @@ fn main() -> std::io::Result<()> { || path == "success/unit/RecordProjectionByTypeNormalizeProjection" // TODO: fix Double/show || path == "success/prelude/JSON/number/1" + // TODO: toMap + || path == "success/unit/EmptyToMap" + || path == "success/unit/ToMap" + || path == "success/unit/ToMapWithType" }, )?; @@ -197,6 +208,14 @@ fn main() -> std::io::Result<()> { // TODO: projection by expression || path == "failure/unit/RecordProjectionByTypeFieldTypeMismatch" || path == "failure/unit/RecordProjectionByTypeNotPresent" + // TODO: toMap + || path == "failure/unit/EmptyToMap" + || path == "failure/unit/HeterogenousToMap" + || path == "failure/unit/MistypedToMap1" + || path == "failure/unit/MistypedToMap2" + || path == "failure/unit/MistypedToMap3" + || path == "failure/unit/MistypedToMap4" + || path == "failure/unit/NonRecordToMap" }, )?; @@ -211,6 +230,8 @@ fn main() -> std::io::Result<()> { || path == "success/unit/RecordProjectionByType" || path == "success/unit/RecordProjectionByTypeEmpty" || path == "success/unit/RecordProjectionByTypeJudgmentalEquality" + // TODO: toMap + || path == "success/unit/ToMap" }, )?; diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_generated_parser/src/dhall.pest.visibility index 24d0a87..3142ad5 100644 --- a/dhall_generated_parser/src/dhall.pest.visibility +++ b/dhall_generated_parser/src/dhall.pest.visibility @@ -44,6 +44,7 @@ missing # Infinity NaN Some_ +toMap # keyword builtin Optional diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs index 2c0cee9..8355ebf 100644 --- a/dhall_syntax/src/parser.rs +++ b/dhall_syntax/src/parser.rs @@ -861,6 +861,7 @@ make_parser! { )); token_rule!(Some_<()>); + token_rule!(toMap<()>); rule!(application_expression as expression; children!( [expression(e)] => e, -- cgit v1.2.3