diff options
author | FintanH | 2019-08-12 22:34:21 +0100 |
---|---|---|
committer | FintanH | 2019-08-12 22:34:21 +0100 |
commit | 4a86274878d5ab0ef4f9d8597606226adfd048de (patch) | |
tree | 68153eb0e4283740f49042e059402da6eaaf551e /dhall_generated_parser/build.rs | |
parent | 405bc3d80c0e169ea74dd12422b9504b7383dab3 (diff) | |
parent | 7d17d39005531cb77d8eaf32ed7de8938c66f874 (diff) |
Merge remote-tracking branch 'origin/master' into fintan/canonicalize
Diffstat (limited to 'dhall_generated_parser/build.rs')
-rw-r--r-- | dhall_generated_parser/build.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dhall_generated_parser/build.rs b/dhall_generated_parser/build.rs index eab48bf..5275097 100644 --- a/dhall_generated_parser/build.rs +++ b/dhall_generated_parser/build.rs @@ -26,6 +26,8 @@ fn main() -> std::io::Result<()> { rules.get_mut(&line[2..]).map(|x| x.silent = true); } } + rules.remove("http"); + rules.remove("url_path"); rules.remove("simple_label"); rules.remove("nonreserved_label"); @@ -41,6 +43,19 @@ 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 ~ ^\")\"))? + }}" + )?; + // TODO: this is a cheat; properly support RFC3986 URLs instead + writeln!(&mut file, "url_path = _{{ path }}")?; writeln!( &mut file, "nonreserved_label = _{{ |