summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dhall_generated_parser/build.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/dhall_generated_parser/build.rs b/dhall_generated_parser/build.rs
index 5275097..1edce9e 100644
--- a/dhall_generated_parser/build.rs
+++ b/dhall_generated_parser/build.rs
@@ -30,6 +30,7 @@ fn main() -> std::io::Result<()> {
rules.remove("url_path");
rules.remove("simple_label");
rules.remove("nonreserved_label");
+ rules.remove("first_application_expression");
let mut file = File::create(pest_path)?;
writeln!(&mut file, "// AUTO-GENERATED FILE. See build.rs.")?;
@@ -54,6 +55,16 @@ fn main() -> std::io::Result<()> {
~ (import_hashed | ^\"(\" ~ whsp ~ import_hashed ~ whsp ~ ^\")\"))?
}}"
)?;
+ // TODO: hack while waiting to catch up on commit e7fdf9d of the spec
+ writeln!(
+ &mut file,
+ "first_application_expression = {{
+ merge ~ whsp1 ~ import_expression ~ whsp1 ~ import_expression
+ | Some_ ~ whsp1 ~ import_expression
+ | toMap ~ whsp1 ~ import_expression
+ | import_expression
+ }}"
+ )?;
// TODO: this is a cheat; properly support RFC3986 URLs instead
writeln!(&mut file, "url_path = _{{ path }}")?;
writeln!(