summaryrefslogtreecommitdiff
path: root/dhall_generated_parser
diff options
context:
space:
mode:
Diffstat (limited to 'dhall_generated_parser')
-rw-r--r--dhall_generated_parser/build.rs7
-rw-r--r--dhall_generated_parser/src/dhall.pest.visibility38
2 files changed, 42 insertions, 3 deletions
diff --git a/dhall_generated_parser/build.rs b/dhall_generated_parser/build.rs
index 615a55c..eab48bf 100644
--- a/dhall_generated_parser/build.rs
+++ b/dhall_generated_parser/build.rs
@@ -27,6 +27,7 @@ fn main() -> std::io::Result<()> {
}
}
rules.remove("simple_label");
+ rules.remove("nonreserved_label");
let mut file = File::create(pest_path)?;
writeln!(&mut file, "// AUTO-GENERATED FILE. See build.rs.")?;
@@ -42,6 +43,12 @@ fn main() -> std::io::Result<()> {
)?;
writeln!(
&mut file,
+ "nonreserved_label = _{{
+ !(builtin ~ !simple_label_next_char) ~ label
+ }}"
+ )?;
+ writeln!(
+ &mut file,
"final_expression = ${{ SOI ~ complete_expression ~ EOI }}"
)?;
diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_generated_parser/src/dhall.pest.visibility
index bb0210d..e9236d4 100644
--- a/dhall_generated_parser/src/dhall.pest.visibility
+++ b/dhall_generated_parser/src/dhall.pest.visibility
@@ -16,9 +16,9 @@
simple_label
# quoted_label_char
quoted_label
-# label
-nonreserved_label
-any_label
+label
+# nonreserved_label
+# any_label
double_quote_chunk
double_quote_escaped
double_quote_char
@@ -43,9 +43,40 @@ missing
NaN
Some_
# keyword
+builtin
Optional
Text
List
+# Bool
+# True
+# False
+# None_
+# Natural
+# Integer
+# Double
+# Type
+# Kind
+# Sort
+# Natural_fold
+# Natural_build
+# Natural_isZero
+# Natural_even
+# Natural_odd
+# Natural_toInteger
+# Natural_show
+# Integer_toDouble
+# Integer_show
+# Double_show
+# List_build
+# List_fold
+# List_length
+# List_head
+# List_last
+# List_indexed
+# List_reverse
+# Optional_fold
+# Optional_build
+# Text_show
# combine
# combine_types
# prefer
@@ -60,6 +91,7 @@ double_literal
natural_literal
integer_literal
identifier
+variable
# path_character
# quoted_path_character
unquoted_path_component