From 50f586844c096d98a7d5b07332a6a77dac4ec933 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 10 Sep 2019 17:34:59 +0200 Subject: Rename various bits of the pest_consume API --- pest_consume_macros/src/make_parser.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pest_consume_macros/src/make_parser.rs') diff --git a/pest_consume_macros/src/make_parser.rs b/pest_consume_macros/src/make_parser.rs index e8d861f..2ed3271 100644 --- a/pest_consume_macros/src/make_parser.rs +++ b/pest_consume_macros/src/make_parser.rs @@ -64,7 +64,7 @@ struct ParsedFn<'a> { function: &'a mut ImplItemMethod, // Name of the function. fn_name: Ident, - // Name of the first argument of the function, which should be of type `ParseInput`. + // Name of the first argument of the function, which should be of type `Node`. input_arg: Ident, // List of aliases pointing to this function alias_srcs: Vec, @@ -255,14 +255,14 @@ fn apply_special_attrs(f: &mut ParsedFn, rule_enum: &Path) -> Result<()> { .map(|src| &src.ident) .filter(|i| i != &fn_name); let block = &function.block; - let self_ty = quote!(); + let self_ty = quote!(); function.block = parse_quote!({ 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_ty::allows_shortcut(#input_arg.as_rule()) { if let Some(child) = #input_arg.single_child() { - if child.as_rule_alias::() == #self_ty::AliasedRule::#fn_name { + if child.as_aliased_rule::() == #self_ty::AliasedRule::#fn_name { #input_arg = child; continue; } @@ -375,7 +375,7 @@ pub fn make_parser( #(#aliased_rule_variants,)* } - impl #impl_generics ::pest_consume::PestConsumer for #ty #where_clause { + impl #impl_generics ::pest_consume::Parser for #ty #where_clause { type Rule = #rule_enum; type AliasedRule = AliasedRule; type Parser = #parser; -- cgit v1.2.3