summaryrefslogtreecommitdiff
path: root/dhall_generated_parser
diff options
context:
space:
mode:
authorNadrieril2019-08-06 22:43:40 +0200
committerNadrieril2019-08-06 22:43:40 +0200
commita307a13738ccca538635ae796e6c998439025b9b (patch)
treea86ab8e99aaacb72d44258aef9424c0e5c0748b2 /dhall_generated_parser
parent705433487da3cd3b4517fcf74b0497c76dbb4080 (diff)
Circumvent spec error
Diffstat (limited to 'dhall_generated_parser')
-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!(