diff options
author | Nadrieril | 2019-09-10 17:34:59 +0200 |
---|---|---|
committer | Nadrieril | 2019-09-10 17:34:59 +0200 |
commit | 50f586844c096d98a7d5b07332a6a77dac4ec933 (patch) | |
tree | 959ce463b56dfb54e96cb8d6609cb44b50697c25 /pest_consume_macros/src/make_parser.rs | |
parent | 26f54b10314f90dc5457cd0760af7f109be78e5f (diff) |
Rename various bits of the pest_consume API
Diffstat (limited to 'pest_consume_macros/src/make_parser.rs')
-rw-r--r-- | pest_consume_macros/src/make_parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<AliasSrc>, @@ -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!(<Self as ::pest_consume::PestConsumer>); + let self_ty = quote!(<Self as ::pest_consume::Parser>); 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>() == #self_ty::AliasedRule::#fn_name { + if child.as_aliased_rule::<Self>() == #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; |