From a307a13738ccca538635ae796e6c998439025b9b Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 6 Aug 2019 22:43:40 +0200 Subject: Circumvent spec error --- dhall_generated_parser/build.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'dhall_generated_parser') 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!( -- cgit v1.2.3