summaryrefslogtreecommitdiff
path: root/dhall_syntax/src/parser.rs
diff options
context:
space:
mode:
authorNadrieril2019-05-12 18:44:28 +0200
committerNadrieril2019-05-12 18:44:44 +0200
commitc2b4a2d9b40efbe4f6cb6fd04f6cb90639f4985f (patch)
tree02e0f7b57b56f949240cedbdfabac234d9486834 /dhall_syntax/src/parser.rs
parent2d1a333d6c1e8571ca91d29333c284104153b0ef (diff)
Implement binary encoding
Closes #39
Diffstat (limited to '')
-rw-r--r--dhall_syntax/src/parser.rs13
1 files changed, 6 insertions, 7 deletions
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<PathBuf>; children!(
+ rule!(path<Vec<String>>; children!(
[path_component(components)..] => {
components.collect()
}
));
- rule_group!(local<(FilePrefix, PathBuf)>);
+ rule_group!(local<(FilePrefix, Vec<String>)>);
- rule!(parent_path<(FilePrefix, PathBuf)> as local; children!(
+ rule!(parent_path<(FilePrefix, Vec<String>)> as local; children!(
[path(p)] => (FilePrefix::Parent, p)
));
- rule!(here_path<(FilePrefix, PathBuf)> as local; children!(
+ rule!(here_path<(FilePrefix, Vec<String>)> as local; children!(
[path(p)] => (FilePrefix::Here, p)
));
- rule!(home_path<(FilePrefix, PathBuf)> as local; children!(
+ rule!(home_path<(FilePrefix, Vec<String>)> as local; children!(
[path(p)] => (FilePrefix::Home, p)
));
- rule!(absolute_path<(FilePrefix, PathBuf)> as local; children!(
+ rule!(absolute_path<(FilePrefix, Vec<String>)> as local; children!(
[path(p)] => (FilePrefix::Absolute, p)
));