From 617e8c2200546ddd3a4480d8c83cb8703f6595b3 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 13 Dec 2019 12:47:31 +0000 Subject: Derive Parser in dhall_syntax directly --- dhall_syntax/src/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dhall_syntax/src') 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(()) -- cgit v1.2.3