diff options
author | Nadrieril | 2019-12-13 12:47:31 +0000 |
---|---|---|
committer | Nadrieril | 2019-12-13 12:47:31 +0000 |
commit | 617e8c2200546ddd3a4480d8c83cb8703f6595b3 (patch) | |
tree | 69f79ef4261b2f27e6d2e67b6d0d1e81f651a9d9 /dhall_syntax/src | |
parent | 3f00e4ca3fe22f88a1d0633e254df0bff781c6d3 (diff) |
Derive Parser in dhall_syntax directly
Diffstat (limited to 'dhall_syntax/src')
-rw-r--r-- | dhall_syntax/src/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs index f5d161f..3ea766f 100644 --- a/dhall_syntax/src/parser.rs +++ b/dhall_syntax/src/parser.rs @@ -3,8 +3,6 @@ use pest::prec_climber as pcl; use pest::prec_climber::PrecClimber; use std::rc::Rc; -use dgp::Rule; -use dhall_generated_parser as dgp; use pest_consume::{match_nodes, Parser}; use crate::map::{DupTreeMap, DupTreeSet}; @@ -147,9 +145,11 @@ lazy_static::lazy_static! { }; } +#[derive(Parser)] +#[grammar = "../../dhall_generated_parser/src/dhall.pest"] struct DhallParser; -#[pest_consume::parser(parser = dgp::DhallParser, rule = dgp::Rule)] +#[pest_consume::parser(parser = DhallParser, rule = Rule)] impl DhallParser { fn EOI(_input: ParseInput) -> ParseResult<()> { Ok(()) |