From c2b4a2d9b40efbe4f6cb6fd04f6cb90639f4985f Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Sun, 12 May 2019 18:44:28 +0200 Subject: Implement binary encoding Closes #39 --- dhall_syntax/src/parser.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'dhall_syntax/src/parser.rs') diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs index c847b29..3e461df 100644 --- a/dhall_syntax/src/parser.rs +++ b/dhall_syntax/src/parser.rs @@ -2,7 +2,6 @@ use itertools::Itertools; use pest::iterators::Pair; use pest::Parser; use std::borrow::Cow; -use std::path::PathBuf; use std::rc::Rc; use dhall_generated_parser::{DhallParser, Rule}; @@ -557,24 +556,24 @@ make_parser! { }, [quoted_path_component(s)] => s.to_string(), )); - rule!(path; children!( + rule!(path>; children!( [path_component(components)..] => { components.collect() } )); - rule_group!(local<(FilePrefix, PathBuf)>); + rule_group!(local<(FilePrefix, Vec)>); - rule!(parent_path<(FilePrefix, PathBuf)> as local; children!( + rule!(parent_path<(FilePrefix, Vec)> as local; children!( [path(p)] => (FilePrefix::Parent, p) )); - rule!(here_path<(FilePrefix, PathBuf)> as local; children!( + rule!(here_path<(FilePrefix, Vec)> as local; children!( [path(p)] => (FilePrefix::Here, p) )); - rule!(home_path<(FilePrefix, PathBuf)> as local; children!( + rule!(home_path<(FilePrefix, Vec)> as local; children!( [path(p)] => (FilePrefix::Home, p) )); - rule!(absolute_path<(FilePrefix, PathBuf)> as local; children!( + rule!(absolute_path<(FilePrefix, Vec)> as local; children!( [path(p)] => (FilePrefix::Absolute, p) )); -- cgit v1.2.3