diff --git a/crates/codegen/parser/generator/src/precedence_parser_definition.rs b/crates/codegen/parser/generator/src/precedence_parser_definition.rs index 2f6699201b..83372fc65c 100644 --- a/crates/codegen/parser/generator/src/precedence_parser_definition.rs +++ b/crates/codegen/parser/generator/src/precedence_parser_definition.rs @@ -151,9 +151,8 @@ impl PrecedenceParserDefinitionNodeExtensions for PrecedenceParserDefinitionNode if !prefix_operator_parsers.is_empty() { let prefix_operator_parser = make_choice(prefix_operator_parsers); operator_closures.push(quote! { let prefix_operator_parser = |input: &mut ParserContext| #prefix_operator_parser; }); - binary_operand_terms.push( - quote! { ZeroOrMoreHelper::run(input, |input| prefix_operator_parser(input)) }, - ); + binary_operand_terms + .push(quote! { ZeroOrMoreHelper::run(input, prefix_operator_parser) }); } let primary_expression_parser = self.primary_expression.to_parser_code(context_name, false); @@ -163,9 +162,8 @@ impl PrecedenceParserDefinitionNodeExtensions for PrecedenceParserDefinitionNode if !postfix_operator_parsers.is_empty() { let postfix_operator_parser = make_choice(postfix_operator_parsers); operator_closures.push(quote! { let postfix_operator_parser = |input: &mut ParserContext| #postfix_operator_parser; }); - binary_operand_terms.push( - quote! { ZeroOrMoreHelper::run(input, |input| postfix_operator_parser(input)) }, - ); + binary_operand_terms + .push(quote! { ZeroOrMoreHelper::run(input, postfix_operator_parser) }); } let binary_operand_parser = make_sequence(binary_operand_terms); diff --git a/crates/solidity/outputs/cargo/crate/src/generated/language.rs b/crates/solidity/outputs/cargo/crate/src/generated/language.rs index 7297ea8dba..8e4cc3e291 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/language.rs +++ b/crates/solidity/outputs/cargo/crate/src/generated/language.rs @@ -3134,13 +3134,9 @@ impl Language { #[allow(unused_variables)] let binary_operand_parser = |input: &mut ParserContext| { SequenceHelper::run(|mut seq| { - seq.elem(ZeroOrMoreHelper::run(input, |input| { - prefix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, prefix_operator_parser))?; seq.elem(primary_expression_parser(input))?; - seq.elem(ZeroOrMoreHelper::run(input, |input| { - postfix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, postfix_operator_parser))?; seq.finish() }) }; @@ -5485,9 +5481,7 @@ impl Language { let linear_expression_parser = |input: &mut ParserContext| { SequenceHelper::run(|mut seq| { seq.elem(primary_expression_parser(input))?; - seq.elem(ZeroOrMoreHelper::run(input, |input| { - postfix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, postfix_operator_parser))?; seq.finish() }) }; @@ -6452,9 +6446,7 @@ impl Language { #[allow(unused_variables)] let binary_operand_parser = |input: &mut ParserContext| { SequenceHelper::run(|mut seq| { - seq.elem(ZeroOrMoreHelper::run(input, |input| { - prefix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, prefix_operator_parser))?; seq.elem(primary_expression_parser(input))?; seq.finish() }) @@ -6766,9 +6758,7 @@ impl Language { let linear_expression_parser = |input: &mut ParserContext| { SequenceHelper::run(|mut seq| { seq.elem(primary_expression_parser(input))?; - seq.elem(ZeroOrMoreHelper::run(input, |input| { - postfix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, postfix_operator_parser))?; seq.finish() }) }; diff --git a/crates/solidity/outputs/npm/crate/src/generated/language.rs b/crates/solidity/outputs/npm/crate/src/generated/language.rs index 7297ea8dba..8e4cc3e291 100644 --- a/crates/solidity/outputs/npm/crate/src/generated/language.rs +++ b/crates/solidity/outputs/npm/crate/src/generated/language.rs @@ -3134,13 +3134,9 @@ impl Language { #[allow(unused_variables)] let binary_operand_parser = |input: &mut ParserContext| { SequenceHelper::run(|mut seq| { - seq.elem(ZeroOrMoreHelper::run(input, |input| { - prefix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, prefix_operator_parser))?; seq.elem(primary_expression_parser(input))?; - seq.elem(ZeroOrMoreHelper::run(input, |input| { - postfix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, postfix_operator_parser))?; seq.finish() }) }; @@ -5485,9 +5481,7 @@ impl Language { let linear_expression_parser = |input: &mut ParserContext| { SequenceHelper::run(|mut seq| { seq.elem(primary_expression_parser(input))?; - seq.elem(ZeroOrMoreHelper::run(input, |input| { - postfix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, postfix_operator_parser))?; seq.finish() }) }; @@ -6452,9 +6446,7 @@ impl Language { #[allow(unused_variables)] let binary_operand_parser = |input: &mut ParserContext| { SequenceHelper::run(|mut seq| { - seq.elem(ZeroOrMoreHelper::run(input, |input| { - prefix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, prefix_operator_parser))?; seq.elem(primary_expression_parser(input))?; seq.finish() }) @@ -6766,9 +6758,7 @@ impl Language { let linear_expression_parser = |input: &mut ParserContext| { SequenceHelper::run(|mut seq| { seq.elem(primary_expression_parser(input))?; - seq.elem(ZeroOrMoreHelper::run(input, |input| { - postfix_operator_parser(input) - }))?; + seq.elem(ZeroOrMoreHelper::run(input, postfix_operator_parser))?; seq.finish() }) };