diff options
author | Nadrieril | 2020-06-25 14:21:02 +0100 |
---|---|---|
committer | Nadrieril | 2020-06-25 15:12:09 +0100 |
commit | 8fd2fb4871335c72b9448da4a66144fd7f986f09 (patch) | |
tree | ce12cf2b725e89c5651e4e9ab2e17a8255e7f6d7 /dhall/src/syntax/text/parser.rs | |
parent | 812fb88102082493d1176aab7ee61b5339821492 (diff) |
spec!: remove the ability to quote paths in URLs
Diffstat (limited to '')
-rw-r--r-- | dhall/src/syntax/text/parser.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/dhall/src/syntax/text/parser.rs b/dhall/src/syntax/text/parser.rs index 1c51ca2..06c1ac3 100644 --- a/dhall/src/syntax/text/parser.rs +++ b/dhall/src/syntax/text/parser.rs @@ -514,14 +514,14 @@ impl DhallParser { fn http_raw(input: ParseInput) -> ParseResult<URL<Expr>> { Ok(match_nodes!(input.into_children(); - [scheme(sch), authority(auth), url_path(p)] => URL { + [scheme(sch), authority(auth), path_abempty(p)] => URL { scheme: sch, authority: auth, path: p, query: None, headers: None, }, - [scheme(sch), authority(auth), url_path(p), query(q)] => URL { + [scheme(sch), authority(auth), path_abempty(p), query(q)] => URL { scheme: sch, authority: auth, path: p, @@ -531,10 +531,10 @@ impl DhallParser { )) } - fn url_path(input: ParseInput) -> ParseResult<FilePath> { + fn path_abempty(input: ParseInput) -> ParseResult<FilePath> { Ok(match_nodes!(input.into_children(); - [path_component(components)..] => { - let mut file_path: Vec<_> = components.collect(); + [segment(segments)..] => { + let mut file_path: Vec<_> = segments.collect(); // An empty path normalizes to "/" if file_path.is_empty() { file_path = vec!["".to_owned()]; @@ -548,7 +548,6 @@ impl DhallParser { Ok(input.as_str().to_owned()) } - #[alias(path_component)] fn segment(input: ParseInput) -> ParseResult<String> { Ok(input.as_str().to_string()) } |