summaryrefslogtreecommitdiff
path: root/dhall_proc_macros/src/make_parser.rs
diff options
context:
space:
mode:
authorNadrieril2019-09-06 18:17:36 +0200
committerNadrieril2019-09-09 12:50:11 +0200
commit0388d9858627693bab2433f134eb4ed1d6e9b164 (patch)
tree6684345ef23870eee47bc737cd3b65ddc6fb579e /dhall_proc_macros/src/make_parser.rs
parent2f6f21c52e60c560eb4c5fff9441b7d20c8c1d9a (diff)
Make ParseInput independent from dhall-specific types
Diffstat (limited to 'dhall_proc_macros/src/make_parser.rs')
-rw-r--r--dhall_proc_macros/src/make_parser.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/dhall_proc_macros/src/make_parser.rs b/dhall_proc_macros/src/make_parser.rs
index a17ab61..c0594a5 100644
--- a/dhall_proc_macros/src/make_parser.rs
+++ b/dhall_proc_macros/src/make_parser.rs
@@ -179,7 +179,7 @@ fn apply_special_attrs(f: &mut ParsedFn, rule_enum: &Ident) -> Result<()> {
#function
#climber.climb(
- #input_arg.pair.clone().into_inner(),
+ #input_arg.as_pair().clone().into_inner(),
|p| Self::#child_rule(#input_arg.with_pair(p)),
|l, op, r| {
#fn_name(#input_arg.clone(), l?, op, r?)
@@ -207,9 +207,9 @@ fn apply_special_attrs(f: &mut ParsedFn, rule_enum: &Ident) -> Result<()> {
let mut #input_arg = #input_arg;
// While the current rule allows shortcutting, and there is a single child, and the
// child can still be parsed by the current function, then skip to that child.
- while <Self as PestConsumer>::allows_shortcut(#input_arg.as_rule()) {
+ while <Self as pest_consume::PestConsumer>::allows_shortcut(#input_arg.as_rule()) {
if let Some(child) = #input_arg.single_child() {
- if &<Self as PestConsumer>::rule_alias(child.as_rule())
+ if &<Self as pest_consume::PestConsumer>::rule_alias(child.as_rule())
== stringify!(#fn_name) {
#input_arg = child;
continue;
@@ -313,7 +313,7 @@ pub fn make_parser(
let ty = &imp.self_ty;
let (impl_generics, _, where_clause) = imp.generics.split_for_impl();
Ok(quote!(
- impl #impl_generics PestConsumer for #ty #where_clause {
+ impl #impl_generics pest_consume::PestConsumer for #ty #where_clause {
type Rule = #rule_enum;
fn rule_alias(rule: Self::Rule) -> String {
match rule {