From cc03ada4e713f145f2eb1bbf0f131a4c5746cf74 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sat, 3 Aug 2019 22:55:51 +0200 Subject: Inline headers --- dhall_generated_parser/build.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'dhall_generated_parser') diff --git a/dhall_generated_parser/build.rs b/dhall_generated_parser/build.rs index eab48bf..744cb3d 100644 --- a/dhall_generated_parser/build.rs +++ b/dhall_generated_parser/build.rs @@ -26,6 +26,7 @@ fn main() -> std::io::Result<()> { rules.get_mut(&line[2..]).map(|x| x.silent = true); } } + rules.remove("http"); rules.remove("simple_label"); rules.remove("nonreserved_label"); @@ -41,6 +42,17 @@ fn main() -> std::io::Result<()> { | !keyword ~ simple_label_first_char ~ simple_label_next_char* }}" )?; + // TODO: this is a cheat; actually implement inline headers instead + writeln!( + &mut file, + "http = {{ + http_raw + ~ (whsp + ~ using + ~ whsp1 + ~ (import_hashed | ^\"(\" ~ whsp ~ import_hashed ~ whsp ~ ^\")\"))? + }}" + )?; writeln!( &mut file, "nonreserved_label = _{{ -- cgit v1.2.3