diff --git a/crates/ruff/src/checkers/ast/analyze/expression.rs b/crates/ruff/src/checkers/ast/analyze/expression.rs index 2335f08e95..8199464d7e 100644 --- a/crates/ruff/src/checkers/ast/analyze/expression.rs +++ b/crates/ruff/src/checkers/ast/analyze/expression.rs @@ -1256,7 +1256,7 @@ pub(crate) fn expression(expr: &Expr, checker: &mut Checker) { } Expr::Lambda( lambda @ ast::ExprLambda { - args: _, + parameters: _, body: _, range: _, }, diff --git a/crates/ruff/src/checkers/ast/analyze/mod.rs b/crates/ruff/src/checkers/ast/analyze/mod.rs index a8112e5dcf..ed623b1abf 100644 --- a/crates/ruff/src/checkers/ast/analyze/mod.rs +++ b/crates/ruff/src/checkers/ast/analyze/mod.rs @@ -1,5 +1,3 @@ -pub(super) use argument::argument; -pub(super) use arguments::arguments; pub(super) use bindings::bindings; pub(super) use comprehension::comprehension; pub(super) use deferred_for_loops::deferred_for_loops; @@ -8,12 +6,12 @@ pub(super) use definitions::definitions; pub(super) use except_handler::except_handler; pub(super) use expression::expression; pub(super) use module::module; +pub(super) use parameter::parameter; +pub(super) use parameters::parameters; pub(super) use statement::statement; pub(super) use suite::suite; pub(super) use unresolved_references::unresolved_references; -mod argument; -mod arguments; mod bindings; mod comprehension; mod deferred_for_loops; @@ -22,6 +20,8 @@ mod definitions; mod except_handler; mod expression; mod module; +mod parameter; +mod parameters; mod statement; mod suite; mod unresolved_references; diff --git a/crates/ruff/src/checkers/ast/analyze/argument.rs b/crates/ruff/src/checkers/ast/analyze/parameter.rs similarity index 64% rename from crates/ruff/src/checkers/ast/analyze/argument.rs rename to crates/ruff/src/checkers/ast/analyze/parameter.rs index 7b7da0daaf..7895b8103f 100644 --- a/crates/ruff/src/checkers/ast/analyze/argument.rs +++ b/crates/ruff/src/checkers/ast/analyze/parameter.rs @@ -1,27 +1,28 @@ -use ruff_python_ast::{Arg, Ranged}; +use ruff_python_ast::{Parameter, Ranged}; use crate::checkers::ast::Checker; use crate::codes::Rule; use crate::rules::{flake8_builtins, pep8_naming, pycodestyle}; -/// Run lint rules over an [`Arg`] syntax node. -pub(crate) fn argument(arg: &Arg, checker: &mut Checker) { +/// Run lint rules over a [`Parameter`] syntax node. +pub(crate) fn parameter(parameter: &Parameter, checker: &mut Checker) { if checker.enabled(Rule::AmbiguousVariableName) { - if let Some(diagnostic) = pycodestyle::rules::ambiguous_variable_name(&arg.arg, arg.range()) + if let Some(diagnostic) = + pycodestyle::rules::ambiguous_variable_name(¶meter.arg, parameter.range()) { checker.diagnostics.push(diagnostic); } } if checker.enabled(Rule::InvalidArgumentName) { if let Some(diagnostic) = pep8_naming::rules::invalid_argument_name( - &arg.arg, - arg, + ¶meter.arg, + parameter, &checker.settings.pep8_naming.ignore_names, ) { checker.diagnostics.push(diagnostic); } } if checker.enabled(Rule::BuiltinArgumentShadowing) { - flake8_builtins::rules::builtin_argument_shadowing(checker, arg); + flake8_builtins::rules::builtin_argument_shadowing(checker, parameter); } } diff --git a/crates/ruff/src/checkers/ast/analyze/arguments.rs b/crates/ruff/src/checkers/ast/analyze/parameters.rs similarity index 71% rename from crates/ruff/src/checkers/ast/analyze/arguments.rs rename to crates/ruff/src/checkers/ast/analyze/parameters.rs index 36bf02a7b8..9320947a45 100644 --- a/crates/ruff/src/checkers/ast/analyze/arguments.rs +++ b/crates/ruff/src/checkers/ast/analyze/parameters.rs @@ -1,26 +1,26 @@ -use ruff_python_ast::Arguments; +use ruff_python_ast::Parameters; use crate::checkers::ast::Checker; use crate::codes::Rule; use crate::rules::{flake8_bugbear, flake8_pyi, ruff}; -/// Run lint rules over a [`Arguments`] syntax node. -pub(crate) fn arguments(arguments: &Arguments, checker: &mut Checker) { +/// Run lint rules over a [`Parameters`] syntax node. +pub(crate) fn parameters(parameters: &Parameters, checker: &mut Checker) { if checker.enabled(Rule::MutableArgumentDefault) { - flake8_bugbear::rules::mutable_argument_default(checker, arguments); + flake8_bugbear::rules::mutable_argument_default(checker, parameters); } if checker.enabled(Rule::FunctionCallInDefaultArgument) { - flake8_bugbear::rules::function_call_in_argument_default(checker, arguments); + flake8_bugbear::rules::function_call_in_argument_default(checker, parameters); } if checker.settings.rules.enabled(Rule::ImplicitOptional) { - ruff::rules::implicit_optional(checker, arguments); + ruff::rules::implicit_optional(checker, parameters); } if checker.is_stub { if checker.enabled(Rule::TypedArgumentDefaultInStub) { - flake8_pyi::rules::typed_argument_simple_defaults(checker, arguments); + flake8_pyi::rules::typed_argument_simple_defaults(checker, parameters); } if checker.enabled(Rule::ArgumentDefaultInStub) { - flake8_pyi::rules::argument_simple_defaults(checker, arguments); + flake8_pyi::rules::argument_simple_defaults(checker, parameters); } } } diff --git a/crates/ruff/src/checkers/ast/analyze/statement.rs b/crates/ruff/src/checkers/ast/analyze/statement.rs index f294ac6c0e..6228e1a4ff 100644 --- a/crates/ruff/src/checkers/ast/analyze/statement.rs +++ b/crates/ruff/src/checkers/ast/analyze/statement.rs @@ -73,7 +73,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { name, decorator_list, returns, - args, + parameters, body, .. }) @@ -81,7 +81,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { name, decorator_list, returns, - args, + parameters, body, .. }) => { @@ -114,7 +114,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { checker.semantic.scope(), name, decorator_list, - args, + parameters, ) { checker.diagnostics.push(diagnostic); @@ -126,7 +126,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { checker.semantic.scope(), name, decorator_list, - args, + parameters, ) { checker.diagnostics.push(diagnostic); } @@ -142,7 +142,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { flake8_pyi::rules::stub_body_multiple_statements(checker, stmt, body); } if checker.enabled(Rule::AnyEqNeAnnotation) { - flake8_pyi::rules::any_eq_ne_annotation(checker, name, args); + flake8_pyi::rules::any_eq_ne_annotation(checker, name, parameters); } if checker.enabled(Rule::NonSelfReturnType) { flake8_pyi::rules::non_self_return_type( @@ -151,7 +151,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { name, decorator_list, returns.as_ref().map(AsRef::as_ref), - args, + parameters, stmt.is_async_function_def_stmt(), ); } @@ -159,18 +159,18 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { flake8_pyi::rules::str_or_repr_defined_in_stub(checker, stmt); } if checker.enabled(Rule::NoReturnArgumentAnnotationInStub) { - flake8_pyi::rules::no_return_argument_annotation(checker, args); + flake8_pyi::rules::no_return_argument_annotation(checker, parameters); } if checker.enabled(Rule::BadExitAnnotation) { flake8_pyi::rules::bad_exit_annotation( checker, stmt.is_async_function_def_stmt(), name, - args, + parameters, ); } if checker.enabled(Rule::RedundantNumericUnion) { - flake8_pyi::rules::redundant_numeric_union(checker, args); + flake8_pyi::rules::redundant_numeric_union(checker, parameters); } } if checker.enabled(Rule::DunderFunctionName) { @@ -230,13 +230,13 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { } } if checker.enabled(Rule::HardcodedPasswordDefault) { - flake8_bandit::rules::hardcoded_password_default(checker, args); + flake8_bandit::rules::hardcoded_password_default(checker, parameters); } if checker.enabled(Rule::PropertyWithParameters) { - pylint::rules::property_with_parameters(checker, stmt, decorator_list, args); + pylint::rules::property_with_parameters(checker, stmt, decorator_list, parameters); } if checker.enabled(Rule::TooManyArguments) { - pylint::rules::too_many_arguments(checker, args, stmt); + pylint::rules::too_many_arguments(checker, parameters, stmt); } if checker.enabled(Rule::TooManyReturnStatements) { if let Some(diagnostic) = pylint::rules::too_many_return_statements( @@ -282,7 +282,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { checker, stmt, name, - args, + parameters, decorator_list, body, ); @@ -304,7 +304,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { checker, name, decorator_list, - args, + parameters, ); } if checker.enabled(Rule::BooleanDefaultValueInFunctionDefinition) { @@ -312,7 +312,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { checker, name, decorator_list, - args, + parameters, ); } if checker.enabled(Rule::UnexpectedSpecialMethodSignature) { @@ -321,7 +321,7 @@ pub(crate) fn statement(stmt: &Stmt, checker: &mut Checker) { stmt, name, decorator_list, - args, + parameters, ); } if checker.enabled(Rule::FStringDocstring) { diff --git a/crates/ruff/src/checkers/ast/mod.rs b/crates/ruff/src/checkers/ast/mod.rs index 9add973a3b..4df1afb257 100644 --- a/crates/ruff/src/checkers/ast/mod.rs +++ b/crates/ruff/src/checkers/ast/mod.rs @@ -31,8 +31,8 @@ use std::path::Path; use itertools::Itertools; use log::error; use ruff_python_ast::{ - self as ast, Arg, ArgWithDefault, Arguments, Comprehension, Constant, ElifElseClause, - ExceptHandler, Expr, ExprContext, Keyword, Pattern, Ranged, Stmt, Suite, UnaryOp, + self as ast, Comprehension, Constant, ElifElseClause, ExceptHandler, Expr, ExprContext, + Keyword, Parameter, ParameterWithDefault, Parameters, Pattern, Ranged, Stmt, Suite, UnaryOp, }; use ruff_text_size::{TextRange, TextSize}; @@ -455,7 +455,7 @@ where match stmt { Stmt::FunctionDef(ast::StmtFunctionDef { body, - args, + parameters, decorator_list, returns, type_params, @@ -463,7 +463,7 @@ where }) | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { body, - args, + parameters, decorator_list, type_params, returns, @@ -485,24 +485,24 @@ where self.visit_type_param(type_param); } - for arg_with_default in args + for parameter_with_default in parameters .posonlyargs .iter() - .chain(&args.args) - .chain(&args.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) { - if let Some(expr) = &arg_with_default.def.annotation { + if let Some(expr) = ¶meter_with_default.def.annotation { if runtime_annotation { self.visit_runtime_annotation(expr); } else { self.visit_annotation(expr); }; } - if let Some(expr) = &arg_with_default.default { + if let Some(expr) = ¶meter_with_default.default { self.visit_expr(expr); } } - if let Some(arg) = &args.vararg { + if let Some(arg) = ¶meters.vararg { if let Some(expr) = &arg.annotation { if runtime_annotation { self.visit_runtime_annotation(expr); @@ -511,7 +511,7 @@ where }; } } - if let Some(arg) = &args.kwarg { + if let Some(arg) = ¶meters.kwarg { if let Some(expr) = &arg.annotation { if runtime_annotation { self.visit_runtime_annotation(expr); @@ -888,21 +888,21 @@ where } Expr::Lambda( lambda @ ast::ExprLambda { - args, + parameters, body: _, range: _, }, ) => { // Visit the default arguments, but avoid the body, which will be deferred. - for ArgWithDefault { + for ParameterWithDefault { default, def: _, range: _, - } in args + } in parameters .posonlyargs .iter() - .chain(&args.args) - .chain(&args.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) { if let Some(expr) = &default { self.visit_expr(expr); @@ -1293,43 +1293,43 @@ where } } - fn visit_arguments(&mut self, arguments: &'b Arguments) { + fn visit_parameters(&mut self, parameters: &'b Parameters) { // Step 1: Binding. // Bind, but intentionally avoid walking default expressions, as we handle them // upstream. - for arg_with_default in &arguments.posonlyargs { - self.visit_arg(&arg_with_default.def); + for parameter_with_default in ¶meters.posonlyargs { + self.visit_parameter(¶meter_with_default.def); } - for arg_with_default in &arguments.args { - self.visit_arg(&arg_with_default.def); + for parameter_with_default in ¶meters.args { + self.visit_parameter(¶meter_with_default.def); } - if let Some(arg) = &arguments.vararg { - self.visit_arg(arg); + if let Some(arg) = ¶meters.vararg { + self.visit_parameter(arg); } - for arg_with_default in &arguments.kwonlyargs { - self.visit_arg(&arg_with_default.def); + for parameter_with_default in ¶meters.kwonlyargs { + self.visit_parameter(¶meter_with_default.def); } - if let Some(arg) = &arguments.kwarg { - self.visit_arg(arg); + if let Some(arg) = ¶meters.kwarg { + self.visit_parameter(arg); } // Step 4: Analysis - analyze::arguments(arguments, self); + analyze::parameters(parameters, self); } - fn visit_arg(&mut self, arg: &'b Arg) { + fn visit_parameter(&mut self, parameter: &'b Parameter) { // Step 1: Binding. // Bind, but intentionally avoid walking the annotation, as we handle it // upstream. self.add_binding( - &arg.arg, - arg.identifier(), + ¶meter.arg, + parameter.identifier(), BindingKind::Argument, BindingFlags::empty(), ); // Step 4: Analysis - analyze::argument(arg, self); + analyze::parameter(parameter, self); } fn visit_pattern(&mut self, pattern: &'b Pattern) { @@ -1824,9 +1824,13 @@ impl<'a> Checker<'a> { self.semantic.restore(snapshot); match &self.semantic.stmt() { - Stmt::FunctionDef(ast::StmtFunctionDef { body, args, .. }) - | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { body, args, .. }) => { - self.visit_arguments(args); + Stmt::FunctionDef(ast::StmtFunctionDef { + body, parameters, .. + }) + | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { + body, parameters, .. + }) => { + self.visit_parameters(parameters); self.visit_body(body); } _ => { @@ -1846,12 +1850,12 @@ impl<'a> Checker<'a> { self.semantic.restore(snapshot); if let Expr::Lambda(ast::ExprLambda { - args, + parameters, body, range: _, }) = expr { - self.visit_arguments(args); + self.visit_parameters(parameters); self.visit_expr(body); } else { unreachable!("Expected Expr::Lambda"); diff --git a/crates/ruff/src/rules/flake8_annotations/helpers.rs b/crates/ruff/src/rules/flake8_annotations/helpers.rs index 4d265816a4..b1572efd82 100644 --- a/crates/ruff/src/rules/flake8_annotations/helpers.rs +++ b/crates/ruff/src/rules/flake8_annotations/helpers.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{self as ast, Arguments, Expr, Stmt}; +use ruff_python_ast::{self as ast, Expr, Parameters, Stmt}; use ruff_python_ast::cast; use ruff_python_semantic::analyze::visibility; @@ -6,11 +6,11 @@ use ruff_python_semantic::{Definition, Member, MemberKind, SemanticModel}; pub(super) fn match_function_def( stmt: &Stmt, -) -> (&str, &Arguments, Option<&Expr>, &[Stmt], &[ast::Decorator]) { +) -> (&str, &Parameters, Option<&Expr>, &[Stmt], &[ast::Decorator]) { match stmt { Stmt::FunctionDef(ast::StmtFunctionDef { name, - args, + parameters, returns, body, decorator_list, @@ -18,14 +18,14 @@ pub(super) fn match_function_def( }) | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { name, - args, + parameters, returns, body, decorator_list, .. }) => ( name, - args, + parameters, returns.as_ref().map(AsRef::as_ref), body, decorator_list, diff --git a/crates/ruff/src/rules/flake8_annotations/rules/definition.rs b/crates/ruff/src/rules/flake8_annotations/rules/definition.rs index 9e7f120f43..0688c6c265 100644 --- a/crates/ruff/src/rules/flake8_annotations/rules/definition.rs +++ b/crates/ruff/src/rules/flake8_annotations/rules/definition.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{self as ast, ArgWithDefault, Constant, Expr, Ranged, Stmt}; +use ruff_python_ast::{self as ast, Constant, Expr, ParameterWithDefault, Ranged, Stmt}; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Fix, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -524,7 +524,7 @@ pub(crate) fn definition( let is_overridden = visibility::is_override(decorator_list, checker.semantic()); // ANN001, ANN401 - for ArgWithDefault { + for ParameterWithDefault { def, default: _, range: _, @@ -627,7 +627,7 @@ pub(crate) fn definition( // ANN101, ANN102 if is_method && !visibility::is_staticmethod(cast::decorator_list(stmt), checker.semantic()) { - if let Some(ArgWithDefault { + if let Some(ParameterWithDefault { def, default: _, range: _, diff --git a/crates/ruff/src/rules/flake8_bandit/rules/hardcoded_password_default.rs b/crates/ruff/src/rules/flake8_bandit/rules/hardcoded_password_default.rs index 82b2bff33c..8f7983ccab 100644 --- a/crates/ruff/src/rules/flake8_bandit/rules/hardcoded_password_default.rs +++ b/crates/ruff/src/rules/flake8_bandit/rules/hardcoded_password_default.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{Arg, ArgWithDefault, Arguments, Expr, Ranged}; +use ruff_python_ast::{Expr, Parameter, ParameterWithDefault, Parameters, Ranged}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -53,9 +53,9 @@ impl Violation for HardcodedPasswordDefault { } } -fn check_password_kwarg(arg: &Arg, default: &Expr) -> Option { +fn check_password_kwarg(parameter: &Parameter, default: &Expr) -> Option { string_literal(default).filter(|string| !string.is_empty())?; - let kwarg_name = &arg.arg; + let kwarg_name = ¶meter.arg; if !matches_password_name(kwarg_name) { return None; } @@ -68,16 +68,16 @@ fn check_password_kwarg(arg: &Arg, default: &Expr) -> Option { } /// S107 -pub(crate) fn hardcoded_password_default(checker: &mut Checker, arguments: &Arguments) { - for ArgWithDefault { +pub(crate) fn hardcoded_password_default(checker: &mut Checker, parameters: &Parameters) { + for ParameterWithDefault { def, default, range: _, - } in arguments + } in parameters .posonlyargs .iter() - .chain(&arguments.args) - .chain(&arguments.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) { let Some(default) = default else { continue; diff --git a/crates/ruff/src/rules/flake8_boolean_trap/rules/check_boolean_default_value_in_function_definition.rs b/crates/ruff/src/rules/flake8_boolean_trap/rules/check_boolean_default_value_in_function_definition.rs index da488ac2e1..4d88bd5e69 100644 --- a/crates/ruff/src/rules/flake8_boolean_trap/rules/check_boolean_default_value_in_function_definition.rs +++ b/crates/ruff/src/rules/flake8_boolean_trap/rules/check_boolean_default_value_in_function_definition.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{ArgWithDefault, Arguments, Decorator}; +use ruff_python_ast::{Decorator, ParameterWithDefault, Parameters}; use ruff_diagnostics::Violation; use ruff_macros::{derive_message_formats, violation}; @@ -59,7 +59,7 @@ pub(crate) fn check_boolean_default_value_in_function_definition( checker: &mut Checker, name: &str, decorator_list: &[Decorator], - arguments: &Arguments, + parameters: &Parameters, ) { if is_allowed_func_def(name) { return; @@ -72,11 +72,11 @@ pub(crate) fn check_boolean_default_value_in_function_definition( return; } - for ArgWithDefault { + for ParameterWithDefault { def: _, default, range: _, - } in arguments.args.iter().chain(&arguments.posonlyargs) + } in parameters.args.iter().chain(¶meters.posonlyargs) { let Some(default) = default else { continue; diff --git a/crates/ruff/src/rules/flake8_boolean_trap/rules/check_positional_boolean_in_def.rs b/crates/ruff/src/rules/flake8_boolean_trap/rules/check_positional_boolean_in_def.rs index d9ab24af92..6a8825edeb 100644 --- a/crates/ruff/src/rules/flake8_boolean_trap/rules/check_positional_boolean_in_def.rs +++ b/crates/ruff/src/rules/flake8_boolean_trap/rules/check_positional_boolean_in_def.rs @@ -1,4 +1,6 @@ -use ruff_python_ast::{self as ast, ArgWithDefault, Arguments, Constant, Decorator, Expr, Ranged}; +use ruff_python_ast::{ + self as ast, Constant, Decorator, Expr, ParameterWithDefault, Parameters, Ranged, +}; use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Violation; @@ -80,7 +82,7 @@ pub(crate) fn check_positional_boolean_in_def( checker: &mut Checker, name: &str, decorator_list: &[Decorator], - arguments: &Arguments, + parameters: &Parameters, ) { if is_allowed_func_def(name) { return; @@ -93,11 +95,11 @@ pub(crate) fn check_positional_boolean_in_def( return; } - for ArgWithDefault { + for ParameterWithDefault { def, default: _, range: _, - } in arguments.posonlyargs.iter().chain(&arguments.args) + } in parameters.posonlyargs.iter().chain(¶meters.args) { if def.annotation.is_none() { continue; diff --git a/crates/ruff/src/rules/flake8_bugbear/rules/function_call_in_argument_default.rs b/crates/ruff/src/rules/flake8_bugbear/rules/function_call_in_argument_default.rs index 79949dd81e..cf0910f279 100644 --- a/crates/ruff/src/rules/flake8_bugbear/rules/function_call_in_argument_default.rs +++ b/crates/ruff/src/rules/flake8_bugbear/rules/function_call_in_argument_default.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{self as ast, ArgWithDefault, Arguments, Expr, Ranged}; +use ruff_python_ast::{self as ast, Expr, ParameterWithDefault, Parameters, Ranged}; use ruff_text_size::TextRange; use ruff_diagnostics::Violation; @@ -105,7 +105,7 @@ where } /// B008 -pub(crate) fn function_call_in_argument_default(checker: &mut Checker, arguments: &Arguments) { +pub(crate) fn function_call_in_argument_default(checker: &mut Checker, parameters: &Parameters) { // Map immutable calls to (module, member) format. let extend_immutable_calls: Vec = checker .settings @@ -116,15 +116,15 @@ pub(crate) fn function_call_in_argument_default(checker: &mut Checker, arguments .collect(); let diagnostics = { let mut visitor = ArgumentDefaultVisitor::new(checker.semantic(), extend_immutable_calls); - for ArgWithDefault { + for ParameterWithDefault { default, def: _, range: _, - } in arguments + } in parameters .posonlyargs .iter() - .chain(&arguments.args) - .chain(&arguments.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) { if let Some(expr) = &default { visitor.visit_expr(expr); diff --git a/crates/ruff/src/rules/flake8_bugbear/rules/function_uses_loop_variable.rs b/crates/ruff/src/rules/flake8_bugbear/rules/function_uses_loop_variable.rs index 25fd1e7360..38140b940a 100644 --- a/crates/ruff/src/rules/flake8_bugbear/rules/function_uses_loop_variable.rs +++ b/crates/ruff/src/rules/flake8_bugbear/rules/function_uses_loop_variable.rs @@ -86,8 +86,12 @@ struct SuspiciousVariablesVisitor<'a> { impl<'a> Visitor<'a> for SuspiciousVariablesVisitor<'a> { fn visit_stmt(&mut self, stmt: &'a Stmt) { match stmt { - Stmt::FunctionDef(ast::StmtFunctionDef { args, body, .. }) - | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { args, body, .. }) => { + Stmt::FunctionDef(ast::StmtFunctionDef { + parameters, body, .. + }) + | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { + parameters, body, .. + }) => { // Collect all loaded variable names. let mut visitor = LoadedNamesVisitor::default(); visitor.visit_body(body); @@ -99,7 +103,7 @@ impl<'a> Visitor<'a> for SuspiciousVariablesVisitor<'a> { return false; } - if includes_arg_name(&loaded.id, args) { + if includes_arg_name(&loaded.id, parameters) { return false; } @@ -165,7 +169,7 @@ impl<'a> Visitor<'a> for SuspiciousVariablesVisitor<'a> { } } Expr::Lambda(ast::ExprLambda { - args, + parameters, body, range: _, }) => { @@ -181,7 +185,7 @@ impl<'a> Visitor<'a> for SuspiciousVariablesVisitor<'a> { return false; } - if includes_arg_name(&loaded.id, args) { + if includes_arg_name(&loaded.id, parameters) { return false; } diff --git a/crates/ruff/src/rules/flake8_bugbear/rules/loop_variable_overrides_iterator.rs b/crates/ruff/src/rules/flake8_bugbear/rules/loop_variable_overrides_iterator.rs index e26f4284ff..d426808fb9 100644 --- a/crates/ruff/src/rules/flake8_bugbear/rules/loop_variable_overrides_iterator.rs +++ b/crates/ruff/src/rules/flake8_bugbear/rules/loop_variable_overrides_iterator.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{self as ast, ArgWithDefault, Expr, Ranged}; +use ruff_python_ast::{self as ast, Expr, ParameterWithDefault, Ranged}; use rustc_hash::FxHashMap; use ruff_diagnostics::{Diagnostic, Violation}; @@ -71,20 +71,20 @@ where } } Expr::Lambda(ast::ExprLambda { - args, + parameters, body, range: _, }) => { visitor::walk_expr(self, body); - for ArgWithDefault { + for ParameterWithDefault { def, default: _, range: _, - } in args + } in parameters .posonlyargs .iter() - .chain(&args.args) - .chain(&args.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) { self.names.remove(def.arg.as_str()); } diff --git a/crates/ruff/src/rules/flake8_bugbear/rules/mutable_argument_default.rs b/crates/ruff/src/rules/flake8_bugbear/rules/mutable_argument_default.rs index 62e307bc24..f5a38f38f6 100644 --- a/crates/ruff/src/rules/flake8_bugbear/rules/mutable_argument_default.rs +++ b/crates/ruff/src/rules/flake8_bugbear/rules/mutable_argument_default.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{ArgWithDefault, Arguments, Ranged}; +use ruff_python_ast::{ParameterWithDefault, Parameters, Ranged}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -57,17 +57,17 @@ impl Violation for MutableArgumentDefault { } /// B006 -pub(crate) fn mutable_argument_default(checker: &mut Checker, arguments: &Arguments) { +pub(crate) fn mutable_argument_default(checker: &mut Checker, parameters: &Parameters) { // Scan in reverse order to right-align zip(). - for ArgWithDefault { + for ParameterWithDefault { def, default, range: _, - } in arguments + } in parameters .posonlyargs .iter() - .chain(&arguments.args) - .chain(&arguments.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) { let Some(default) = default else { continue; diff --git a/crates/ruff/src/rules/flake8_builtins/rules/builtin_argument_shadowing.rs b/crates/ruff/src/rules/flake8_builtins/rules/builtin_argument_shadowing.rs index 064e5a4807..8b3a5ddec7 100644 --- a/crates/ruff/src/rules/flake8_builtins/rules/builtin_argument_shadowing.rs +++ b/crates/ruff/src/rules/flake8_builtins/rules/builtin_argument_shadowing.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{Arg, Ranged}; +use ruff_python_ast::{Parameter, Ranged}; use ruff_diagnostics::Diagnostic; use ruff_diagnostics::Violation; @@ -62,16 +62,16 @@ impl Violation for BuiltinArgumentShadowing { } /// A002 -pub(crate) fn builtin_argument_shadowing(checker: &mut Checker, argument: &Arg) { +pub(crate) fn builtin_argument_shadowing(checker: &mut Checker, parameter: &Parameter) { if shadows_builtin( - argument.arg.as_str(), + parameter.arg.as_str(), &checker.settings.flake8_builtins.builtins_ignorelist, ) { checker.diagnostics.push(Diagnostic::new( BuiltinArgumentShadowing { - name: argument.arg.to_string(), + name: parameter.arg.to_string(), }, - argument.range(), + parameter.range(), )); } } diff --git a/crates/ruff/src/rules/flake8_comprehensions/rules/unnecessary_map.rs b/crates/ruff/src/rules/flake8_comprehensions/rules/unnecessary_map.rs index d6a6e6b9e4..b3b06592fe 100644 --- a/crates/ruff/src/rules/flake8_comprehensions/rules/unnecessary_map.rs +++ b/crates/ruff/src/rules/flake8_comprehensions/rules/unnecessary_map.rs @@ -1,6 +1,6 @@ use std::fmt; -use ruff_python_ast::{self as ast, Arguments, Expr, ExprContext, Ranged, Stmt}; +use ruff_python_ast::{self as ast, Expr, ExprContext, Parameters, Ranged, Stmt}; use ruff_diagnostics::{AutofixKind, Violation}; use ruff_diagnostics::{Diagnostic, Fix}; @@ -98,11 +98,14 @@ pub(crate) fn unnecessary_map( }; // Only flag, e.g., `map(lambda x: x + 1, iterable)`. - let [Expr::Lambda(ast::ExprLambda { args, body, .. }), _] = args else { + let [Expr::Lambda(ast::ExprLambda { + parameters, body, .. + }), _] = args + else { return; }; - if late_binding(args, body) { + if late_binding(parameters, body) { return; } } @@ -121,11 +124,14 @@ pub(crate) fn unnecessary_map( return; }; - let Expr::Lambda(ast::ExprLambda { args, body, .. }) = argument else { + let Expr::Lambda(ast::ExprLambda { + parameters, body, .. + }) = argument + else { return; }; - if late_binding(args, body) { + if late_binding(parameters, body) { return; } } @@ -140,7 +146,10 @@ pub(crate) fn unnecessary_map( return; }; - let Expr::Lambda(ast::ExprLambda { args, body, .. }) = argument else { + let Expr::Lambda(ast::ExprLambda { + parameters, body, .. + }) = argument + else { return; }; @@ -154,7 +163,7 @@ pub(crate) fn unnecessary_map( return; } - if late_binding(args, body) { + if late_binding(parameters, body) { return; } } @@ -195,7 +204,7 @@ impl fmt::Display for ObjectType { } } -/// Returns `true` if the lambda defined by the given arguments and body contains any names that +/// Returns `true` if the lambda defined by the given parameters and body contains any names that /// are late-bound within nested lambdas. /// /// For example, given: @@ -212,8 +221,8 @@ impl fmt::Display for ObjectType { /// /// Would yield an incorrect result, as the `x` in the inner lambda would be bound to the last /// value of `x` in the comprehension. -fn late_binding(args: &Arguments, body: &Expr) -> bool { - let mut visitor = LateBindingVisitor::new(args); +fn late_binding(parameters: &Parameters, body: &Expr) -> bool { + let mut visitor = LateBindingVisitor::new(parameters); visitor.visit_expr(body); visitor.late_bound } @@ -221,17 +230,17 @@ fn late_binding(args: &Arguments, body: &Expr) -> bool { #[derive(Debug)] struct LateBindingVisitor<'a> { /// The arguments to the current lambda. - args: &'a Arguments, + parameters: &'a Parameters, /// The arguments to any lambdas within the current lambda body. - lambdas: Vec<&'a Arguments>, + lambdas: Vec<&'a Parameters>, /// Whether any names within the current lambda body are late-bound within nested lambdas. late_bound: bool, } impl<'a> LateBindingVisitor<'a> { - fn new(args: &'a Arguments) -> Self { + fn new(parameters: &'a Parameters) -> Self { Self { - args, + parameters, lambdas: Vec::new(), late_bound: false, } @@ -243,8 +252,8 @@ impl<'a> Visitor<'a> for LateBindingVisitor<'a> { fn visit_expr(&mut self, expr: &'a Expr) { match expr { - Expr::Lambda(ast::ExprLambda { args, .. }) => { - self.lambdas.push(args); + Expr::Lambda(ast::ExprLambda { parameters, .. }) => { + self.lambdas.push(parameters); visitor::walk_expr(self, expr); self.lambdas.pop(); } @@ -256,7 +265,7 @@ impl<'a> Visitor<'a> for LateBindingVisitor<'a> { // If we're within a nested lambda... if !self.lambdas.is_empty() { // If the name is defined in the current lambda... - if includes_arg_name(id, self.args) { + if includes_arg_name(id, self.parameters) { // And isn't overridden by any nested lambdas... if !self.lambdas.iter().any(|args| includes_arg_name(id, args)) { // Then it's late-bound. diff --git a/crates/ruff/src/rules/flake8_pie/rules/reimplemented_list_builtin.rs b/crates/ruff/src/rules/flake8_pie/rules/reimplemented_list_builtin.rs index fc1348672e..18dd2d6e76 100644 --- a/crates/ruff/src/rules/flake8_pie/rules/reimplemented_list_builtin.rs +++ b/crates/ruff/src/rules/flake8_pie/rules/reimplemented_list_builtin.rs @@ -54,16 +54,16 @@ impl Violation for ReimplementedListBuiltin { /// PIE807 pub(crate) fn reimplemented_list_builtin(checker: &mut Checker, expr: &ExprLambda) { let ExprLambda { - args, + parameters, body, range: _, } = expr; - if args.args.is_empty() - && args.kwonlyargs.is_empty() - && args.posonlyargs.is_empty() - && args.vararg.is_none() - && args.kwarg.is_none() + if parameters.args.is_empty() + && parameters.kwonlyargs.is_empty() + && parameters.posonlyargs.is_empty() + && parameters.vararg.is_none() + && parameters.kwarg.is_none() { if let Expr::List(ast::ExprList { elts, .. }) = body.as_ref() { if elts.is_empty() { diff --git a/crates/ruff/src/rules/flake8_pyi/rules/any_eq_ne_annotation.rs b/crates/ruff/src/rules/flake8_pyi/rules/any_eq_ne_annotation.rs index 4ceb91ccc4..155470003c 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/any_eq_ne_annotation.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/any_eq_ne_annotation.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{Arguments, Ranged}; +use ruff_python_ast::{Parameters, Ranged}; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix}; use ruff_macros::{derive_message_formats, violation}; @@ -53,16 +53,16 @@ impl AlwaysAutofixableViolation for AnyEqNeAnnotation { } /// PYI032 -pub(crate) fn any_eq_ne_annotation(checker: &mut Checker, name: &str, args: &Arguments) { +pub(crate) fn any_eq_ne_annotation(checker: &mut Checker, name: &str, parameters: &Parameters) { if !matches!(name, "__eq__" | "__ne__") { return; } - if args.args.len() != 2 { + if parameters.args.len() != 2 { return; } - let Some(annotation) = &args.args[1].def.annotation else { + let Some(annotation) = ¶meters.args[1].def.annotation else { return; }; diff --git a/crates/ruff/src/rules/flake8_pyi/rules/exit_annotations.rs b/crates/ruff/src/rules/flake8_pyi/rules/exit_annotations.rs index 2bcd01b34c..0d20d604ca 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/exit_annotations.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/exit_annotations.rs @@ -1,8 +1,8 @@ use std::fmt::{Display, Formatter}; use ruff_python_ast::{ - ArgWithDefault, Arguments, Expr, ExprBinOp, ExprSubscript, ExprTuple, Identifier, Operator, - Ranged, + Expr, ExprBinOp, ExprSubscript, ExprTuple, Identifier, Operator, ParameterWithDefault, + Parameters, Ranged, }; use smallvec::SmallVec; @@ -104,7 +104,7 @@ pub(crate) fn bad_exit_annotation( checker: &mut Checker, is_async: bool, name: &Identifier, - args: &Arguments, + parameters: &Parameters, ) { let func_kind = match name.as_str() { "__exit__" if !is_async => FuncKind::Sync, @@ -112,41 +112,45 @@ pub(crate) fn bad_exit_annotation( _ => return, }; - let positional_args = args + let positional_args = parameters .args .iter() - .chain(args.posonlyargs.iter()) - .collect::>(); + .chain(parameters.posonlyargs.iter()) + .collect::>(); // If there are less than three positional arguments, at least one of them must be a star-arg, // and it must be annotated with `object`. if positional_args.len() < 4 { - check_short_args_list(checker, args, func_kind); + check_short_args_list(checker, parameters, func_kind); } // Every positional argument (beyond the first four) must have a default. - for arg_with_default in positional_args + for parameter in positional_args .iter() .skip(4) - .filter(|arg_with_default| arg_with_default.default.is_none()) + .filter(|parameter| parameter.default.is_none()) { checker.diagnostics.push(Diagnostic::new( BadExitAnnotation { func_kind, error_kind: ErrorKind::ArgsAfterFirstFourMustHaveDefault, }, - arg_with_default.range(), + parameter.range(), )); } // ...as should all keyword-only arguments. - for arg_with_default in args.kwonlyargs.iter().filter(|arg| arg.default.is_none()) { + for parameter in parameters + .kwonlyargs + .iter() + .filter(|arg| arg.default.is_none()) + { checker.diagnostics.push(Diagnostic::new( BadExitAnnotation { func_kind, error_kind: ErrorKind::AllKwargsMustHaveDefault, }, - arg_with_default.range(), + parameter.range(), )); } @@ -155,8 +159,8 @@ pub(crate) fn bad_exit_annotation( /// Determine whether a "short" argument list (i.e., an argument list with less than four elements) /// contains a star-args argument annotated with `object`. If not, report an error. -fn check_short_args_list(checker: &mut Checker, args: &Arguments, func_kind: FuncKind) { - if let Some(varargs) = &args.vararg { +fn check_short_args_list(checker: &mut Checker, parameters: &Parameters, func_kind: FuncKind) { + if let Some(varargs) = ¶meters.vararg { if let Some(annotation) = varargs .annotation .as_ref() @@ -187,7 +191,7 @@ fn check_short_args_list(checker: &mut Checker, args: &Arguments, func_kind: Fun func_kind, error_kind: ErrorKind::MissingArgs, }, - args.range(), + parameters.range(), )); } } @@ -196,7 +200,7 @@ fn check_short_args_list(checker: &mut Checker, args: &Arguments, func_kind: Fun /// annotated correctly. fn check_positional_args( checker: &mut Checker, - positional_args: &[&ArgWithDefault], + positional_args: &[&ParameterWithDefault], kind: FuncKind, ) { // For each argument, define the predicate against which to check the annotation. diff --git a/crates/ruff/src/rules/flake8_pyi/rules/no_return_argument_annotation.rs b/crates/ruff/src/rules/flake8_pyi/rules/no_return_argument_annotation.rs index e4cafdbbcd..cf5632574b 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/no_return_argument_annotation.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/no_return_argument_annotation.rs @@ -4,7 +4,7 @@ use ruff_python_ast::Ranged; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; -use ruff_python_ast::Arguments; +use ruff_python_ast::Parameters; use crate::checkers::ast::Checker; use crate::settings::types::PythonVersion::Py311; @@ -47,12 +47,12 @@ impl Violation for NoReturnArgumentAnnotationInStub { } /// PYI050 -pub(crate) fn no_return_argument_annotation(checker: &mut Checker, args: &Arguments) { - for annotation in args +pub(crate) fn no_return_argument_annotation(checker: &mut Checker, parameters: &Parameters) { + for annotation in parameters .posonlyargs .iter() - .chain(&args.args) - .chain(&args.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) .filter_map(|arg| arg.def.annotation.as_ref()) { if checker.semantic().match_typing_expr(annotation, "NoReturn") { diff --git a/crates/ruff/src/rules/flake8_pyi/rules/non_self_return_type.rs b/crates/ruff/src/rules/flake8_pyi/rules/non_self_return_type.rs index 1ab4f73f27..b356067717 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/non_self_return_type.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/non_self_return_type.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{self as ast, Arguments, Decorator, Expr, Stmt}; +use ruff_python_ast::{self as ast, Decorator, Expr, Parameters, Stmt}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -116,14 +116,14 @@ pub(crate) fn non_self_return_type( name: &str, decorator_list: &[Decorator], returns: Option<&Expr>, - args: &Arguments, + parameters: &Parameters, async_: bool, ) { let ScopeKind::Class(class_def) = checker.semantic().scope().kind else { return; }; - if args.args.is_empty() && args.posonlyargs.is_empty() { + if parameters.args.is_empty() && parameters.posonlyargs.is_empty() { return; } diff --git a/crates/ruff/src/rules/flake8_pyi/rules/redundant_numeric_union.rs b/crates/ruff/src/rules/flake8_pyi/rules/redundant_numeric_union.rs index d16f7928a5..8583f68dd8 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/redundant_numeric_union.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/redundant_numeric_union.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{Arguments, Expr, Ranged}; +use ruff_python_ast::{Expr, Parameters, Ranged}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -53,12 +53,12 @@ impl Violation for RedundantNumericUnion { } /// PYI041 -pub(crate) fn redundant_numeric_union(checker: &mut Checker, args: &Arguments) { - for annotation in args +pub(crate) fn redundant_numeric_union(checker: &mut Checker, parameters: &Parameters) { + for annotation in parameters .args .iter() - .chain(args.posonlyargs.iter()) - .chain(args.kwonlyargs.iter()) + .chain(parameters.posonlyargs.iter()) + .chain(parameters.kwonlyargs.iter()) .filter_map(|arg| arg.def.annotation.as_ref()) { check_annotation(checker, annotation); @@ -67,10 +67,10 @@ pub(crate) fn redundant_numeric_union(checker: &mut Checker, args: &Arguments) { // If annotations on `args` or `kwargs` are flagged by this rule, the annotations themselves // are not accurate, but check them anyway. It's possible that flagging them will help the user // realize they're incorrect. - for annotation in args + for annotation in parameters .vararg .iter() - .chain(args.kwarg.iter()) + .chain(parameters.kwarg.iter()) .filter_map(|arg| arg.annotation.as_ref()) { check_annotation(checker, annotation); diff --git a/crates/ruff/src/rules/flake8_pyi/rules/simple_defaults.rs b/crates/ruff/src/rules/flake8_pyi/rules/simple_defaults.rs index f43e46eca1..c71ca5b7d8 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/simple_defaults.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/simple_defaults.rs @@ -1,5 +1,5 @@ use ruff_python_ast::{ - self as ast, ArgWithDefault, Arguments, Constant, Expr, Operator, Ranged, Stmt, UnaryOp, + self as ast, Constant, Expr, Operator, ParameterWithDefault, Parameters, Ranged, Stmt, UnaryOp, }; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix, Violation}; @@ -400,16 +400,16 @@ fn is_annotatable_type_alias(value: &Expr, semantic: &SemanticModel) -> bool { } /// PYI011 -pub(crate) fn typed_argument_simple_defaults(checker: &mut Checker, arguments: &Arguments) { - for ArgWithDefault { +pub(crate) fn typed_argument_simple_defaults(checker: &mut Checker, parameters: &Parameters) { + for ParameterWithDefault { def, default, range: _, - } in arguments + } in parameters .posonlyargs .iter() - .chain(&arguments.args) - .chain(&arguments.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) { let Some(default) = default else { continue; @@ -437,16 +437,16 @@ pub(crate) fn typed_argument_simple_defaults(checker: &mut Checker, arguments: & } /// PYI014 -pub(crate) fn argument_simple_defaults(checker: &mut Checker, arguments: &Arguments) { - for ArgWithDefault { +pub(crate) fn argument_simple_defaults(checker: &mut Checker, parameters: &Parameters) { + for ParameterWithDefault { def, default, range: _, - } in arguments + } in parameters .posonlyargs .iter() - .chain(&arguments.args) - .chain(&arguments.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) { let Some(default) = default else { continue; diff --git a/crates/ruff/src/rules/flake8_pyi/rules/str_or_repr_defined_in_stub.rs b/crates/ruff/src/rules/flake8_pyi/rules/str_or_repr_defined_in_stub.rs index 58035705f4..e220359c91 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/str_or_repr_defined_in_stub.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/str_or_repr_defined_in_stub.rs @@ -48,7 +48,7 @@ pub(crate) fn str_or_repr_defined_in_stub(checker: &mut Checker, stmt: &Stmt) { name, decorator_list, returns, - args, + parameters, .. }) = stmt else { @@ -69,7 +69,9 @@ pub(crate) fn str_or_repr_defined_in_stub(checker: &mut Checker, stmt: &Stmt) { // It is a violation only if the method signature matches that of `object.__str__` // or `object.__repr__` exactly and the method is not decorated as abstract. - if !args.kwonlyargs.is_empty() || (args.args.len() + args.posonlyargs.len()) > 1 { + if !parameters.kwonlyargs.is_empty() + || (parameters.args.len() + parameters.posonlyargs.len()) > 1 + { return; } diff --git a/crates/ruff/src/rules/flake8_pytest_style/rules/fixture.rs b/crates/ruff/src/rules/flake8_pytest_style/rules/fixture.rs index 3ec312c1a4..db399bad73 100644 --- a/crates/ruff/src/rules/flake8_pytest_style/rules/fixture.rs +++ b/crates/ruff/src/rules/flake8_pytest_style/rules/fixture.rs @@ -1,7 +1,7 @@ use std::fmt; use ruff_python_ast::Decorator; -use ruff_python_ast::{self as ast, ArgWithDefault, Arguments, Expr, Ranged, Stmt}; +use ruff_python_ast::{self as ast, Expr, ParameterWithDefault, Parameters, Ranged, Stmt}; use ruff_text_size::{TextLen, TextRange}; use ruff_diagnostics::{AlwaysAutofixableViolation, Violation}; @@ -607,14 +607,14 @@ fn check_fixture_returns(checker: &mut Checker, stmt: &Stmt, name: &str, body: & } /// PT019 -fn check_test_function_args(checker: &mut Checker, arguments: &Arguments) { - arguments +fn check_test_function_args(checker: &mut Checker, parameters: &Parameters) { + parameters .posonlyargs .iter() - .chain(&arguments.args) - .chain(&arguments.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) .for_each( - |ArgWithDefault { + |ParameterWithDefault { def, default: _, range: _, @@ -643,8 +643,8 @@ fn check_fixture_decorator_name(checker: &mut Checker, decorator: &Decorator) { } /// PT021 -fn check_fixture_addfinalizer(checker: &mut Checker, args: &Arguments, body: &[Stmt]) { - if !includes_arg_name("request", args) { +fn check_fixture_addfinalizer(checker: &mut Checker, parameters: &Parameters, body: &[Stmt]) { + if !includes_arg_name("request", parameters) { return; } @@ -696,7 +696,7 @@ pub(crate) fn fixture( checker: &mut Checker, stmt: &Stmt, name: &str, - args: &Arguments, + parameters: &Parameters, decorators: &[Decorator], body: &[Stmt], ) { @@ -724,7 +724,7 @@ pub(crate) fn fixture( } if checker.enabled(Rule::PytestFixtureFinalizerCallback) { - check_fixture_addfinalizer(checker, args, body); + check_fixture_addfinalizer(checker, parameters, body); } if checker.enabled(Rule::PytestUnnecessaryAsyncioMarkOnFixture) @@ -735,6 +735,6 @@ pub(crate) fn fixture( } if checker.enabled(Rule::PytestFixtureParamWithoutValue) && name.starts_with("test_") { - check_test_function_args(checker, args); + check_test_function_args(checker, parameters); } } diff --git a/crates/ruff/src/rules/flake8_pytest_style/rules/patch.rs b/crates/ruff/src/rules/flake8_pytest_style/rules/patch.rs index 637f675b75..e8453ed1b3 100644 --- a/crates/ruff/src/rules/flake8_pytest_style/rules/patch.rs +++ b/crates/ruff/src/rules/flake8_pytest_style/rules/patch.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{self as ast, Arguments, Expr, Keyword, Ranged}; +use ruff_python_ast::{self as ast, Expr, Keyword, Parameters, Ranged}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -20,7 +20,7 @@ impl Violation for PytestPatchWithLambda { /// Visitor that checks references the argument names in the lambda body. #[derive(Debug)] struct LambdaBodyVisitor<'a> { - arguments: &'a Arguments, + parameters: &'a Parameters, uses_args: bool, } @@ -31,7 +31,7 @@ where fn visit_expr(&mut self, expr: &'b Expr) { match expr { Expr::Name(ast::ExprName { id, .. }) => { - if includes_arg_name(id, self.arguments) { + if includes_arg_name(id, self.parameters) { self.uses_args = true; } } @@ -55,7 +55,7 @@ fn check_patch_call( } let ast::ExprLambda { - args, + parameters, body, range: _, } = CallArguments::new(args, keywords) @@ -64,7 +64,7 @@ fn check_patch_call( // Walk the lambda body. let mut visitor = LambdaBodyVisitor { - arguments: args, + parameters, uses_args: false, }; visitor.visit_expr(body); diff --git a/crates/ruff/src/rules/flake8_return/visitor.rs b/crates/ruff/src/rules/flake8_return/visitor.rs index c5ffe1585c..80bc2f8d7d 100644 --- a/crates/ruff/src/rules/flake8_return/visitor.rs +++ b/crates/ruff/src/rules/flake8_return/visitor.rs @@ -46,13 +46,13 @@ impl<'a> Visitor<'a> for ReturnVisitor<'a> { return; } Stmt::FunctionDef(ast::StmtFunctionDef { - args, + parameters, decorator_list, returns, .. }) | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { - args, + parameters, decorator_list, returns, .. @@ -66,7 +66,7 @@ impl<'a> Visitor<'a> for ReturnVisitor<'a> { if let Some(returns) = returns { visitor::walk_expr(self, returns); } - visitor::walk_arguments(self, args); + visitor::walk_parameters(self, parameters); self.parents.pop(); // But don't recurse into the body. diff --git a/crates/ruff/src/rules/flake8_unused_arguments/rules/unused_arguments.rs b/crates/ruff/src/rules/flake8_unused_arguments/rules/unused_arguments.rs index 0a7b06a051..7065aeb3b6 100644 --- a/crates/ruff/src/rules/flake8_unused_arguments/rules/unused_arguments.rs +++ b/crates/ruff/src/rules/flake8_unused_arguments/rules/unused_arguments.rs @@ -2,7 +2,7 @@ use std::iter; use regex::Regex; use ruff_python_ast as ast; -use ruff_python_ast::{Arg, Arguments}; +use ruff_python_ast::{Parameter, Parameters}; use ruff_diagnostics::DiagnosticKind; use ruff_diagnostics::{Diagnostic, Violation}; @@ -215,26 +215,26 @@ impl Argumentable { /// Check a plain function for unused arguments. fn function( argumentable: Argumentable, - args: &Arguments, + parameters: &Parameters, values: &Scope, semantic: &SemanticModel, dummy_variable_rgx: &Regex, ignore_variadic_names: bool, diagnostics: &mut Vec, ) { - let args = args + let args = parameters .posonlyargs .iter() - .chain(&args.args) - .chain(&args.kwonlyargs) - .map(|arg_with_default| &arg_with_default.def) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) + .map(|parameter_with_default| ¶meter_with_default.def) .chain( - iter::once::>(args.vararg.as_deref()) + iter::once::>(parameters.vararg.as_deref()) .flatten() .skip(usize::from(ignore_variadic_names)), ) .chain( - iter::once::>(args.kwarg.as_deref()) + iter::once::>(parameters.kwarg.as_deref()) .flatten() .skip(usize::from(ignore_variadic_names)), ); @@ -251,27 +251,27 @@ fn function( /// Check a method for unused arguments. fn method( argumentable: Argumentable, - args: &Arguments, + parameters: &Parameters, values: &Scope, semantic: &SemanticModel, dummy_variable_rgx: &Regex, ignore_variadic_names: bool, diagnostics: &mut Vec, ) { - let args = args + let args = parameters .posonlyargs .iter() - .chain(&args.args) - .chain(&args.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) .skip(1) - .map(|arg_with_default| &arg_with_default.def) + .map(|parameter_with_default| ¶meter_with_default.def) .chain( - iter::once::>(args.vararg.as_deref()) + iter::once::>(parameters.vararg.as_deref()) .flatten() .skip(usize::from(ignore_variadic_names)), ) .chain( - iter::once::>(args.kwarg.as_deref()) + iter::once::>(parameters.kwarg.as_deref()) .flatten() .skip(usize::from(ignore_variadic_names)), ); @@ -287,13 +287,13 @@ fn method( fn call<'a>( argumentable: Argumentable, - args: impl Iterator, + parameters: impl Iterator, values: &Scope, semantic: &SemanticModel, dummy_variable_rgx: &Regex, diagnostics: &mut Vec, ) { - diagnostics.extend(args.filter_map(|arg| { + diagnostics.extend(parameters.filter_map(|arg| { let binding = values .get(arg.arg.as_str()) .map(|binding_id| semantic.binding(binding_id))?; @@ -324,14 +324,14 @@ pub(crate) fn unused_arguments( match &scope.kind { ScopeKind::Function(ast::StmtFunctionDef { name, - args, + parameters, body, decorator_list, .. }) | ScopeKind::AsyncFunction(ast::StmtAsyncFunctionDef { name, - args, + parameters, body, decorator_list, .. @@ -350,7 +350,7 @@ pub(crate) fn unused_arguments( { function( Argumentable::Function, - args, + parameters, scope, checker.semantic(), &checker.settings.dummy_variable_rgx, @@ -375,7 +375,7 @@ pub(crate) fn unused_arguments( { method( Argumentable::Method, - args, + parameters, scope, checker.semantic(), &checker.settings.dummy_variable_rgx, @@ -400,7 +400,7 @@ pub(crate) fn unused_arguments( { method( Argumentable::ClassMethod, - args, + parameters, scope, checker.semantic(), &checker.settings.dummy_variable_rgx, @@ -425,7 +425,7 @@ pub(crate) fn unused_arguments( { function( Argumentable::StaticMethod, - args, + parameters, scope, checker.semantic(), &checker.settings.dummy_variable_rgx, @@ -439,11 +439,11 @@ pub(crate) fn unused_arguments( } } } - ScopeKind::Lambda(ast::ExprLambda { args, .. }) => { + ScopeKind::Lambda(ast::ExprLambda { parameters, .. }) => { if checker.enabled(Argumentable::Lambda.rule_code()) { function( Argumentable::Lambda, - args, + parameters, scope, checker.semantic(), &checker.settings.dummy_variable_rgx, diff --git a/crates/ruff/src/rules/pep8_naming/rules/invalid_argument_name.rs b/crates/ruff/src/rules/pep8_naming/rules/invalid_argument_name.rs index fa1c89b250..e196920eb3 100644 --- a/crates/ruff/src/rules/pep8_naming/rules/invalid_argument_name.rs +++ b/crates/ruff/src/rules/pep8_naming/rules/invalid_argument_name.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{Arg, Ranged}; +use ruff_python_ast::{Parameter, Ranged}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -50,7 +50,7 @@ impl Violation for InvalidArgumentName { /// N803 pub(crate) fn invalid_argument_name( name: &str, - arg: &Arg, + parameter: &Parameter, ignore_names: &[IdentifierPattern], ) -> Option { if ignore_names @@ -64,7 +64,7 @@ pub(crate) fn invalid_argument_name( InvalidArgumentName { name: name.to_string(), }, - arg.range(), + parameter.range(), )); } None diff --git a/crates/ruff/src/rules/pep8_naming/rules/invalid_first_argument_name_for_class_method.rs b/crates/ruff/src/rules/pep8_naming/rules/invalid_first_argument_name_for_class_method.rs index e56168f6fa..abbba82189 100644 --- a/crates/ruff/src/rules/pep8_naming/rules/invalid_first_argument_name_for_class_method.rs +++ b/crates/ruff/src/rules/pep8_naming/rules/invalid_first_argument_name_for_class_method.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{ArgWithDefault, Arguments, Decorator, Ranged}; +use ruff_python_ast::{Decorator, ParameterWithDefault, Parameters, Ranged}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -59,7 +59,7 @@ pub(crate) fn invalid_first_argument_name_for_class_method( scope: &Scope, name: &str, decorator_list: &[Decorator], - args: &Arguments, + parameters: &Parameters, ) -> Option { if !matches!( function_type::classify( @@ -74,11 +74,14 @@ pub(crate) fn invalid_first_argument_name_for_class_method( ) { return None; } - if let Some(ArgWithDefault { + if let Some(ParameterWithDefault { def, default: _, range: _, - }) = args.posonlyargs.first().or_else(|| args.args.first()) + }) = parameters + .posonlyargs + .first() + .or_else(|| parameters.args.first()) { if &def.arg != "cls" { if checker diff --git a/crates/ruff/src/rules/pep8_naming/rules/invalid_first_argument_name_for_method.rs b/crates/ruff/src/rules/pep8_naming/rules/invalid_first_argument_name_for_method.rs index dd517f7063..39531ee16f 100644 --- a/crates/ruff/src/rules/pep8_naming/rules/invalid_first_argument_name_for_method.rs +++ b/crates/ruff/src/rules/pep8_naming/rules/invalid_first_argument_name_for_method.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{Arguments, Decorator, Ranged}; +use ruff_python_ast::{Decorator, Parameters, Ranged}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -57,7 +57,7 @@ pub(crate) fn invalid_first_argument_name_for_method( scope: &Scope, name: &str, decorator_list: &[Decorator], - args: &Arguments, + parameters: &Parameters, ) -> Option { if !matches!( function_type::classify( @@ -72,7 +72,10 @@ pub(crate) fn invalid_first_argument_name_for_method( ) { return None; } - let arg = args.posonlyargs.first().or_else(|| args.args.first())?; + let arg = parameters + .posonlyargs + .first() + .or_else(|| parameters.args.first())?; if &arg.def.arg == "self" { return None; } diff --git a/crates/ruff/src/rules/pycodestyle/rules/lambda_assignment.rs b/crates/ruff/src/rules/pycodestyle/rules/lambda_assignment.rs index 9fdbb9a591..3c43af614f 100644 --- a/crates/ruff/src/rules/pycodestyle/rules/lambda_assignment.rs +++ b/crates/ruff/src/rules/pycodestyle/rules/lambda_assignment.rs @@ -1,5 +1,6 @@ use ruff_python_ast::{ - self as ast, Arg, ArgWithDefault, Arguments, Constant, Expr, Identifier, Ranged, Stmt, + self as ast, Constant, Expr, Identifier, Parameter, ParameterWithDefault, Parameters, Ranged, + Stmt, }; use ruff_text_size::TextRange; @@ -67,7 +68,10 @@ pub(crate) fn lambda_assignment( return; }; - let Expr::Lambda(ast::ExprLambda { args, body, .. }) = value else { + let Expr::Lambda(ast::ExprLambda { + parameters, body, .. + }) = value + else { return; }; @@ -87,7 +91,7 @@ pub(crate) fn lambda_assignment( let mut indented = String::new(); for (idx, line) in function( id, - args, + parameters, body, annotation, checker.semantic(), @@ -173,7 +177,7 @@ fn extract_types(annotation: &Expr, semantic: &SemanticModel) -> Option<(Vec, semantic: &SemanticModel, @@ -187,40 +191,40 @@ fn function( if let Some((arg_types, return_type)) = extract_types(annotation, semantic) { // A `lambda` expression can only have positional and positional-only // arguments. The order is always positional-only first, then positional. - let new_posonlyargs = args + let new_posonlyargs = parameters .posonlyargs .iter() .enumerate() - .map(|(idx, arg_with_default)| ArgWithDefault { - def: Arg { + .map(|(idx, parameter)| ParameterWithDefault { + def: Parameter { annotation: arg_types .get(idx) .map(|arg_type| Box::new(arg_type.clone())), - ..arg_with_default.def.clone() + ..parameter.def.clone() }, - ..arg_with_default.clone() + ..parameter.clone() }) .collect::>(); - let new_args = args + let new_args = parameters .args .iter() .enumerate() - .map(|(idx, arg_with_default)| ArgWithDefault { - def: Arg { + .map(|(idx, parameter)| ParameterWithDefault { + def: Parameter { annotation: arg_types .get(idx + new_posonlyargs.len()) .map(|arg_type| Box::new(arg_type.clone())), - ..arg_with_default.def.clone() + ..parameter.def.clone() }, - ..arg_with_default.clone() + ..parameter.clone() }) .collect::>(); let func = Stmt::FunctionDef(ast::StmtFunctionDef { name: Identifier::new(name.to_string(), TextRange::default()), - args: Box::new(Arguments { + parameters: Box::new(Parameters { posonlyargs: new_posonlyargs, args: new_args, - ..args.clone() + ..parameters.clone() }), body: vec![body], decorator_list: vec![], @@ -233,7 +237,7 @@ fn function( } let func = Stmt::FunctionDef(ast::StmtFunctionDef { name: Identifier::new(name.to_string(), TextRange::default()), - args: Box::new(args.clone()), + parameters: Box::new(parameters.clone()), body: vec![body], decorator_list: vec![], returns: None, diff --git a/crates/ruff/src/rules/pydocstyle/rules/sections.rs b/crates/ruff/src/rules/pydocstyle/rules/sections.rs index 0111c8b3e3..69542ffd06 100644 --- a/crates/ruff/src/rules/pydocstyle/rules/sections.rs +++ b/crates/ruff/src/rules/pydocstyle/rules/sections.rs @@ -1,7 +1,7 @@ use itertools::Itertools; use once_cell::sync::Lazy; use regex::Regex; -use ruff_python_ast::{self as ast, ArgWithDefault, Stmt}; +use ruff_python_ast::{self as ast, ParameterWithDefault, Stmt}; use ruff_text_size::{TextLen, TextRange, TextSize}; use rustc_hash::FxHashSet; @@ -1726,27 +1726,23 @@ fn missing_args(checker: &mut Checker, docstring: &Docstring, docstrings_args: & return; }; - let (Stmt::FunctionDef(ast::StmtFunctionDef { - args: arguments, .. - }) - | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { - args: arguments, .. - })) = stmt + let (Stmt::FunctionDef(ast::StmtFunctionDef { parameters, .. }) + | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { parameters, .. })) = stmt else { return; }; // Look for arguments that weren't included in the docstring. let mut missing_arg_names: FxHashSet = FxHashSet::default(); - for ArgWithDefault { + for ParameterWithDefault { def, default: _, range: _, - } in arguments + } in parameters .posonlyargs .iter() - .chain(&arguments.args) - .chain(&arguments.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) .skip( // If this is a non-static method, skip `cls` or `self`. usize::from( @@ -1763,7 +1759,7 @@ fn missing_args(checker: &mut Checker, docstring: &Docstring, docstrings_args: & // Check specifically for `vararg` and `kwarg`, which can be prefixed with a // single or double star, respectively. - if let Some(arg) = &arguments.vararg { + if let Some(arg) = ¶meters.vararg { let arg_name = arg.arg.as_str(); let starred_arg_name = format!("*{arg_name}"); if !arg_name.starts_with('_') @@ -1773,7 +1769,7 @@ fn missing_args(checker: &mut Checker, docstring: &Docstring, docstrings_args: & missing_arg_names.insert(starred_arg_name); } } - if let Some(arg) = &arguments.kwarg { + if let Some(arg) = ¶meters.kwarg { let arg_name = arg.arg.as_str(); let starred_arg_name = format!("**{arg_name}"); if !arg_name.starts_with('_') diff --git a/crates/ruff/src/rules/pylint/rules/property_with_parameters.rs b/crates/ruff/src/rules/pylint/rules/property_with_parameters.rs index f177480345..42a7db35d2 100644 --- a/crates/ruff/src/rules/pylint/rules/property_with_parameters.rs +++ b/crates/ruff/src/rules/pylint/rules/property_with_parameters.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{self as ast, Arguments, Decorator, Expr, Stmt}; +use ruff_python_ast::{self as ast, Decorator, Expr, Parameters, Stmt}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -51,7 +51,7 @@ pub(crate) fn property_with_parameters( checker: &mut Checker, stmt: &Stmt, decorator_list: &[Decorator], - args: &Arguments, + parameters: &Parameters, ) { if !decorator_list .iter() @@ -59,11 +59,11 @@ pub(crate) fn property_with_parameters( { return; } - if args + if parameters .posonlyargs .iter() - .chain(&args.args) - .chain(&args.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) .count() > 1 && checker.semantic().is_builtin("property") diff --git a/crates/ruff/src/rules/pylint/rules/too_many_arguments.rs b/crates/ruff/src/rules/pylint/rules/too_many_arguments.rs index f74965b5a1..94939a1d68 100644 --- a/crates/ruff/src/rules/pylint/rules/too_many_arguments.rs +++ b/crates/ruff/src/rules/pylint/rules/too_many_arguments.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{Arguments, Stmt}; +use ruff_python_ast::{Parameters, Stmt}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -58,12 +58,12 @@ impl Violation for TooManyArguments { } /// PLR0913 -pub(crate) fn too_many_arguments(checker: &mut Checker, arguments: &Arguments, stmt: &Stmt) { - let num_arguments = arguments +pub(crate) fn too_many_arguments(checker: &mut Checker, parameters: &Parameters, stmt: &Stmt) { + let num_arguments = parameters .args .iter() - .chain(&arguments.kwonlyargs) - .chain(&arguments.posonlyargs) + .chain(¶meters.kwonlyargs) + .chain(¶meters.posonlyargs) .filter(|arg| !checker.settings.dummy_variable_rgx.is_match(&arg.def.arg)) .count(); if num_arguments > checker.settings.pylint.max_args { diff --git a/crates/ruff/src/rules/pylint/rules/unexpected_special_method_signature.rs b/crates/ruff/src/rules/pylint/rules/unexpected_special_method_signature.rs index 53ae9acf42..5727667c82 100644 --- a/crates/ruff/src/rules/pylint/rules/unexpected_special_method_signature.rs +++ b/crates/ruff/src/rules/pylint/rules/unexpected_special_method_signature.rs @@ -1,6 +1,6 @@ use std::cmp::Ordering; -use ruff_python_ast::{Arguments, Decorator, Stmt}; +use ruff_python_ast::{Decorator, Parameters, Stmt}; use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; @@ -141,24 +141,31 @@ pub(crate) fn unexpected_special_method_signature( stmt: &Stmt, name: &str, decorator_list: &[Decorator], - args: &Arguments, + parameters: &Parameters, ) { if !checker.semantic().scope().kind.is_class() { return; } // Ignore methods with positional-only or keyword-only parameters, or variadic parameters. - if !args.posonlyargs.is_empty() || !args.kwonlyargs.is_empty() || args.kwarg.is_some() { + if !parameters.posonlyargs.is_empty() + || !parameters.kwonlyargs.is_empty() + || parameters.kwarg.is_some() + { return; } // Method has no parameter, will be caught by no-method-argument (E0211/N805). - if args.args.is_empty() && args.vararg.is_none() { + if parameters.args.is_empty() && parameters.vararg.is_none() { return; } - let actual_params = args.args.len(); - let mandatory_params = args.args.iter().filter(|arg| arg.default.is_none()).count(); + let actual_params = parameters.args.len(); + let mandatory_params = parameters + .args + .iter() + .filter(|arg| arg.default.is_none()) + .count(); let Some(expected_params) = ExpectedParams::from_method(name, is_staticmethod(decorator_list, checker.semantic())) @@ -171,12 +178,12 @@ pub(crate) fn unexpected_special_method_signature( if mandatory_params >= min { mandatory_params <= max } else { - args.vararg.is_some() || actual_params <= max + parameters.vararg.is_some() || actual_params <= max } } ExpectedParams::Fixed(expected) => match expected.cmp(&mandatory_params) { Ordering::Less => false, - Ordering::Greater => args.vararg.is_some() || actual_params >= expected, + Ordering::Greater => parameters.vararg.is_some() || actual_params >= expected, Ordering::Equal => true, }, }; diff --git a/crates/ruff/src/rules/pyupgrade/rules/super_call_with_parameters.rs b/crates/ruff/src/rules/pyupgrade/rules/super_call_with_parameters.rs index 46ec27b616..7a0527104c 100644 --- a/crates/ruff/src/rules/pyupgrade/rules/super_call_with_parameters.rs +++ b/crates/ruff/src/rules/pyupgrade/rules/super_call_with_parameters.rs @@ -1,4 +1,4 @@ -use ruff_python_ast::{self as ast, Arg, ArgWithDefault, Expr, Ranged, Stmt}; +use ruff_python_ast::{self as ast, Expr, Parameter, ParameterWithDefault, Ranged, Stmt}; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Fix}; use ruff_macros::{derive_message_formats, violation}; @@ -98,19 +98,20 @@ pub(crate) fn super_call_with_parameters( // Find the enclosing function definition (if any). let Some(Stmt::FunctionDef(ast::StmtFunctionDef { - args: parent_args, .. + parameters: parent_parameters, + .. })) = parents.find(|stmt| stmt.is_function_def_stmt()) else { return; }; // Extract the name of the first argument to the enclosing function. - let Some(ArgWithDefault { - def: Arg { + let Some(ParameterWithDefault { + def: Parameter { arg: parent_arg, .. }, .. - }) = parent_args.args.first() + }) = parent_parameters.args.first() else { return; }; diff --git a/crates/ruff/src/rules/ruff/rules/implicit_optional.rs b/crates/ruff/src/rules/ruff/rules/implicit_optional.rs index 0ceca1982d..29de3de6ab 100644 --- a/crates/ruff/src/rules/ruff/rules/implicit_optional.rs +++ b/crates/ruff/src/rules/ruff/rules/implicit_optional.rs @@ -1,7 +1,9 @@ use std::fmt; use anyhow::Result; -use ruff_python_ast::{self as ast, ArgWithDefault, Arguments, Constant, Expr, Operator, Ranged}; +use ruff_python_ast::{ + self as ast, Constant, Expr, Operator, ParameterWithDefault, Parameters, Ranged, +}; use ruff_text_size::TextRange; use ruff_diagnostics::{AutofixKind, Diagnostic, Edit, Fix, Violation}; @@ -165,16 +167,16 @@ fn generate_fix(checker: &Checker, conversion_type: ConversionType, expr: &Expr) } /// RUF013 -pub(crate) fn implicit_optional(checker: &mut Checker, arguments: &Arguments) { - for ArgWithDefault { +pub(crate) fn implicit_optional(checker: &mut Checker, parameters: &Parameters) { + for ParameterWithDefault { def, default, range: _, - } in arguments + } in parameters .posonlyargs .iter() - .chain(&arguments.args) - .chain(&arguments.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) { let Some(default) = default else { continue }; if !is_const_none(default) { diff --git a/crates/ruff_python_ast/src/comparable.rs b/crates/ruff_python_ast/src/comparable.rs index f2a5956185..ecbf9c6848 100644 --- a/crates/ruff_python_ast/src/comparable.rs +++ b/crates/ruff_python_ast/src/comparable.rs @@ -340,46 +340,46 @@ impl<'a> From<&'a ast::Constant> for ComparableConstant<'a> { } #[derive(Debug, PartialEq, Eq, Hash)] -pub struct ComparableArguments<'a> { - posonlyargs: Vec>, - args: Vec>, - vararg: Option>, - kwonlyargs: Vec>, - kwarg: Option>, +pub struct ComparableParameters<'a> { + posonlyargs: Vec>, + args: Vec>, + vararg: Option>, + kwonlyargs: Vec>, + kwarg: Option>, } -impl<'a> From<&'a ast::Arguments> for ComparableArguments<'a> { - fn from(arguments: &'a ast::Arguments) -> Self { +impl<'a> From<&'a ast::Parameters> for ComparableParameters<'a> { + fn from(parameters: &'a ast::Parameters) -> Self { Self { - posonlyargs: arguments.posonlyargs.iter().map(Into::into).collect(), - args: arguments.args.iter().map(Into::into).collect(), - vararg: arguments.vararg.as_ref().map(Into::into), - kwonlyargs: arguments.kwonlyargs.iter().map(Into::into).collect(), - kwarg: arguments.kwarg.as_ref().map(Into::into), + posonlyargs: parameters.posonlyargs.iter().map(Into::into).collect(), + args: parameters.args.iter().map(Into::into).collect(), + vararg: parameters.vararg.as_ref().map(Into::into), + kwonlyargs: parameters.kwonlyargs.iter().map(Into::into).collect(), + kwarg: parameters.kwarg.as_ref().map(Into::into), } } } -impl<'a> From<&'a Box> for ComparableArguments<'a> { - fn from(arguments: &'a Box) -> Self { - (arguments.as_ref()).into() +impl<'a> From<&'a Box> for ComparableParameters<'a> { + fn from(parameters: &'a Box) -> Self { + (parameters.as_ref()).into() } } -impl<'a> From<&'a Box> for ComparableArg<'a> { - fn from(arg: &'a Box) -> Self { +impl<'a> From<&'a Box> for ComparableParameter<'a> { + fn from(arg: &'a Box) -> Self { (arg.as_ref()).into() } } #[derive(Debug, PartialEq, Eq, Hash)] -pub struct ComparableArg<'a> { +pub struct ComparableParameter<'a> { arg: &'a str, annotation: Option>>, } -impl<'a> From<&'a ast::Arg> for ComparableArg<'a> { - fn from(arg: &'a ast::Arg) -> Self { +impl<'a> From<&'a ast::Parameter> for ComparableParameter<'a> { + fn from(arg: &'a ast::Parameter) -> Self { Self { arg: arg.arg.as_str(), annotation: arg.annotation.as_ref().map(Into::into), @@ -388,13 +388,13 @@ impl<'a> From<&'a ast::Arg> for ComparableArg<'a> { } #[derive(Debug, PartialEq, Eq, Hash)] -pub struct ComparableArgWithDefault<'a> { - def: ComparableArg<'a>, +pub struct ComparableParameterWithDefault<'a> { + def: ComparableParameter<'a>, default: Option>, } -impl<'a> From<&'a ast::ArgWithDefault> for ComparableArgWithDefault<'a> { - fn from(arg: &'a ast::ArgWithDefault) -> Self { +impl<'a> From<&'a ast::ParameterWithDefault> for ComparableParameterWithDefault<'a> { + fn from(arg: &'a ast::ParameterWithDefault) -> Self { Self { def: (&arg.def).into(), default: arg.default.as_ref().map(Into::into), @@ -511,7 +511,7 @@ pub struct ExprUnaryOp<'a> { #[derive(Debug, PartialEq, Eq, Hash)] pub struct ExprLambda<'a> { - args: ComparableArguments<'a>, + parameters: ComparableParameters<'a>, body: Box>, } @@ -739,11 +739,11 @@ impl<'a> From<&'a ast::Expr> for ComparableExpr<'a> { operand: operand.into(), }), ast::Expr::Lambda(ast::ExprLambda { - args, + parameters, body, range: _range, }) => Self::Lambda(ExprLambda { - args: (args.as_ref()).into(), + parameters: (parameters.as_ref()).into(), body: body.into(), }), ast::Expr::IfExp(ast::ExprIfExp { @@ -948,7 +948,7 @@ impl<'a> From<&'a ast::Expr> for ComparableExpr<'a> { #[derive(Debug, PartialEq, Eq, Hash)] pub struct StmtFunctionDef<'a> { name: &'a str, - args: ComparableArguments<'a>, + parameters: ComparableParameters<'a>, body: Vec>, decorator_list: Vec>, type_params: Vec>, @@ -958,7 +958,7 @@ pub struct StmtFunctionDef<'a> { #[derive(Debug, PartialEq, Eq, Hash)] pub struct StmtAsyncFunctionDef<'a> { name: &'a str, - args: ComparableArguments<'a>, + parameters: ComparableParameters<'a>, body: Vec>, decorator_list: Vec>, type_params: Vec>, @@ -1208,7 +1208,7 @@ impl<'a> From<&'a ast::Stmt> for ComparableStmt<'a> { match stmt { ast::Stmt::FunctionDef(ast::StmtFunctionDef { name, - args, + parameters, body, decorator_list, returns, @@ -1216,7 +1216,7 @@ impl<'a> From<&'a ast::Stmt> for ComparableStmt<'a> { range: _range, }) => Self::FunctionDef(StmtFunctionDef { name: name.as_str(), - args: args.into(), + parameters: parameters.into(), body: body.iter().map(Into::into).collect(), decorator_list: decorator_list.iter().map(Into::into).collect(), returns: returns.as_ref().map(Into::into), @@ -1224,7 +1224,7 @@ impl<'a> From<&'a ast::Stmt> for ComparableStmt<'a> { }), ast::Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { name, - args, + parameters, body, decorator_list, returns, @@ -1232,7 +1232,7 @@ impl<'a> From<&'a ast::Stmt> for ComparableStmt<'a> { range: _range, }) => Self::AsyncFunctionDef(StmtAsyncFunctionDef { name: name.as_str(), - args: args.into(), + parameters: parameters.into(), body: body.iter().map(Into::into).collect(), decorator_list: decorator_list.iter().map(Into::into).collect(), returns: returns.as_ref().map(Into::into), diff --git a/crates/ruff_python_ast/src/function.rs b/crates/ruff_python_ast/src/function.rs index 11deb8d773..8d1c290118 100644 --- a/crates/ruff_python_ast/src/function.rs +++ b/crates/ruff_python_ast/src/function.rs @@ -1,6 +1,6 @@ use crate::node::AnyNodeRef; use crate::{ - Arguments, Decorator, Expr, Identifier, Ranged, StmtAsyncFunctionDef, StmtFunctionDef, Suite, + Decorator, Expr, Identifier, Parameters, Ranged, StmtAsyncFunctionDef, StmtFunctionDef, Suite, }; use ruff_text_size::TextRange; @@ -49,10 +49,10 @@ impl<'a> AnyFunctionDefinition<'a> { } /// Returns the function arguments (parameters). - pub fn arguments(self) -> &'a Arguments { + pub fn arguments(self) -> &'a Parameters { match self { - Self::FunctionDefinition(definition) => definition.args.as_ref(), - Self::AsyncFunctionDefinition(definition) => definition.args.as_ref(), + Self::FunctionDefinition(definition) => definition.parameters.as_ref(), + Self::AsyncFunctionDefinition(definition) => definition.parameters.as_ref(), } } diff --git a/crates/ruff_python_ast/src/helpers.rs b/crates/ruff_python_ast/src/helpers.rs index 9ea638df45..807bbe541d 100644 --- a/crates/ruff_python_ast/src/helpers.rs +++ b/crates/ruff_python_ast/src/helpers.rs @@ -2,7 +2,7 @@ use std::borrow::Cow; use std::path::Path; use crate::{ - self as ast, Arguments, Constant, ExceptHandler, Expr, Keyword, MatchCase, Pattern, Ranged, + self as ast, Constant, ExceptHandler, Expr, Keyword, MatchCase, Parameters, Pattern, Ranged, Stmt, TypeParam, }; use num_traits::Zero; @@ -347,40 +347,43 @@ where { match stmt { Stmt::FunctionDef(ast::StmtFunctionDef { - args, + parameters, body, decorator_list, returns, .. }) | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { - args, + parameters, body, decorator_list, returns, .. }) => { - args.posonlyargs + parameters + .posonlyargs .iter() - .chain(args.args.iter().chain(args.kwonlyargs.iter())) - .any(|arg_with_default| { - arg_with_default + .chain(parameters.args.iter().chain(parameters.kwonlyargs.iter())) + .any(|parameter| { + parameter .default .as_ref() .is_some_and(|expr| any_over_expr(expr, func)) - || arg_with_default + || parameter .def .annotation .as_ref() .is_some_and(|expr| any_over_expr(expr, func)) }) - || args.vararg.as_ref().is_some_and(|arg| { - arg.annotation + || parameters.vararg.as_ref().is_some_and(|parameter| { + parameter + .annotation .as_ref() .is_some_and(|expr| any_over_expr(expr, func)) }) - || args.kwarg.as_ref().is_some_and(|arg| { - arg.annotation + || parameters.kwarg.as_ref().is_some_and(|parameter| { + parameter + .annotation .as_ref() .is_some_and(|expr| any_over_expr(expr, func)) }) @@ -709,23 +712,23 @@ pub fn extract_handled_exceptions(handlers: &[ExceptHandler]) -> Vec<&Expr> { handled_exceptions } -/// Returns `true` if the given name is included in the given [`Arguments`]. -pub fn includes_arg_name(name: &str, arguments: &Arguments) -> bool { - if arguments +/// Returns `true` if the given name is included in the given [`Parameters`]. +pub fn includes_arg_name(name: &str, parameters: &Parameters) -> bool { + if parameters .posonlyargs .iter() - .chain(&arguments.args) - .chain(&arguments.kwonlyargs) + .chain(¶meters.args) + .chain(¶meters.kwonlyargs) .any(|arg| arg.def.arg.as_str() == name) { return true; } - if let Some(arg) = &arguments.vararg { + if let Some(arg) = ¶meters.vararg { if arg.arg.as_str() == name { return true; } } - if let Some(arg) = &arguments.kwarg { + if let Some(arg) = ¶meters.kwarg { if arg.arg.as_str() == name { return true; } diff --git a/crates/ruff_python_ast/src/identifier.rs b/crates/ruff_python_ast/src/identifier.rs index 888b4c9d0f..a5d7d131e1 100644 --- a/crates/ruff_python_ast/src/identifier.rs +++ b/crates/ruff_python_ast/src/identifier.rs @@ -10,7 +10,7 @@ //! //! This module can be used to identify the [`TextRange`] of the `except` token. -use crate::{self as ast, Alias, Arg, ArgWithDefault, ExceptHandler, Ranged, Stmt}; +use crate::{self as ast, Alias, ExceptHandler, Parameter, ParameterWithDefault, Ranged, Stmt}; use ruff_text_size::{TextLen, TextRange, TextSize}; use ruff_python_trivia::{is_python_whitespace, Cursor}; @@ -38,8 +38,8 @@ impl Identifier for Stmt { } } -impl Identifier for Arg { - /// Return the [`TextRange`] for the identifier defining an [`Arg`]. +impl Identifier for Parameter { + /// Return the [`TextRange`] for the identifier defining an [`Parameter`]. /// /// For example, return the range of `x` in: /// ```python @@ -51,8 +51,8 @@ impl Identifier for Arg { } } -impl Identifier for ArgWithDefault { - /// Return the [`TextRange`] for the identifier defining an [`ArgWithDefault`]. +impl Identifier for ParameterWithDefault { + /// Return the [`TextRange`] for the identifier defining an [`ParameterWithDefault`]. /// /// For example, return the range of `x` in: /// ```python diff --git a/crates/ruff_python_ast/src/node.rs b/crates/ruff_python_ast/src/node.rs index 9890c31b58..37c1705909 100644 --- a/crates/ruff_python_ast/src/node.rs +++ b/crates/ruff_python_ast/src/node.rs @@ -1,7 +1,7 @@ use crate::{ - self as ast, Alias, Arg, ArgWithDefault, Arguments, Comprehension, Decorator, ExceptHandler, - Expr, Keyword, MatchCase, Mod, Pattern, Ranged, Stmt, TypeParam, TypeParamParamSpec, - TypeParamTypeVar, TypeParamTypeVarTuple, WithItem, + self as ast, Alias, Comprehension, Decorator, ExceptHandler, Expr, Keyword, MatchCase, Mod, + Parameter, ParameterWithDefault, Parameters, Pattern, Ranged, Stmt, TypeParam, + TypeParamParamSpec, TypeParamTypeVar, TypeParamTypeVarTuple, WithItem, }; use ruff_text_size::TextRange; use std::ptr::NonNull; @@ -90,9 +90,9 @@ pub enum AnyNode { PatternMatchAs(ast::PatternMatchAs), PatternMatchOr(ast::PatternMatchOr), Comprehension(Comprehension), - Arguments(Arguments), - Arg(Arg), - ArgWithDefault(ArgWithDefault), + Parameters(Parameters), + Parameter(Parameter), + ParameterWithDefault(ParameterWithDefault), Keyword(Keyword), Alias(Alias), WithItem(WithItem), @@ -177,9 +177,9 @@ impl AnyNode { | AnyNode::PatternMatchAs(_) | AnyNode::PatternMatchOr(_) | AnyNode::Comprehension(_) - | AnyNode::Arguments(_) - | AnyNode::Arg(_) - | AnyNode::ArgWithDefault(_) + | AnyNode::Parameters(_) + | AnyNode::Parameter(_) + | AnyNode::ParameterWithDefault(_) | AnyNode::Keyword(_) | AnyNode::Alias(_) | AnyNode::WithItem(_) @@ -264,9 +264,9 @@ impl AnyNode { | AnyNode::PatternMatchAs(_) | AnyNode::PatternMatchOr(_) | AnyNode::Comprehension(_) - | AnyNode::Arguments(_) - | AnyNode::Arg(_) - | AnyNode::ArgWithDefault(_) + | AnyNode::Parameters(_) + | AnyNode::Parameter(_) + | AnyNode::ParameterWithDefault(_) | AnyNode::Keyword(_) | AnyNode::Alias(_) | AnyNode::WithItem(_) @@ -351,9 +351,9 @@ impl AnyNode { | AnyNode::PatternMatchAs(_) | AnyNode::PatternMatchOr(_) | AnyNode::Comprehension(_) - | AnyNode::Arguments(_) - | AnyNode::Arg(_) - | AnyNode::ArgWithDefault(_) + | AnyNode::Parameters(_) + | AnyNode::Parameter(_) + | AnyNode::ParameterWithDefault(_) | AnyNode::Keyword(_) | AnyNode::Alias(_) | AnyNode::WithItem(_) @@ -438,9 +438,9 @@ impl AnyNode { | AnyNode::ExprLineMagic(_) | AnyNode::ExceptHandlerExceptHandler(_) | AnyNode::Comprehension(_) - | AnyNode::Arguments(_) - | AnyNode::Arg(_) - | AnyNode::ArgWithDefault(_) + | AnyNode::Parameters(_) + | AnyNode::Parameter(_) + | AnyNode::ParameterWithDefault(_) | AnyNode::Keyword(_) | AnyNode::Alias(_) | AnyNode::WithItem(_) @@ -525,9 +525,9 @@ impl AnyNode { | AnyNode::PatternMatchAs(_) | AnyNode::PatternMatchOr(_) | AnyNode::Comprehension(_) - | AnyNode::Arguments(_) - | AnyNode::Arg(_) - | AnyNode::ArgWithDefault(_) + | AnyNode::Parameters(_) + | AnyNode::Parameter(_) + | AnyNode::ParameterWithDefault(_) | AnyNode::Keyword(_) | AnyNode::Alias(_) | AnyNode::WithItem(_) @@ -631,9 +631,9 @@ impl AnyNode { Self::PatternMatchAs(node) => AnyNodeRef::PatternMatchAs(node), Self::PatternMatchOr(node) => AnyNodeRef::PatternMatchOr(node), Self::Comprehension(node) => AnyNodeRef::Comprehension(node), - Self::Arguments(node) => AnyNodeRef::Arguments(node), - Self::Arg(node) => AnyNodeRef::Arg(node), - Self::ArgWithDefault(node) => AnyNodeRef::ArgWithDefault(node), + Self::Parameters(node) => AnyNodeRef::Parameters(node), + Self::Parameter(node) => AnyNodeRef::Parameter(node), + Self::ParameterWithDefault(node) => AnyNodeRef::ParameterWithDefault(node), Self::Keyword(node) => AnyNodeRef::Keyword(node), Self::Alias(node) => AnyNodeRef::Alias(node), Self::WithItem(node) => AnyNodeRef::WithItem(node), @@ -2613,12 +2613,12 @@ impl AstNode for Comprehension { AnyNode::from(self) } } -impl AstNode for Arguments { +impl AstNode for Parameters { fn cast(kind: AnyNode) -> Option where Self: Sized, { - if let AnyNode::Arguments(node) = kind { + if let AnyNode::Parameters(node) = kind { Some(node) } else { None @@ -2626,7 +2626,7 @@ impl AstNode for Arguments { } fn cast_ref(kind: AnyNodeRef) -> Option<&Self> { - if let AnyNodeRef::Arguments(node) = kind { + if let AnyNodeRef::Parameters(node) = kind { Some(node) } else { None @@ -2641,12 +2641,12 @@ impl AstNode for Arguments { AnyNode::from(self) } } -impl AstNode for Arg { +impl AstNode for Parameter { fn cast(kind: AnyNode) -> Option where Self: Sized, { - if let AnyNode::Arg(node) = kind { + if let AnyNode::Parameter(node) = kind { Some(node) } else { None @@ -2654,7 +2654,7 @@ impl AstNode for Arg { } fn cast_ref(kind: AnyNodeRef) -> Option<&Self> { - if let AnyNodeRef::Arg(node) = kind { + if let AnyNodeRef::Parameter(node) = kind { Some(node) } else { None @@ -2669,12 +2669,12 @@ impl AstNode for Arg { AnyNode::from(self) } } -impl AstNode for ArgWithDefault { +impl AstNode for ParameterWithDefault { fn cast(kind: AnyNode) -> Option where Self: Sized, { - if let AnyNode::ArgWithDefault(node) = kind { + if let AnyNode::ParameterWithDefault(node) = kind { Some(node) } else { None @@ -2682,7 +2682,7 @@ impl AstNode for ArgWithDefault { } fn cast_ref(kind: AnyNodeRef) -> Option<&Self> { - if let AnyNodeRef::ArgWithDefault(node) = kind { + if let AnyNodeRef::ParameterWithDefault(node) = kind { Some(node) } else { None @@ -3444,19 +3444,19 @@ impl From for AnyNode { AnyNode::Comprehension(node) } } -impl From for AnyNode { - fn from(node: Arguments) -> Self { - AnyNode::Arguments(node) +impl From for AnyNode { + fn from(node: Parameters) -> Self { + AnyNode::Parameters(node) } } -impl From for AnyNode { - fn from(node: Arg) -> Self { - AnyNode::Arg(node) +impl From for AnyNode { + fn from(node: Parameter) -> Self { + AnyNode::Parameter(node) } } -impl From for AnyNode { - fn from(node: ArgWithDefault) -> Self { - AnyNode::ArgWithDefault(node) +impl From for AnyNode { + fn from(node: ParameterWithDefault) -> Self { + AnyNode::ParameterWithDefault(node) } } impl From for AnyNode { @@ -3574,9 +3574,9 @@ impl Ranged for AnyNode { AnyNode::PatternMatchAs(node) => node.range(), AnyNode::PatternMatchOr(node) => node.range(), AnyNode::Comprehension(node) => node.range(), - AnyNode::Arguments(node) => node.range(), - AnyNode::Arg(node) => node.range(), - AnyNode::ArgWithDefault(node) => node.range(), + AnyNode::Parameters(node) => node.range(), + AnyNode::Parameter(node) => node.range(), + AnyNode::ParameterWithDefault(node) => node.range(), AnyNode::Keyword(node) => node.range(), AnyNode::Alias(node) => node.range(), AnyNode::WithItem(node) => node.range(), @@ -3661,9 +3661,9 @@ pub enum AnyNodeRef<'a> { PatternMatchAs(&'a ast::PatternMatchAs), PatternMatchOr(&'a ast::PatternMatchOr), Comprehension(&'a Comprehension), - Arguments(&'a Arguments), - Arg(&'a Arg), - ArgWithDefault(&'a ArgWithDefault), + Parameters(&'a Parameters), + Parameter(&'a Parameter), + ParameterWithDefault(&'a ParameterWithDefault), Keyword(&'a Keyword), Alias(&'a Alias), WithItem(&'a WithItem), @@ -3747,9 +3747,9 @@ impl AnyNodeRef<'_> { AnyNodeRef::PatternMatchAs(node) => NonNull::from(*node).cast(), AnyNodeRef::PatternMatchOr(node) => NonNull::from(*node).cast(), AnyNodeRef::Comprehension(node) => NonNull::from(*node).cast(), - AnyNodeRef::Arguments(node) => NonNull::from(*node).cast(), - AnyNodeRef::Arg(node) => NonNull::from(*node).cast(), - AnyNodeRef::ArgWithDefault(node) => NonNull::from(*node).cast(), + AnyNodeRef::Parameters(node) => NonNull::from(*node).cast(), + AnyNodeRef::Parameter(node) => NonNull::from(*node).cast(), + AnyNodeRef::ParameterWithDefault(node) => NonNull::from(*node).cast(), AnyNodeRef::Keyword(node) => NonNull::from(*node).cast(), AnyNodeRef::Alias(node) => NonNull::from(*node).cast(), AnyNodeRef::WithItem(node) => NonNull::from(*node).cast(), @@ -3839,9 +3839,9 @@ impl AnyNodeRef<'_> { AnyNodeRef::PatternMatchAs(_) => NodeKind::PatternMatchAs, AnyNodeRef::PatternMatchOr(_) => NodeKind::PatternMatchOr, AnyNodeRef::Comprehension(_) => NodeKind::Comprehension, - AnyNodeRef::Arguments(_) => NodeKind::Arguments, - AnyNodeRef::Arg(_) => NodeKind::Arg, - AnyNodeRef::ArgWithDefault(_) => NodeKind::ArgWithDefault, + AnyNodeRef::Parameters(_) => NodeKind::Parameters, + AnyNodeRef::Parameter(_) => NodeKind::Parameter, + AnyNodeRef::ParameterWithDefault(_) => NodeKind::ParameterWithDefault, AnyNodeRef::Keyword(_) => NodeKind::Keyword, AnyNodeRef::Alias(_) => NodeKind::Alias, AnyNodeRef::WithItem(_) => NodeKind::WithItem, @@ -3926,9 +3926,9 @@ impl AnyNodeRef<'_> { | AnyNodeRef::PatternMatchAs(_) | AnyNodeRef::PatternMatchOr(_) | AnyNodeRef::Comprehension(_) - | AnyNodeRef::Arguments(_) - | AnyNodeRef::Arg(_) - | AnyNodeRef::ArgWithDefault(_) + | AnyNodeRef::Parameters(_) + | AnyNodeRef::Parameter(_) + | AnyNodeRef::ParameterWithDefault(_) | AnyNodeRef::Keyword(_) | AnyNodeRef::Alias(_) | AnyNodeRef::WithItem(_) @@ -4013,9 +4013,9 @@ impl AnyNodeRef<'_> { | AnyNodeRef::PatternMatchAs(_) | AnyNodeRef::PatternMatchOr(_) | AnyNodeRef::Comprehension(_) - | AnyNodeRef::Arguments(_) - | AnyNodeRef::Arg(_) - | AnyNodeRef::ArgWithDefault(_) + | AnyNodeRef::Parameters(_) + | AnyNodeRef::Parameter(_) + | AnyNodeRef::ParameterWithDefault(_) | AnyNodeRef::Keyword(_) | AnyNodeRef::Alias(_) | AnyNodeRef::WithItem(_) @@ -4099,9 +4099,9 @@ impl AnyNodeRef<'_> { | AnyNodeRef::PatternMatchAs(_) | AnyNodeRef::PatternMatchOr(_) | AnyNodeRef::Comprehension(_) - | AnyNodeRef::Arguments(_) - | AnyNodeRef::Arg(_) - | AnyNodeRef::ArgWithDefault(_) + | AnyNodeRef::Parameters(_) + | AnyNodeRef::Parameter(_) + | AnyNodeRef::ParameterWithDefault(_) | AnyNodeRef::Keyword(_) | AnyNodeRef::Alias(_) | AnyNodeRef::WithItem(_) @@ -4186,9 +4186,9 @@ impl AnyNodeRef<'_> { | AnyNodeRef::ExprLineMagic(_) | AnyNodeRef::ExceptHandlerExceptHandler(_) | AnyNodeRef::Comprehension(_) - | AnyNodeRef::Arguments(_) - | AnyNodeRef::Arg(_) - | AnyNodeRef::ArgWithDefault(_) + | AnyNodeRef::Parameters(_) + | AnyNodeRef::Parameter(_) + | AnyNodeRef::ParameterWithDefault(_) | AnyNodeRef::Keyword(_) | AnyNodeRef::Alias(_) | AnyNodeRef::WithItem(_) @@ -4273,9 +4273,9 @@ impl AnyNodeRef<'_> { | AnyNodeRef::PatternMatchAs(_) | AnyNodeRef::PatternMatchOr(_) | AnyNodeRef::Comprehension(_) - | AnyNodeRef::Arguments(_) - | AnyNodeRef::Arg(_) - | AnyNodeRef::ArgWithDefault(_) + | AnyNodeRef::Parameters(_) + | AnyNodeRef::Parameter(_) + | AnyNodeRef::ParameterWithDefault(_) | AnyNodeRef::Keyword(_) | AnyNodeRef::Alias(_) | AnyNodeRef::WithItem(_) @@ -4877,19 +4877,19 @@ impl<'a> From<&'a Comprehension> for AnyNodeRef<'a> { AnyNodeRef::Comprehension(node) } } -impl<'a> From<&'a Arguments> for AnyNodeRef<'a> { - fn from(node: &'a Arguments) -> Self { - AnyNodeRef::Arguments(node) +impl<'a> From<&'a Parameters> for AnyNodeRef<'a> { + fn from(node: &'a Parameters) -> Self { + AnyNodeRef::Parameters(node) } } -impl<'a> From<&'a Arg> for AnyNodeRef<'a> { - fn from(node: &'a Arg) -> Self { - AnyNodeRef::Arg(node) +impl<'a> From<&'a Parameter> for AnyNodeRef<'a> { + fn from(node: &'a Parameter) -> Self { + AnyNodeRef::Parameter(node) } } -impl<'a> From<&'a ArgWithDefault> for AnyNodeRef<'a> { - fn from(node: &'a ArgWithDefault) -> Self { - AnyNodeRef::ArgWithDefault(node) +impl<'a> From<&'a ParameterWithDefault> for AnyNodeRef<'a> { + fn from(node: &'a ParameterWithDefault) -> Self { + AnyNodeRef::ParameterWithDefault(node) } } impl<'a> From<&'a Keyword> for AnyNodeRef<'a> { @@ -4985,9 +4985,9 @@ impl Ranged for AnyNodeRef<'_> { AnyNodeRef::PatternMatchAs(node) => node.range(), AnyNodeRef::PatternMatchOr(node) => node.range(), AnyNodeRef::Comprehension(node) => node.range(), - AnyNodeRef::Arguments(node) => node.range(), - AnyNodeRef::Arg(node) => node.range(), - AnyNodeRef::ArgWithDefault(node) => node.range(), + AnyNodeRef::Parameters(node) => node.range(), + AnyNodeRef::Parameter(node) => node.range(), + AnyNodeRef::ParameterWithDefault(node) => node.range(), AnyNodeRef::Keyword(node) => node.range(), AnyNodeRef::Alias(node) => node.range(), AnyNodeRef::WithItem(node) => node.range(), @@ -5075,9 +5075,9 @@ pub enum NodeKind { PatternMatchOr, TypeIgnoreTypeIgnore, Comprehension, - Arguments, - Arg, - ArgWithDefault, + Parameters, + Parameter, + ParameterWithDefault, Keyword, Alias, WithItem, diff --git a/crates/ruff_python_ast/src/nodes.rs b/crates/ruff_python_ast/src/nodes.rs index 9ddfba571b..bcb7ffed72 100644 --- a/crates/ruff_python_ast/src/nodes.rs +++ b/crates/ruff_python_ast/src/nodes.rs @@ -122,7 +122,7 @@ impl From for Stmt { pub struct StmtFunctionDef { pub range: TextRange, pub name: Identifier, - pub args: Box, + pub parameters: Box, pub body: Vec, pub decorator_list: Vec, pub returns: Option>, @@ -140,7 +140,7 @@ impl From for Stmt { pub struct StmtAsyncFunctionDef { pub range: TextRange, pub name: Identifier, - pub args: Box, + pub parameters: Box, pub body: Vec, pub decorator_list: Vec, pub returns: Option>, @@ -668,7 +668,7 @@ impl From for Expr { #[derive(Clone, Debug, PartialEq)] pub struct ExprLambda { pub range: TextRange, - pub args: Box, + pub parameters: Box, pub body: Box, } @@ -1822,22 +1822,9 @@ impl From for ExceptHandler { } } -/// See also [arguments](https://docs.python.org/3/library/ast.html#ast.arguments) -#[derive(Clone, Debug, PartialEq)] -pub struct PythonArguments { - pub range: TextRange, - pub posonlyargs: Vec, - pub args: Vec, - pub vararg: Option>, - pub kwonlyargs: Vec, - pub kw_defaults: Vec, - pub kwarg: Option>, - pub defaults: Vec, -} - /// See also [arg](https://docs.python.org/3/library/ast.html#ast.arg) #[derive(Clone, Debug, PartialEq)] -pub struct Arg { +pub struct Parameter { pub range: TextRange, pub arg: Identifier, pub annotation: Option>, @@ -2056,22 +2043,22 @@ pub struct Decorator { /// An alternative type of AST `arguments`. This is ruff_python_parser-friendly and human-friendly definition of function arguments. /// This form also has advantage to implement pre-order traverse. -/// `defaults` and `kw_defaults` fields are removed and the default values are placed under each `arg_with_default` typed argument. +/// +/// `defaults` and `kw_defaults` fields are removed and the default values are placed under each [`ParameterWithDefault`] typed argument. /// `vararg` and `kwarg` are still typed as `arg` because they never can have a default value. /// -/// The matching Python style AST type is [`PythonArguments`]. While [`PythonArguments`] has ordered `kwonlyargs` fields by -/// default existence, [Arguments] has location-ordered kwonlyargs fields. +/// The original Python-style AST type orders `kwonlyargs` fields by default existence; [Parameters] has location-ordered `kwonlyargs` fields. /// -/// NOTE: This type is different from original Python AST. +/// NOTE: This type differs from the original Python AST. See: [arguments](https://docs.python.org/3/library/ast.html#ast.arguments). #[derive(Clone, Debug, PartialEq)] -pub struct Arguments { +pub struct Parameters { pub range: TextRange, - pub posonlyargs: Vec, - pub args: Vec, - pub vararg: Option>, - pub kwonlyargs: Vec, - pub kwarg: Option>, + pub posonlyargs: Vec, + pub args: Vec, + pub vararg: Option>, + pub kwonlyargs: Vec, + pub kwarg: Option>, } /// An alternative type of AST `arg`. This is used for each function argument that might have a default value. @@ -2080,9 +2067,9 @@ pub struct Arguments { /// NOTE: This type is different from original Python AST. #[derive(Clone, Debug, PartialEq)] -pub struct ArgWithDefault { +pub struct ParameterWithDefault { pub range: TextRange, - pub def: Arg, + pub def: Parameter, pub default: Option>, } @@ -2105,7 +2092,7 @@ impl CmpOp { } } -impl Arguments { +impl Parameters { pub fn empty(range: TextRange) -> Self { Self { range, @@ -2124,21 +2111,21 @@ fn clone_boxed_expr(expr: &Box) -> Box { Box::new(expr.clone()) } -impl ArgWithDefault { - pub fn as_arg(&self) -> &Arg { +impl ParameterWithDefault { + pub fn as_parameter(&self) -> &Parameter { &self.def } - pub fn to_arg(&self) -> (Arg, Option>) { - let ArgWithDefault { + pub fn to_parameter(&self) -> (Parameter, Option>) { + let ParameterWithDefault { range: _, def, default, } = self; (def.clone(), default.as_ref().map(clone_boxed_expr)) } - pub fn into_arg(self) -> (Arg, Option>) { - let ArgWithDefault { + pub fn into_parameter(self) -> (Parameter, Option>) { + let ParameterWithDefault { range: _, def, default, @@ -2147,7 +2134,7 @@ impl ArgWithDefault { } } -impl Arguments { +impl Parameters { pub fn defaults(&self) -> impl std::iter::Iterator { self.posonlyargs .iter() @@ -2156,14 +2143,14 @@ impl Arguments { } #[allow(clippy::type_complexity)] - pub fn split_kwonlyargs(&self) -> (Vec<&Arg>, Vec<(&Arg, &Expr)>) { + pub fn split_kwonlyargs(&self) -> (Vec<&Parameter>, Vec<(&Parameter, &Expr)>) { let mut args = Vec::new(); let mut with_defaults = Vec::new(); for arg in &self.kwonlyargs { if let Some(ref default) = arg.default { - with_defaults.push((arg.as_arg(), &**default)); + with_defaults.push((arg.as_parameter(), &**default)); } else { - args.push(arg.as_arg()); + args.push(arg.as_parameter()); } } (args, with_defaults) @@ -2838,12 +2825,7 @@ impl Ranged for crate::ExceptHandler { } } -impl Ranged for crate::nodes::PythonArguments { - fn range(&self) -> TextRange { - self.range - } -} -impl Ranged for crate::nodes::Arg { +impl Ranged for crate::nodes::Parameter { fn range(&self) -> TextRange { self.range } @@ -2952,12 +2934,12 @@ impl Ranged for crate::nodes::Decorator { self.range } } -impl Ranged for crate::nodes::Arguments { +impl Ranged for crate::nodes::Parameters { fn range(&self) -> TextRange { self.range } } -impl Ranged for crate::nodes::ArgWithDefault { +impl Ranged for crate::nodes::ParameterWithDefault { fn range(&self) -> TextRange { self.range } diff --git a/crates/ruff_python_ast/src/visitor.rs b/crates/ruff_python_ast/src/visitor.rs index 362233c7dd..97ed5a17f8 100644 --- a/crates/ruff_python_ast/src/visitor.rs +++ b/crates/ruff_python_ast/src/visitor.rs @@ -3,9 +3,9 @@ pub mod preorder; use crate::{ - self as ast, Alias, Arg, Arguments, BoolOp, CmpOp, Comprehension, Decorator, ElifElseClause, - ExceptHandler, Expr, ExprContext, Keyword, MatchCase, Operator, Pattern, Stmt, TypeParam, - TypeParamTypeVar, UnaryOp, WithItem, + self as ast, Alias, BoolOp, CmpOp, Comprehension, Decorator, ElifElseClause, ExceptHandler, + Expr, ExprContext, Keyword, MatchCase, Operator, Parameter, Parameters, Pattern, Stmt, + TypeParam, TypeParamTypeVar, UnaryOp, WithItem, }; /// A trait for AST visitors. Visits all nodes in the AST recursively in evaluation-order. @@ -52,11 +52,11 @@ pub trait Visitor<'a> { fn visit_format_spec(&mut self, format_spec: &'a Expr) { walk_format_spec(self, format_spec); } - fn visit_arguments(&mut self, arguments: &'a Arguments) { - walk_arguments(self, arguments); + fn visit_parameters(&mut self, parameters: &'a Parameters) { + walk_parameters(self, parameters); } - fn visit_arg(&mut self, arg: &'a Arg) { - walk_arg(self, arg); + fn visit_parameter(&mut self, parameter: &'a Parameter) { + walk_parameter(self, parameter); } fn visit_keyword(&mut self, keyword: &'a Keyword) { walk_keyword(self, keyword); @@ -103,7 +103,7 @@ pub fn walk_elif_else_clause<'a, V: Visitor<'a> + ?Sized>( pub fn walk_stmt<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, stmt: &'a Stmt) { match stmt { Stmt::FunctionDef(ast::StmtFunctionDef { - args, + parameters, body, decorator_list, returns, @@ -116,14 +116,14 @@ pub fn walk_stmt<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, stmt: &'a Stmt) { for type_param in type_params { visitor.visit_type_param(type_param); } - visitor.visit_arguments(args); + visitor.visit_parameters(parameters); for expr in returns { visitor.visit_annotation(expr); } visitor.visit_body(body); } Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { - args, + parameters, body, decorator_list, returns, @@ -136,7 +136,7 @@ pub fn walk_stmt<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, stmt: &'a Stmt) { for type_param in type_params { visitor.visit_type_param(type_param); } - visitor.visit_arguments(args); + visitor.visit_parameters(parameters); for expr in returns { visitor.visit_annotation(expr); } @@ -411,11 +411,11 @@ pub fn walk_expr<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, expr: &'a Expr) { visitor.visit_expr(operand); } Expr::Lambda(ast::ExprLambda { - args, + parameters, body, range: _range, }) => { - visitor.visit_arguments(args); + visitor.visit_parameters(parameters); visitor.visit_expr(body); } Expr::IfExp(ast::ExprIfExp { @@ -645,43 +645,43 @@ pub fn walk_format_spec<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, format_spe visitor.visit_expr(format_spec); } -pub fn walk_arguments<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, arguments: &'a Arguments) { +pub fn walk_parameters<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, parameters: &'a Parameters) { // Defaults are evaluated before annotations. - for arg in &arguments.posonlyargs { + for arg in ¶meters.posonlyargs { if let Some(default) = &arg.default { visitor.visit_expr(default); } } - for arg in &arguments.args { + for arg in ¶meters.args { if let Some(default) = &arg.default { visitor.visit_expr(default); } } - for arg in &arguments.kwonlyargs { + for arg in ¶meters.kwonlyargs { if let Some(default) = &arg.default { visitor.visit_expr(default); } } - for arg in &arguments.posonlyargs { - visitor.visit_arg(&arg.def); + for arg in ¶meters.posonlyargs { + visitor.visit_parameter(&arg.def); } - for arg in &arguments.args { - visitor.visit_arg(&arg.def); + for arg in ¶meters.args { + visitor.visit_parameter(&arg.def); } - if let Some(arg) = &arguments.vararg { - visitor.visit_arg(arg); + if let Some(arg) = ¶meters.vararg { + visitor.visit_parameter(arg); } - for arg in &arguments.kwonlyargs { - visitor.visit_arg(&arg.def); + for arg in ¶meters.kwonlyargs { + visitor.visit_parameter(&arg.def); } - if let Some(arg) = &arguments.kwarg { - visitor.visit_arg(arg); + if let Some(arg) = ¶meters.kwarg { + visitor.visit_parameter(arg); } } -pub fn walk_arg<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, arg: &'a Arg) { - if let Some(expr) = &arg.annotation { +pub fn walk_parameter<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, parameter: &'a Parameter) { + if let Some(expr) = ¶meter.annotation { visitor.visit_annotation(expr); } } diff --git a/crates/ruff_python_ast/src/visitor/preorder.rs b/crates/ruff_python_ast/src/visitor/preorder.rs index 967f312d66..164a1f4e1f 100644 --- a/crates/ruff_python_ast/src/visitor/preorder.rs +++ b/crates/ruff_python_ast/src/visitor/preorder.rs @@ -1,7 +1,7 @@ use crate::{ - self as ast, Alias, Arg, ArgWithDefault, Arguments, BoolOp, CmpOp, Comprehension, Constant, - Decorator, ElifElseClause, ExceptHandler, Expr, Keyword, MatchCase, Mod, Operator, Pattern, - Stmt, TypeParam, TypeParamTypeVar, UnaryOp, WithItem, + self as ast, Alias, BoolOp, CmpOp, Comprehension, Constant, Decorator, ElifElseClause, + ExceptHandler, Expr, Keyword, MatchCase, Mod, Operator, Parameter, ParameterWithDefault, + Parameters, Pattern, Stmt, TypeParam, TypeParamTypeVar, UnaryOp, WithItem, }; /// Visitor that traverses all nodes recursively in pre-order. @@ -56,16 +56,16 @@ pub trait PreorderVisitor<'a> { walk_format_spec(self, format_spec); } - fn visit_arguments(&mut self, arguments: &'a Arguments) { - walk_arguments(self, arguments); + fn visit_parameters(&mut self, parameters: &'a Parameters) { + walk_parameters(self, parameters); } - fn visit_arg(&mut self, arg: &'a Arg) { - walk_arg(self, arg); + fn visit_parameter(&mut self, arg: &'a Parameter) { + walk_parameter(self, arg); } - fn visit_arg_with_default(&mut self, arg_with_default: &'a ArgWithDefault) { - walk_arg_with_default(self, arg_with_default); + fn visit_parameter_with_default(&mut self, parameter_with_default: &'a ParameterWithDefault) { + walk_parameter_with_default(self, parameter_with_default); } fn visit_keyword(&mut self, keyword: &'a Keyword) { @@ -133,7 +133,7 @@ where }) => visitor.visit_expr(value), Stmt::FunctionDef(ast::StmtFunctionDef { - args, + parameters, body, decorator_list, returns, @@ -141,7 +141,7 @@ where .. }) | Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { - args, + parameters, body, decorator_list, returns, @@ -156,7 +156,7 @@ where visitor.visit_type_param(type_param); } - visitor.visit_arguments(args); + visitor.visit_parameters(parameters); for expr in returns { visitor.visit_annotation(expr); @@ -469,11 +469,11 @@ where } Expr::Lambda(ast::ExprLambda { - args, + parameters, body, range: _range, }) => { - visitor.visit_arguments(args); + visitor.visit_parameters(parameters); visitor.visit_expr(body); } @@ -749,42 +749,44 @@ pub fn walk_format_spec<'a, V: PreorderVisitor<'a> + ?Sized>( visitor.visit_expr(format_spec); } -pub fn walk_arguments<'a, V>(visitor: &mut V, arguments: &'a Arguments) +pub fn walk_parameters<'a, V>(visitor: &mut V, parameters: &'a Parameters) where V: PreorderVisitor<'a> + ?Sized, { - for arg in arguments.posonlyargs.iter().chain(&arguments.args) { - visitor.visit_arg_with_default(arg); + for arg in parameters.posonlyargs.iter().chain(¶meters.args) { + visitor.visit_parameter_with_default(arg); } - if let Some(arg) = &arguments.vararg { - visitor.visit_arg(arg); + if let Some(arg) = ¶meters.vararg { + visitor.visit_parameter(arg); } - for arg in &arguments.kwonlyargs { - visitor.visit_arg_with_default(arg); + for arg in ¶meters.kwonlyargs { + visitor.visit_parameter_with_default(arg); } - if let Some(arg) = &arguments.kwarg { - visitor.visit_arg(arg); + if let Some(arg) = ¶meters.kwarg { + visitor.visit_parameter(arg); } } -pub fn walk_arg<'a, V>(visitor: &mut V, arg: &'a Arg) +pub fn walk_parameter<'a, V>(visitor: &mut V, parameter: &'a Parameter) where V: PreorderVisitor<'a> + ?Sized, { - if let Some(expr) = &arg.annotation { + if let Some(expr) = ¶meter.annotation { visitor.visit_annotation(expr); } } -pub fn walk_arg_with_default<'a, V>(visitor: &mut V, arg_with_default: &'a ArgWithDefault) -where +pub fn walk_parameter_with_default<'a, V>( + visitor: &mut V, + parameter_with_default: &'a ParameterWithDefault, +) where V: PreorderVisitor<'a> + ?Sized, { - visitor.visit_arg(&arg_with_default.def); - if let Some(expr) = &arg_with_default.default { + visitor.visit_parameter(¶meter_with_default.def); + if let Some(expr) = ¶meter_with_default.default { visitor.visit_expr(expr); } } diff --git a/crates/ruff_python_ast/tests/preorder.rs b/crates/ruff_python_ast/tests/preorder.rs index a2bc08c42c..8c6cba2f30 100644 --- a/crates/ruff_python_ast/tests/preorder.rs +++ b/crates/ruff_python_ast/tests/preorder.rs @@ -4,13 +4,13 @@ use insta::assert_snapshot; use ruff_python_ast::node::AnyNodeRef; use ruff_python_ast::visitor::preorder::{ - walk_alias, walk_arg, walk_arguments, walk_comprehension, walk_except_handler, walk_expr, - walk_keyword, walk_match_case, walk_module, walk_pattern, walk_stmt, walk_type_param, + walk_alias, walk_comprehension, walk_except_handler, walk_expr, walk_keyword, walk_match_case, + walk_module, walk_parameter, walk_parameters, walk_pattern, walk_stmt, walk_type_param, walk_with_item, PreorderVisitor, }; use ruff_python_ast::{ - Alias, Arg, Arguments, BoolOp, CmpOp, Comprehension, Constant, ExceptHandler, Expr, Keyword, - MatchCase, Mod, Operator, Pattern, Stmt, TypeParam, UnaryOp, WithItem, + Alias, BoolOp, CmpOp, Comprehension, Constant, ExceptHandler, Expr, Keyword, MatchCase, Mod, + Operator, Parameter, Parameters, Pattern, Stmt, TypeParam, UnaryOp, WithItem, }; use ruff_python_parser::lexer::lex; use ruff_python_parser::{parse_tokens, Mode}; @@ -231,15 +231,15 @@ impl PreorderVisitor<'_> for RecordVisitor { self.exit_node(); } - fn visit_arguments(&mut self, arguments: &Arguments) { - self.enter_node(arguments); - walk_arguments(self, arguments); + fn visit_parameters(&mut self, parameters: &Parameters) { + self.enter_node(parameters); + walk_parameters(self, parameters); self.exit_node(); } - fn visit_arg(&mut self, arg: &Arg) { - self.enter_node(arg); - walk_arg(self, arg); + fn visit_parameter(&mut self, parameter: &Parameter) { + self.enter_node(parameter); + walk_parameter(self, parameter); self.exit_node(); } diff --git a/crates/ruff_python_ast/tests/snapshots/preorder__decorators.snap b/crates/ruff_python_ast/tests/snapshots/preorder__decorators.snap index fbecff6cd2..ff57b138de 100644 --- a/crates/ruff_python_ast/tests/snapshots/preorder__decorators.snap +++ b/crates/ruff_python_ast/tests/snapshots/preorder__decorators.snap @@ -5,7 +5,7 @@ expression: trace - ModModule - StmtFunctionDef - ExprName - - Arguments + - Parameters - StmtPass - StmtClassDef - ExprName diff --git a/crates/ruff_python_ast/tests/snapshots/preorder__function_arguments.snap b/crates/ruff_python_ast/tests/snapshots/preorder__function_arguments.snap index c41f0885a7..68d8454d1d 100644 --- a/crates/ruff_python_ast/tests/snapshots/preorder__function_arguments.snap +++ b/crates/ruff_python_ast/tests/snapshots/preorder__function_arguments.snap @@ -4,20 +4,20 @@ expression: trace --- - ModModule - StmtFunctionDef - - Arguments - - Arg - - Arg - - Arg - - Arg + - Parameters + - Parameter + - Parameter + - Parameter + - Parameter - ExprConstant - Int(20) - - Arg - - Arg + - Parameter + - Parameter - ExprConstant - Int(5) - - Arg + - Parameter - ExprConstant - Int(20) - - Arg + - Parameter - StmtPass diff --git a/crates/ruff_python_ast/tests/snapshots/preorder__function_positional_only_with_default.snap b/crates/ruff_python_ast/tests/snapshots/preorder__function_positional_only_with_default.snap index c22624ef9d..2c9ace59af 100644 --- a/crates/ruff_python_ast/tests/snapshots/preorder__function_positional_only_with_default.snap +++ b/crates/ruff_python_ast/tests/snapshots/preorder__function_positional_only_with_default.snap @@ -4,14 +4,14 @@ expression: trace --- - ModModule - StmtFunctionDef - - Arguments - - Arg - - Arg + - Parameters + - Parameter + - Parameter - ExprConstant - Int(34) - - Arg + - Parameter - ExprConstant - Int(20) - - Arg + - Parameter - StmtPass diff --git a/crates/ruff_python_ast/tests/snapshots/preorder__function_type_parameters.snap b/crates/ruff_python_ast/tests/snapshots/preorder__function_type_parameters.snap index 06ef9c2624..c221faf049 100644 --- a/crates/ruff_python_ast/tests/snapshots/preorder__function_type_parameters.snap +++ b/crates/ruff_python_ast/tests/snapshots/preorder__function_type_parameters.snap @@ -9,7 +9,7 @@ expression: trace - TypeParamTypeVar - TypeParamTypeVarTuple - TypeParamParamSpec - - Arguments + - Parameters - StmtExpr - ExprConstant - Ellipsis diff --git a/crates/ruff_python_ast/tests/snapshots/visitor__decorators.snap b/crates/ruff_python_ast/tests/snapshots/visitor__decorators.snap index 76fe2a083e..c633132e04 100644 --- a/crates/ruff_python_ast/tests/snapshots/visitor__decorators.snap +++ b/crates/ruff_python_ast/tests/snapshots/visitor__decorators.snap @@ -4,7 +4,7 @@ expression: trace --- - StmtFunctionDef - ExprName - - Arguments + - Parameters - StmtPass - StmtClassDef - ExprName diff --git a/crates/ruff_python_ast/tests/snapshots/visitor__function_arguments.snap b/crates/ruff_python_ast/tests/snapshots/visitor__function_arguments.snap index a7c3015476..aaab46e7da 100644 --- a/crates/ruff_python_ast/tests/snapshots/visitor__function_arguments.snap +++ b/crates/ruff_python_ast/tests/snapshots/visitor__function_arguments.snap @@ -3,17 +3,17 @@ source: crates/ruff_python_ast/tests/visitor.rs expression: trace --- - StmtFunctionDef - - Arguments + - Parameters - ExprConstant - ExprConstant - ExprConstant - - Arg - - Arg - - Arg - - Arg - - Arg - - Arg - - Arg - - Arg + - Parameter + - Parameter + - Parameter + - Parameter + - Parameter + - Parameter + - Parameter + - Parameter - StmtPass diff --git a/crates/ruff_python_ast/tests/snapshots/visitor__function_positional_only_with_default.snap b/crates/ruff_python_ast/tests/snapshots/visitor__function_positional_only_with_default.snap index 98a729f362..a53646e207 100644 --- a/crates/ruff_python_ast/tests/snapshots/visitor__function_positional_only_with_default.snap +++ b/crates/ruff_python_ast/tests/snapshots/visitor__function_positional_only_with_default.snap @@ -3,12 +3,12 @@ source: crates/ruff_python_ast/tests/visitor.rs expression: trace --- - StmtFunctionDef - - Arguments + - Parameters - ExprConstant - ExprConstant - - Arg - - Arg - - Arg - - Arg + - Parameter + - Parameter + - Parameter + - Parameter - StmtPass diff --git a/crates/ruff_python_ast/tests/snapshots/visitor__function_type_parameters.snap b/crates/ruff_python_ast/tests/snapshots/visitor__function_type_parameters.snap index d0ef547f65..b0bbf8f550 100644 --- a/crates/ruff_python_ast/tests/snapshots/visitor__function_type_parameters.snap +++ b/crates/ruff_python_ast/tests/snapshots/visitor__function_type_parameters.snap @@ -8,7 +8,7 @@ expression: trace - TypeParamTypeVar - TypeParamTypeVarTuple - TypeParamParamSpec - - Arguments + - Parameters - StmtExpr - ExprConstant diff --git a/crates/ruff_python_ast/tests/visitor.rs b/crates/ruff_python_ast/tests/visitor.rs index 11f19579cf..b44cf55ce0 100644 --- a/crates/ruff_python_ast/tests/visitor.rs +++ b/crates/ruff_python_ast/tests/visitor.rs @@ -7,13 +7,13 @@ use ruff_python_parser::{parse_tokens, Mode}; use ruff_python_ast::node::AnyNodeRef; use ruff_python_ast::visitor::{ - walk_alias, walk_arg, walk_arguments, walk_comprehension, walk_except_handler, walk_expr, - walk_keyword, walk_match_case, walk_pattern, walk_stmt, walk_type_param, walk_with_item, + walk_alias, walk_comprehension, walk_except_handler, walk_expr, walk_keyword, walk_match_case, + walk_parameter, walk_parameters, walk_pattern, walk_stmt, walk_type_param, walk_with_item, Visitor, }; use ruff_python_ast::{ - Alias, Arg, Arguments, BoolOp, CmpOp, Comprehension, ExceptHandler, Expr, Keyword, MatchCase, - Operator, Pattern, Stmt, TypeParam, UnaryOp, WithItem, + Alias, BoolOp, CmpOp, Comprehension, ExceptHandler, Expr, Keyword, MatchCase, Operator, + Parameter, Parameters, Pattern, Stmt, TypeParam, UnaryOp, WithItem, }; #[test] @@ -234,15 +234,15 @@ impl Visitor<'_> for RecordVisitor { self.exit_node(); } - fn visit_arguments(&mut self, arguments: &Arguments) { - self.enter_node(arguments); - walk_arguments(self, arguments); + fn visit_parameters(&mut self, parameters: &Parameters) { + self.enter_node(parameters); + walk_parameters(self, parameters); self.exit_node(); } - fn visit_arg(&mut self, arg: &Arg) { - self.enter_node(arg); - walk_arg(self, arg); + fn visit_parameter(&mut self, parameter: &Parameter) { + self.enter_node(parameter); + walk_parameter(self, parameter); self.exit_node(); } diff --git a/crates/ruff_python_codegen/src/generator.rs b/crates/ruff_python_codegen/src/generator.rs index bec25bcf20..ce38ee9f6b 100644 --- a/crates/ruff_python_codegen/src/generator.rs +++ b/crates/ruff_python_codegen/src/generator.rs @@ -1,12 +1,12 @@ //! Generate Python source code from an abstract syntax tree (AST). -use ruff_python_ast::ArgWithDefault; +use ruff_python_ast::ParameterWithDefault; use std::ops::Deref; use ruff_python_ast::{ - self as ast, Alias, Arg, Arguments, BoolOp, CmpOp, Comprehension, Constant, ConversionFlag, - DebugText, ExceptHandler, Expr, Identifier, MatchCase, Operator, Pattern, Stmt, Suite, - TypeParam, TypeParamParamSpec, TypeParamTypeVar, TypeParamTypeVarTuple, WithItem, + self as ast, Alias, BoolOp, CmpOp, Comprehension, Constant, ConversionFlag, DebugText, + ExceptHandler, Expr, Identifier, MatchCase, Operator, Parameter, Parameters, Pattern, Stmt, + Suite, TypeParam, TypeParamParamSpec, TypeParamTypeVar, TypeParamTypeVarTuple, WithItem, }; use ruff_python_literal::escape::{AsciiEscape, Escape, UnicodeEscape}; @@ -205,7 +205,7 @@ impl<'a> Generator<'a> { match ast { Stmt::FunctionDef(ast::StmtFunctionDef { name, - args, + parameters, body, returns, decorator_list, @@ -224,7 +224,7 @@ impl<'a> Generator<'a> { self.p_id(name); self.unparse_type_params(type_params); self.p("("); - self.unparse_args(args); + self.unparse_parameters(parameters); self.p(")"); if let Some(returns) = returns { self.p(" -> "); @@ -239,7 +239,7 @@ impl<'a> Generator<'a> { } Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef { name, - args, + parameters, body, returns, decorator_list, @@ -258,7 +258,7 @@ impl<'a> Generator<'a> { self.p_id(name); self.unparse_type_params(type_params); self.p("("); - self.unparse_args(args); + self.unparse_parameters(parameters); self.p(")"); if let Some(returns) = returns { self.p(" -> "); @@ -985,14 +985,14 @@ impl<'a> Generator<'a> { }); } Expr::Lambda(ast::ExprLambda { - args, + parameters, body, range: _range, }) => { group_if!(precedence::LAMBDA, { - let npos = args.args.len() + args.posonlyargs.len(); + let npos = parameters.args.len() + parameters.posonlyargs.len(); self.p(if npos > 0 { "lambda " } else { "lambda" }); - self.unparse_args(args); + self.unparse_parameters(parameters); self.p(": "); self.unparse_expr(body, precedence::LAMBDA); }); @@ -1324,42 +1324,47 @@ impl<'a> Generator<'a> { } } - fn unparse_args(&mut self, args: &Arguments) { + fn unparse_parameters(&mut self, parameters: &Parameters) { let mut first = true; - for (i, arg_with_default) in args.posonlyargs.iter().chain(&args.args).enumerate() { + for (i, parameter_with_default) in parameters + .posonlyargs + .iter() + .chain(¶meters.args) + .enumerate() + { self.p_delim(&mut first, ", "); - self.unparse_arg_with_default(arg_with_default); - self.p_if(i + 1 == args.posonlyargs.len(), ", /"); + self.unparse_parameter_with_default(parameter_with_default); + self.p_if(i + 1 == parameters.posonlyargs.len(), ", /"); } - if args.vararg.is_some() || !args.kwonlyargs.is_empty() { + if parameters.vararg.is_some() || !parameters.kwonlyargs.is_empty() { self.p_delim(&mut first, ", "); self.p("*"); } - if let Some(vararg) = &args.vararg { - self.unparse_arg(vararg); + if let Some(vararg) = ¶meters.vararg { + self.unparse_parameter(vararg); } - for kwarg in &args.kwonlyargs { + for kwarg in ¶meters.kwonlyargs { self.p_delim(&mut first, ", "); - self.unparse_arg_with_default(kwarg); + self.unparse_parameter_with_default(kwarg); } - if let Some(kwarg) = &args.kwarg { + if let Some(kwarg) = ¶meters.kwarg { self.p_delim(&mut first, ", "); self.p("**"); - self.unparse_arg(kwarg); + self.unparse_parameter(kwarg); } } - fn unparse_arg(&mut self, arg: &Arg) { - self.p_id(&arg.arg); - if let Some(ann) = &arg.annotation { + fn unparse_parameter(&mut self, parameter: &Parameter) { + self.p_id(¶meter.arg); + if let Some(ann) = ¶meter.annotation { self.p(": "); self.unparse_expr(ann, precedence::COMMA); } } - fn unparse_arg_with_default(&mut self, arg_with_default: &ArgWithDefault) { - self.unparse_arg(&arg_with_default.def); - if let Some(default) = &arg_with_default.default { + fn unparse_parameter_with_default(&mut self, parameter_with_default: &ParameterWithDefault) { + self.unparse_parameter(¶meter_with_default.def); + if let Some(default) = ¶meter_with_default.default { self.p("="); self.unparse_expr(default, precedence::COMMA); } diff --git a/crates/ruff_python_formatter/src/comments/placement.rs b/crates/ruff_python_formatter/src/comments/placement.rs index f2844b563d..5c2ef1698d 100644 --- a/crates/ruff_python_formatter/src/comments/placement.rs +++ b/crates/ruff_python_formatter/src/comments/placement.rs @@ -1,8 +1,8 @@ use std::cmp::Ordering; use ruff_python_ast::{ - self as ast, Arguments, Comprehension, Expr, ExprAttribute, ExprBinOp, ExprIfExp, ExprSlice, - ExprStarred, MatchCase, Ranged, + self as ast, Comprehension, Expr, ExprAttribute, ExprBinOp, ExprIfExp, ExprSlice, ExprStarred, + MatchCase, Parameters, Ranged, }; use ruff_text_size::TextRange; @@ -15,7 +15,7 @@ use ruff_source_file::{Locator, UniversalNewlines}; use crate::comments::visitor::{CommentPlacement, DecoratedComment}; use crate::expression::expr_slice::{assign_comment_in_slice, ExprSliceCommentSection}; -use crate::other::arguments::{ +use crate::other::parameters::{ assign_argument_separator_comment_placement, find_argument_separators, }; @@ -44,8 +44,8 @@ pub(super) fn place_comment<'a>( // Change comment placement depending on the node type. These can be seen as node-specific // fixups. match comment.enclosing_node() { - AnyNodeRef::Arguments(arguments) => { - handle_arguments_separator_comment(comment, arguments, locator) + AnyNodeRef::Parameters(arguments) => { + handle_parameters_separator_comment(comment, arguments, locator) } AnyNodeRef::Comprehension(comprehension) => { handle_comprehension_comment(comment, comprehension, locator) @@ -559,16 +559,16 @@ fn handle_own_line_comment_after_branch<'a>( } } -/// Attaches comments for the positional only arguments separator `/` or the keywords only arguments -/// separator `*` as dangling comments to the enclosing [`Arguments`] node. +/// Attaches comments for the positional-only parameters separator `/` or the keywords-only +/// parameters separator `*` as dangling comments to the enclosing [`Parameters`] node. /// /// See [`assign_argument_separator_comment_placement`] -fn handle_arguments_separator_comment<'a>( +fn handle_parameters_separator_comment<'a>( comment: DecoratedComment<'a>, - arguments: &Arguments, + parameters: &Parameters, locator: &Locator, ) -> CommentPlacement<'a> { - let (slash, star) = find_argument_separators(locator.contents(), arguments); + let (slash, star) = find_argument_separators(locator.contents(), parameters); let comment_range = comment.slice().range(); let placement = assign_argument_separator_comment_placement( slash.as_ref(), @@ -832,11 +832,11 @@ fn handle_leading_function_with_decorators_comment(comment: DecoratedComment) -> .preceding_node() .is_some_and(|node| node.is_decorator()); - let is_following_arguments = comment + let is_following_parameters = comment .following_node() - .is_some_and(|node| node.is_arguments()); + .is_some_and(|node| node.is_parameters()); - if comment.line_position().is_own_line() && is_preceding_decorator && is_following_arguments { + if comment.line_position().is_own_line() && is_preceding_decorator && is_following_parameters { CommentPlacement::dangling(comment.enclosing_node(), comment) } else { CommentPlacement::Default(comment) diff --git a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__dangling_comment.snap b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__dangling_comment.snap index 58138c9524..f1b3403f32 100644 --- a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__dangling_comment.snap +++ b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__dangling_comment.snap @@ -4,7 +4,7 @@ expression: comments.debug(test_case.source_code) --- { Node { - kind: Arguments, + kind: Parameters, range: 9..39, source: `(⏎`, }: { diff --git a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__non_positional_arguments_slash_on_same_line.snap b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__non_positional_arguments_slash_on_same_line.snap index 6764fffaaa..ca9f11a24c 100644 --- a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__non_positional_arguments_slash_on_same_line.snap +++ b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__non_positional_arguments_slash_on_same_line.snap @@ -4,7 +4,7 @@ expression: comments.debug(test_case.source_code) --- { Node { - kind: Arguments, + kind: Parameters, range: 9..96, source: `(a=10,/, # trailing positio...t comment.⏎`, }: { @@ -19,7 +19,7 @@ expression: comments.debug(test_case.source_code) "trailing": [], }, Node { - kind: ArgWithDefault, + kind: ParameterWithDefault, range: 90..94, source: `b=20`, }: { diff --git a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__non_positional_arguments_with_defaults.snap b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__non_positional_arguments_with_defaults.snap index 6fa4a9c9d0..a7f9ec4064 100644 --- a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__non_positional_arguments_with_defaults.snap +++ b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__non_positional_arguments_with_defaults.snap @@ -4,7 +4,7 @@ expression: comments.debug(test_case.source_code) --- { Node { - kind: Arguments, + kind: Parameters, range: 9..179, source: `(⏎`, }: { @@ -24,7 +24,7 @@ expression: comments.debug(test_case.source_code) "trailing": [], }, Node { - kind: ArgWithDefault, + kind: ParameterWithDefault, range: 15..19, source: `a=10`, }: { @@ -39,7 +39,7 @@ expression: comments.debug(test_case.source_code) ], }, Node { - kind: ArgWithDefault, + kind: ParameterWithDefault, range: 173..177, source: `b=20`, }: { diff --git a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_comment.snap b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_comment.snap index aa1f34eb1f..a8a9305375 100644 --- a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_comment.snap +++ b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_comment.snap @@ -4,7 +4,7 @@ expression: comments.debug(test_case.source_code) --- { Node { - kind: Arguments, + kind: Parameters, range: 9..170, source: `(⏎`, }: { @@ -24,7 +24,7 @@ expression: comments.debug(test_case.source_code) "trailing": [], }, Node { - kind: ArgWithDefault, + kind: ParameterWithDefault, range: 15..16, source: `a`, }: { @@ -39,7 +39,7 @@ expression: comments.debug(test_case.source_code) ], }, Node { - kind: ArgWithDefault, + kind: ParameterWithDefault, range: 166..167, source: `b`, }: { diff --git a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_comment_without_following_node.snap b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_comment_without_following_node.snap index 2c93c46b00..9e9db25a5e 100644 --- a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_comment_without_following_node.snap +++ b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_comment_without_following_node.snap @@ -4,7 +4,7 @@ expression: comments.debug(test_case.source_code) --- { Node { - kind: Arguments, + kind: Parameters, range: 9..166, source: `(⏎`, }: { @@ -24,7 +24,7 @@ expression: comments.debug(test_case.source_code) "trailing": [], }, Node { - kind: ArgWithDefault, + kind: ParameterWithDefault, range: 15..16, source: `a`, }: { diff --git a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_leading_comma_comment.snap b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_leading_comma_comment.snap index aa1f34eb1f..a8a9305375 100644 --- a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_leading_comma_comment.snap +++ b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__positional_argument_only_leading_comma_comment.snap @@ -4,7 +4,7 @@ expression: comments.debug(test_case.source_code) --- { Node { - kind: Arguments, + kind: Parameters, range: 9..170, source: `(⏎`, }: { @@ -24,7 +24,7 @@ expression: comments.debug(test_case.source_code) "trailing": [], }, Node { - kind: ArgWithDefault, + kind: ParameterWithDefault, range: 15..16, source: `a`, }: { @@ -39,7 +39,7 @@ expression: comments.debug(test_case.source_code) ], }, Node { - kind: ArgWithDefault, + kind: ParameterWithDefault, range: 166..167, source: `b`, }: { diff --git a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__trailing_after_comma.snap b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__trailing_after_comma.snap index 5a2c922207..88f2be2c30 100644 --- a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__trailing_after_comma.snap +++ b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__trailing_after_comma.snap @@ -4,7 +4,7 @@ expression: comments.debug(test_case.source_code) --- { Node { - kind: ArgWithDefault, + kind: ParameterWithDefault, range: 15..16, source: `a`, }: { diff --git a/crates/ruff_python_formatter/src/comments/visitor.rs b/crates/ruff_python_formatter/src/comments/visitor.rs index a2be90c22d..81202c854f 100644 --- a/crates/ruff_python_formatter/src/comments/visitor.rs +++ b/crates/ruff_python_formatter/src/comments/visitor.rs @@ -1,8 +1,8 @@ use std::iter::Peekable; use ruff_python_ast::{ - Alias, Arg, ArgWithDefault, Arguments, Comprehension, Decorator, ElifElseClause, ExceptHandler, - Expr, Keyword, MatchCase, Mod, Pattern, Ranged, Stmt, TypeParam, WithItem, + Alias, Comprehension, Decorator, ElifElseClause, ExceptHandler, Expr, Keyword, MatchCase, Mod, + Parameter, ParameterWithDefault, Parameters, Pattern, Ranged, Stmt, TypeParam, WithItem, }; use ruff_text_size::{TextRange, TextSize}; @@ -229,25 +229,25 @@ impl<'ast> PreorderVisitor<'ast> for CommentsVisitor<'ast> { self.finish_node(format_spec); } - fn visit_arguments(&mut self, arguments: &'ast Arguments) { - if self.start_node(arguments).is_traverse() { - walk_arguments(self, arguments); + fn visit_parameters(&mut self, parameters: &'ast Parameters) { + if self.start_node(parameters).is_traverse() { + walk_parameters(self, parameters); } - self.finish_node(arguments); + self.finish_node(parameters); } - fn visit_arg(&mut self, arg: &'ast Arg) { + fn visit_parameter(&mut self, arg: &'ast Parameter) { if self.start_node(arg).is_traverse() { - walk_arg(self, arg); + walk_parameter(self, arg); } self.finish_node(arg); } - fn visit_arg_with_default(&mut self, arg_with_default: &'ast ArgWithDefault) { - if self.start_node(arg_with_default).is_traverse() { - walk_arg_with_default(self, arg_with_default); + fn visit_parameter_with_default(&mut self, parameter_with_default: &'ast ParameterWithDefault) { + if self.start_node(parameter_with_default).is_traverse() { + walk_parameter_with_default(self, parameter_with_default); } - self.finish_node(arg_with_default); + self.finish_node(parameter_with_default); } fn visit_keyword(&mut self, keyword: &'ast Keyword) { diff --git a/crates/ruff_python_formatter/src/expression/expr_lambda.rs b/crates/ruff_python_formatter/src/expression/expr_lambda.rs index 858b7fbeaf..9d16fae704 100644 --- a/crates/ruff_python_formatter/src/expression/expr_lambda.rs +++ b/crates/ruff_python_formatter/src/expression/expr_lambda.rs @@ -1,7 +1,7 @@ use crate::comments::dangling_node_comments; use crate::context::PyFormatContext; use crate::expression::parentheses::{NeedsParentheses, OptionalParentheses}; -use crate::other::arguments::ArgumentsParentheses; +use crate::other::parameters::ParametersParentheses; use crate::AsFormat; use crate::{FormatNodeRule, PyFormatter}; use ruff_formatter::prelude::{space, text}; @@ -16,18 +16,20 @@ impl FormatNodeRule for FormatExprLambda { fn fmt_fields(&self, item: &ExprLambda, f: &mut PyFormatter) -> FormatResult<()> { let ExprLambda { range: _, - args, + parameters, body, } = item; write!(f, [text("lambda")])?; - if !args.args.is_empty() { + if !parameters.args.is_empty() { write!( f, [ space(), - args.format().with_options(ArgumentsParentheses::Never), + parameters + .format() + .with_options(ParametersParentheses::Never), ] )?; } @@ -44,7 +46,7 @@ impl FormatNodeRule for FormatExprLambda { // lambda # Dangling // : 1 // ) - dangling_node_comments(args.as_ref()) + dangling_node_comments(parameters.as_ref()) ] ) } diff --git a/crates/ruff_python_formatter/src/generated.rs b/crates/ruff_python_formatter/src/generated.rs index b3c2508179..7c59811ea5 100644 --- a/crates/ruff_python_formatter/src/generated.rs +++ b/crates/ruff_python_formatter/src/generated.rs @@ -2617,95 +2617,108 @@ impl<'ast> IntoFormat> for ast::Comprehension { } } -impl FormatRule> for crate::other::arguments::FormatArguments { - #[inline] - fn fmt( - &self, - node: &ast::Arguments, - f: &mut Formatter>, - ) -> FormatResult<()> { - FormatNodeRule::::fmt(self, node, f) - } -} -impl<'ast> AsFormat> for ast::Arguments { - type Format<'a> = FormatRefWithRule< - 'a, - ast::Arguments, - crate::other::arguments::FormatArguments, - PyFormatContext<'ast>, - >; - fn format(&self) -> Self::Format<'_> { - FormatRefWithRule::new(self, crate::other::arguments::FormatArguments::default()) - } -} -impl<'ast> IntoFormat> for ast::Arguments { - type Format = FormatOwnedWithRule< - ast::Arguments, - crate::other::arguments::FormatArguments, - PyFormatContext<'ast>, - >; - fn into_format(self) -> Self::Format { - FormatOwnedWithRule::new(self, crate::other::arguments::FormatArguments::default()) - } -} - -impl FormatRule> for crate::other::arg::FormatArg { - #[inline] - fn fmt(&self, node: &ast::Arg, f: &mut Formatter>) -> FormatResult<()> { - FormatNodeRule::::fmt(self, node, f) - } -} -impl<'ast> AsFormat> for ast::Arg { - type Format<'a> = - FormatRefWithRule<'a, ast::Arg, crate::other::arg::FormatArg, PyFormatContext<'ast>>; - fn format(&self) -> Self::Format<'_> { - FormatRefWithRule::new(self, crate::other::arg::FormatArg::default()) - } -} -impl<'ast> IntoFormat> for ast::Arg { - type Format = - FormatOwnedWithRule>; - fn into_format(self) -> Self::Format { - FormatOwnedWithRule::new(self, crate::other::arg::FormatArg::default()) - } -} - -impl FormatRule> - for crate::other::arg_with_default::FormatArgWithDefault +impl FormatRule> + for crate::other::parameters::FormatParameters { #[inline] fn fmt( &self, - node: &ast::ArgWithDefault, + node: &ast::Parameters, f: &mut Formatter>, ) -> FormatResult<()> { - FormatNodeRule::::fmt(self, node, f) + FormatNodeRule::::fmt(self, node, f) } } -impl<'ast> AsFormat> for ast::ArgWithDefault { +impl<'ast> AsFormat> for ast::Parameters { type Format<'a> = FormatRefWithRule< 'a, - ast::ArgWithDefault, - crate::other::arg_with_default::FormatArgWithDefault, + ast::Parameters, + crate::other::parameters::FormatParameters, + PyFormatContext<'ast>, + >; + fn format(&self) -> Self::Format<'_> { + FormatRefWithRule::new(self, crate::other::parameters::FormatParameters::default()) + } +} +impl<'ast> IntoFormat> for ast::Parameters { + type Format = FormatOwnedWithRule< + ast::Parameters, + crate::other::parameters::FormatParameters, + PyFormatContext<'ast>, + >; + fn into_format(self) -> Self::Format { + FormatOwnedWithRule::new(self, crate::other::parameters::FormatParameters::default()) + } +} + +impl FormatRule> for crate::other::parameter::FormatParameter { + #[inline] + fn fmt( + &self, + node: &ast::Parameter, + f: &mut Formatter>, + ) -> FormatResult<()> { + FormatNodeRule::::fmt(self, node, f) + } +} +impl<'ast> AsFormat> for ast::Parameter { + type Format<'a> = FormatRefWithRule< + 'a, + ast::Parameter, + crate::other::parameter::FormatParameter, + PyFormatContext<'ast>, + >; + fn format(&self) -> Self::Format<'_> { + FormatRefWithRule::new(self, crate::other::parameter::FormatParameter::default()) + } +} +impl<'ast> IntoFormat> for ast::Parameter { + type Format = FormatOwnedWithRule< + ast::Parameter, + crate::other::parameter::FormatParameter, + PyFormatContext<'ast>, + >; + fn into_format(self) -> Self::Format { + FormatOwnedWithRule::new(self, crate::other::parameter::FormatParameter::default()) + } +} + +impl FormatRule> + for crate::other::parameter_with_default::FormatParameterWithDefault +{ + #[inline] + fn fmt( + &self, + node: &ast::ParameterWithDefault, + f: &mut Formatter>, + ) -> FormatResult<()> { + FormatNodeRule::::fmt(self, node, f) + } +} +impl<'ast> AsFormat> for ast::ParameterWithDefault { + type Format<'a> = FormatRefWithRule< + 'a, + ast::ParameterWithDefault, + crate::other::parameter_with_default::FormatParameterWithDefault, PyFormatContext<'ast>, >; fn format(&self) -> Self::Format<'_> { FormatRefWithRule::new( self, - crate::other::arg_with_default::FormatArgWithDefault::default(), + crate::other::parameter_with_default::FormatParameterWithDefault::default(), ) } } -impl<'ast> IntoFormat> for ast::ArgWithDefault { +impl<'ast> IntoFormat> for ast::ParameterWithDefault { type Format = FormatOwnedWithRule< - ast::ArgWithDefault, - crate::other::arg_with_default::FormatArgWithDefault, + ast::ParameterWithDefault, + crate::other::parameter_with_default::FormatParameterWithDefault, PyFormatContext<'ast>, >; fn into_format(self) -> Self::Format { FormatOwnedWithRule::new( self, - crate::other::arg_with_default::FormatArgWithDefault::default(), + crate::other::parameter_with_default::FormatParameterWithDefault::default(), ) } } diff --git a/crates/ruff_python_formatter/src/other/mod.rs b/crates/ruff_python_formatter/src/other/mod.rs index aedd4c6872..e6d87fe6cc 100644 --- a/crates/ruff_python_formatter/src/other/mod.rs +++ b/crates/ruff_python_formatter/src/other/mod.rs @@ -1,7 +1,4 @@ pub(crate) mod alias; -pub(crate) mod arg; -pub(crate) mod arg_with_default; -pub(crate) mod arguments; pub(crate) mod comprehension; pub(crate) mod decorator; pub(crate) mod elif_else_clause; @@ -9,4 +6,7 @@ pub(crate) mod except_handler_except_handler; pub(crate) mod identifier; pub(crate) mod keyword; pub(crate) mod match_case; +pub(crate) mod parameter; +pub(crate) mod parameter_with_default; +pub(crate) mod parameters; pub(crate) mod with_item; diff --git a/crates/ruff_python_formatter/src/other/arg.rs b/crates/ruff_python_formatter/src/other/parameter.rs similarity index 61% rename from crates/ruff_python_formatter/src/other/arg.rs rename to crates/ruff_python_formatter/src/other/parameter.rs index 934a24a69b..23c861a1de 100644 --- a/crates/ruff_python_formatter/src/other/arg.rs +++ b/crates/ruff_python_formatter/src/other/parameter.rs @@ -1,14 +1,14 @@ use crate::prelude::*; use crate::FormatNodeRule; use ruff_formatter::write; -use ruff_python_ast::Arg; +use ruff_python_ast::Parameter; #[derive(Default)] -pub struct FormatArg; +pub struct FormatParameter; -impl FormatNodeRule for FormatArg { - fn fmt_fields(&self, item: &Arg, f: &mut PyFormatter) -> FormatResult<()> { - let Arg { +impl FormatNodeRule for FormatParameter { + fn fmt_fields(&self, item: &Parameter, f: &mut PyFormatter) -> FormatResult<()> { + let Parameter { range: _, arg, annotation, diff --git a/crates/ruff_python_formatter/src/other/arg_with_default.rs b/crates/ruff_python_formatter/src/other/parameter_with_default.rs similarity index 60% rename from crates/ruff_python_formatter/src/other/arg_with_default.rs rename to crates/ruff_python_formatter/src/other/parameter_with_default.rs index 3864c06889..f33abd1bff 100644 --- a/crates/ruff_python_formatter/src/other/arg_with_default.rs +++ b/crates/ruff_python_formatter/src/other/parameter_with_default.rs @@ -1,15 +1,15 @@ use ruff_formatter::write; -use ruff_python_ast::ArgWithDefault; +use ruff_python_ast::ParameterWithDefault; use crate::prelude::*; use crate::FormatNodeRule; #[derive(Default)] -pub struct FormatArgWithDefault; +pub struct FormatParameterWithDefault; -impl FormatNodeRule for FormatArgWithDefault { - fn fmt_fields(&self, item: &ArgWithDefault, f: &mut PyFormatter) -> FormatResult<()> { - let ArgWithDefault { +impl FormatNodeRule for FormatParameterWithDefault { + fn fmt_fields(&self, item: &ParameterWithDefault, f: &mut PyFormatter) -> FormatResult<()> { + let ParameterWithDefault { range: _, def, default, diff --git a/crates/ruff_python_formatter/src/other/arguments.rs b/crates/ruff_python_formatter/src/other/parameters.rs similarity index 80% rename from crates/ruff_python_formatter/src/other/arguments.rs rename to crates/ruff_python_formatter/src/other/parameters.rs index 9f90dfb25d..bad8751fb5 100644 --- a/crates/ruff_python_formatter/src/other/arguments.rs +++ b/crates/ruff_python_formatter/src/other/parameters.rs @@ -1,6 +1,6 @@ use std::usize; -use ruff_python_ast::{Arguments, Ranged}; +use ruff_python_ast::{Parameters, Ranged}; use ruff_text_size::{TextRange, TextSize}; use ruff_formatter::{format_args, write, FormatRuleWithOptions}; @@ -17,14 +17,14 @@ use crate::prelude::*; use crate::FormatNodeRule; #[derive(Eq, PartialEq, Debug, Default)] -pub enum ArgumentsParentheses { - /// By default, arguments will always preserve their surrounding parentheses. +pub enum ParametersParentheses { + /// By default, parameters will always preserve their surrounding parentheses. #[default] Preserve, /// Handle special cases where parentheses should never be used. /// - /// An example where parentheses are never used for arguments would be with lambda + /// An example where parentheses are never used for parameters would be with lambda /// expressions. The following is invalid syntax: /// ```python /// lambda (x, y, z): ... @@ -37,12 +37,12 @@ pub enum ArgumentsParentheses { } #[derive(Default)] -pub struct FormatArguments { - parentheses: ArgumentsParentheses, +pub struct FormatParameters { + parentheses: ParametersParentheses, } -impl FormatRuleWithOptions> for FormatArguments { - type Options = ArgumentsParentheses; +impl FormatRuleWithOptions> for FormatParameters { + type Options = ParametersParentheses; fn with_options(mut self, options: Self::Options) -> Self { self.parentheses = options; @@ -50,9 +50,9 @@ impl FormatRuleWithOptions> for FormatArguments { } } -impl FormatNodeRule for FormatArguments { - fn fmt_fields(&self, item: &Arguments, f: &mut PyFormatter) -> FormatResult<()> { - let Arguments { +impl FormatNodeRule for FormatParameters { + fn fmt_fields(&self, item: &Parameters, f: &mut PyFormatter) -> FormatResult<()> { + let Parameters { range: _, posonlyargs, args, @@ -70,10 +70,10 @@ impl FormatNodeRule for FormatArguments { let mut joiner = f.join_with(separator); let mut last_node: Option = None; - for arg_with_default in posonlyargs { - joiner.entry(&arg_with_default.format()); + for parameter_with_default in posonlyargs { + joiner.entry(¶meter_with_default.format()); - last_node = Some(arg_with_default.into()); + last_node = Some(parameter_with_default.into()); } let slash_comments_end = if posonlyargs.is_empty() { @@ -86,7 +86,7 @@ impl FormatNodeRule for FormatArguments { comment.slice().range(), comment.line_position(), ) - .expect("Unexpected dangling comment type in function arguments"); + .expect("Unexpected dangling comment type in function parameters"); matches!( assignment, ArgumentSeparatorCommentLocation::SlashLeading @@ -100,10 +100,10 @@ impl FormatNodeRule for FormatArguments { slash_comments_end }; - for arg_with_default in args { - joiner.entry(&arg_with_default.format()); + for parameter_with_default in args { + joiner.entry(¶meter_with_default.format()); - last_node = Some(arg_with_default.into()); + last_node = Some(parameter_with_default.into()); } // kw only args need either a `*args` ahead of them capturing all var args or a `*` @@ -139,10 +139,10 @@ impl FormatNodeRule for FormatArguments { }); } - for arg_with_default in kwonlyargs { - joiner.entry(&arg_with_default.format()); + for parameter_with_default in kwonlyargs { + joiner.entry(¶meter_with_default.format()); - last_node = Some(arg_with_default.into()); + last_node = Some(parameter_with_default.into()); } if let Some(kwarg) = kwarg { @@ -168,7 +168,7 @@ impl FormatNodeRule for FormatArguments { // # Never expands, the comma is always preserved // x2 = lambda y,: 1 // ``` - if self.parentheses == ArgumentsParentheses::Never { + if self.parentheses == ParametersParentheses::Never { // For lambdas (no parentheses), preserve the trailing comma. It doesn't // behave like a magic trailing comma, it's just preserved if has_trailing_comma(item, last_node, f.context().source()) { @@ -190,16 +190,16 @@ impl FormatNodeRule for FormatArguments { let mut f = WithNodeLevel::new(NodeLevel::ParenthesizedExpression, f); - let num_arguments = posonlyargs.len() + let num_parameters = posonlyargs.len() + args.len() + usize::from(vararg.is_some()) + kwonlyargs.len() + usize::from(kwarg.is_some()); - if self.parentheses == ArgumentsParentheses::Never { + if self.parentheses == ParametersParentheses::Never { write!(f, [group(&format_inner)]) - } else if num_arguments == 0 { - // No arguments, format any dangling comments between `()` + } else if num_parameters == 0 { + // No parameters, format any dangling comments between `()` write!( f, [ @@ -213,7 +213,7 @@ impl FormatNodeRule for FormatArguments { } } - fn fmt_dangling_comments(&self, _node: &Arguments, _f: &mut PyFormatter) -> FormatResult<()> { + fn fmt_dangling_comments(&self, _node: &Parameters, _f: &mut PyFormatter) -> FormatResult<()> { // Handled in `fmt_fields` Ok(()) } @@ -283,18 +283,18 @@ pub(crate) struct ArgumentSeparator { /// Returns slash and star pub(crate) fn find_argument_separators( contents: &str, - arguments: &Arguments, + parameters: &Parameters, ) -> (Option, Option) { // We only compute preceding_end and token location here since following_start depends on the // star location, but the star location depends on slash's position - let slash = if let Some(preceding_end) = arguments.posonlyargs.last().map(Ranged::end) { + let slash = if let Some(preceding_end) = parameters.posonlyargs.last().map(Ranged::end) { // ```text // def f(a1=1, a2=2, /, a3, a4): pass // ^^^^^^^^^^^ the range (defaults) // def f(a1, a2, /, a3, a4): pass // ^^^^^^^^^^^^ the range (no default) // ``` - let range = TextRange::new(preceding_end, arguments.end()); + let range = TextRange::new(preceding_end, parameters.end()); let mut tokens = SimpleTokenizer::new(contents, range).skip_trivia(); let comma = tokens @@ -312,22 +312,22 @@ pub(crate) fn find_argument_separators( }; // If we have a vararg we have a node that the comments attach to - let star = if arguments.vararg.is_some() { + let star = if parameters.vararg.is_some() { // When the vararg is present the comments attach there and we don't need to do manual // formatting None - } else if let Some(first_keyword_argument) = arguments.kwonlyargs.first() { + } else if let Some(first_keyword_argument) = parameters.kwonlyargs.first() { // Check in that order: // * `f(a, /, b, *, c)` and `f(a=1, /, b=2, *, c)` // * `f(a, /, *, b)` // * `f(*, b)` (else branch) - let after_arguments = arguments + let after_parameters = parameters .args .last() .map(|arg| arg.range.end()) .or(slash.map(|(_, slash)| slash.end())); - if let Some(preceding_end) = after_arguments { - let range = TextRange::new(preceding_end, arguments.end()); + if let Some(preceding_end) = after_parameters { + let range = TextRange::new(preceding_end, parameters.end()); let mut tokens = SimpleTokenizer::new(contents, range).skip_trivia(); let comma = tokens @@ -345,7 +345,7 @@ pub(crate) fn find_argument_separators( following_start: first_keyword_argument.start(), }) } else { - let mut tokens = SimpleTokenizer::new(contents, arguments.range).skip_trivia(); + let mut tokens = SimpleTokenizer::new(contents, parameters.range).skip_trivia(); let lparen = tokens .next() @@ -356,7 +356,7 @@ pub(crate) fn find_argument_separators( .expect("The function definition can't end here"); debug_assert!(star.kind() == SimpleTokenKind::Star, "{star:?}"); Some(ArgumentSeparator { - preceding_end: arguments.range.start(), + preceding_end: parameters.range.start(), separator: star.range, following_start: first_keyword_argument.start(), }) @@ -371,13 +371,13 @@ pub(crate) fn find_argument_separators( // * `f(a, /, *b)` // * `f(a, /, *, b)` // * `f(a, /)` - let slash_following_start = arguments + let slash_following_start = parameters .args .first() .map(Ranged::start) - .or(arguments.vararg.as_ref().map(|first| first.start())) + .or(parameters.vararg.as_ref().map(|first| first.start())) .or(star.as_ref().map(|star| star.separator.start())) - .unwrap_or(arguments.end()); + .unwrap_or(parameters.end()); let slash = slash.map(|(preceding_end, slash)| ArgumentSeparator { preceding_end, separator: slash, @@ -387,13 +387,13 @@ pub(crate) fn find_argument_separators( (slash, star) } -/// Locates positional only arguments separator `/` or the keywords only arguments +/// Locates positional only parameters separator `/` or the keywords only parameters /// separator `*` comments. /// /// ```python /// def test( /// a, -/// # Positional only arguments after here +/// # Positional only parameters after here /// /, # trailing positional argument comment. /// b, /// ): @@ -403,7 +403,7 @@ pub(crate) fn find_argument_separators( /// ```python /// def f( /// a="", -/// # Keyword only arguments only after here +/// # Keyword only parameters only after here /// *, # trailing keyword argument comment. /// b="", /// ): @@ -439,43 +439,43 @@ pub(crate) fn find_argument_separators( /// /// ```text /// def f(a1, a2): pass -/// ^^^^^^ arguments (args) +/// ^^^^^^ parameters (args) /// ``` -/// Use a star to separate keyword only arguments: +/// Use a star to separate keyword only parameters: /// ```text /// def f(a1, a2, *, a3, a4): pass -/// ^^^^^^ arguments (args) -/// ^^^^^^ keyword only arguments (kwargs) +/// ^^^^^^ parameters (args) +/// ^^^^^^ keyword only parameters (kwargs) /// ``` -/// Use a slash to separate positional only arguments. Note that this changes the arguments left -/// of the slash while the star change the arguments right of it: +/// Use a slash to separate positional only parameters. Note that this changes the parameters left +/// of the slash while the star change the parameters right of it: /// ```text /// def f(a1, a2, /, a3, a4): pass -/// ^^^^^^ positional only arguments (posonlyargs) -/// ^^^^^^ arguments (args) +/// ^^^^^^ positional only parameters (posonlyargs) +/// ^^^^^^ parameters (args) /// ``` /// You can combine both: /// ```text /// def f(a1, a2, /, a3, a4, *, a5, a6): pass -/// ^^^^^^ positional only arguments (posonlyargs) -/// ^^^^^^ arguments (args) -/// ^^^^^^ keyword only arguments (kwargs) +/// ^^^^^^ positional only parameters (posonlyargs) +/// ^^^^^^ parameters (args) +/// ^^^^^^ keyword only parameters (kwargs) /// ``` /// They can all have defaults, meaning that the preceding node ends at the default instead of the /// argument itself: /// ```text /// def f(a1=1, a2=2, /, a3=3, a4=4, *, a5=5, a6=6): pass /// ^ ^ ^ ^ ^ ^ defaults -/// ^^^^^^^^^^ positional only arguments (posonlyargs) -/// ^^^^^^^^^^ arguments (args) -/// ^^^^^^^^^^ keyword only arguments (kwargs) +/// ^^^^^^^^^^ positional only parameters (posonlyargs) +/// ^^^^^^^^^^ parameters (args) +/// ^^^^^^^^^^ keyword only parameters (kwargs) /// ``` -/// An especially difficult case is having no regular arguments, so comments from both slash and +/// An especially difficult case is having no regular parameters, so comments from both slash and /// star will attach to either a2 or a3 and the next token is incorrect. /// ```text /// def f(a1, a2, /, *, a3, a4): pass -/// ^^^^^^ positional only arguments (posonlyargs) -/// ^^^^^^ keyword only arguments (kwargs) +/// ^^^^^^ positional only parameters (posonlyargs) +/// ^^^^^^ keyword only parameters (kwargs) /// ``` pub(crate) fn assign_argument_separator_comment_placement( slash: Option<&ArgumentSeparator>, @@ -583,27 +583,31 @@ pub(crate) enum ArgumentSeparatorCommentLocation { StarTrailing, } -fn has_trailing_comma(arguments: &Arguments, last_node: Option, source: &str) -> bool { +fn has_trailing_comma( + parameters: &Parameters, + last_node: Option, + source: &str, +) -> bool { // No nodes, no trailing comma let Some(last_node) = last_node else { return false; }; - let ends_with_pos_only_argument_separator = !arguments.posonlyargs.is_empty() - && arguments.args.is_empty() - && arguments.vararg.is_none() - && arguments.kwonlyargs.is_empty() - && arguments.kwarg.is_none(); + let ends_with_pos_only_argument_separator = !parameters.posonlyargs.is_empty() + && parameters.args.is_empty() + && parameters.vararg.is_none() + && parameters.kwonlyargs.is_empty() + && parameters.kwarg.is_none(); let mut tokens = SimpleTokenizer::starts_at(last_node.end(), source).skip_trivia(); // `def a(b, c, /): ... ` // The slash lacks its own node if ends_with_pos_only_argument_separator { let comma = tokens.next(); - assert!(matches!(comma, Some(SimpleToken { kind: SimpleTokenKind::Comma, .. })), "The last positional only argument must be separated by a `,` from the positional only arguments separator `/` but found '{comma:?}'."); + assert!(matches!(comma, Some(SimpleToken { kind: SimpleTokenKind::Comma, .. })), "The last positional only argument must be separated by a `,` from the positional only parameters separator `/` but found '{comma:?}'."); let slash = tokens.next(); - assert!(matches!(slash, Some(SimpleToken { kind: SimpleTokenKind::Slash, .. })), "The positional argument separator must be present for a function that has positional only arguments but found '{slash:?}'."); + assert!(matches!(slash, Some(SimpleToken { kind: SimpleTokenKind::Slash, .. })), "The positional argument separator must be present for a function that has positional only parameters but found '{slash:?}'."); } tokens diff --git a/crates/ruff_python_parser/src/function.rs b/crates/ruff_python_parser/src/function.rs index c325855f52..93796404d3 100644 --- a/crates/ruff_python_parser/src/function.rs +++ b/crates/ruff_python_parser/src/function.rs @@ -12,7 +12,7 @@ pub(crate) struct ArgumentList { } // Perform validation of function/lambda arguments in a function definition. -pub(crate) fn validate_arguments(arguments: &ast::Arguments) -> Result<(), LexicalError> { +pub(crate) fn validate_arguments(arguments: &ast::Parameters) -> Result<(), LexicalError> { let mut all_arg_names = FxHashSet::with_capacity_and_hasher( arguments.posonlyargs.len() + arguments.args.len() @@ -26,8 +26,8 @@ pub(crate) fn validate_arguments(arguments: &ast::Arguments) -> Result<(), Lexic let args = arguments.args.iter(); let kwonlyargs = arguments.kwonlyargs.iter(); - let vararg: Option<&ast::Arg> = arguments.vararg.as_deref(); - let kwarg: Option<&ast::Arg> = arguments.kwarg.as_deref(); + let vararg: Option<&ast::Parameter> = arguments.vararg.as_deref(); + let kwarg: Option<&ast::Parameter> = arguments.kwarg.as_deref(); for arg in posonlyargs .chain(args) @@ -50,7 +50,10 @@ pub(crate) fn validate_arguments(arguments: &ast::Arguments) -> Result<(), Lexic } pub(crate) fn validate_pos_params( - args: &(Vec, Vec), + args: &( + Vec, + Vec, + ), ) -> Result<(), LexicalError> { let (posonlyargs, args) = args; #[allow(clippy::skip_while_next)] diff --git a/crates/ruff_python_parser/src/python.lalrpop b/crates/ruff_python_parser/src/python.lalrpop index 82677be7ca..6f1629fccc 100644 --- a/crates/ruff_python_parser/src/python.lalrpop +++ b/crates/ruff_python_parser/src/python.lalrpop @@ -1015,9 +1015,9 @@ FuncDef: ast::Stmt = { let returns = r.map(Box::new); let end_location = body.last().unwrap().end(); if is_async.is_some() { - ast::StmtAsyncFunctionDef { name, args, body, decorator_list, returns, type_params: type_params.unwrap_or_default(), range: (location..end_location).into() }.into() + ast::StmtAsyncFunctionDef { name, parameters:args, body, decorator_list, returns, type_params: type_params.unwrap_or_default(), range: (location..end_location).into() }.into() } else { - ast::StmtFunctionDef { name, args, body, decorator_list, returns, type_params: type_params.unwrap_or_default(), range: (location..end_location).into() }.into() + ast::StmtFunctionDef { name, parameters:args, body, decorator_list, returns, type_params: type_params.unwrap_or_default(), range: (location..end_location).into() }.into() } }, }; @@ -1041,13 +1041,13 @@ TypeAliasStatement: ast::Stmt = { }, }; -Parameters: ast::Arguments = { +Parameters: ast::Parameters = { "(" )?> ")" =>? { a.as_ref().map(validate_arguments).transpose()?; let range = (location..end_location).into(); let args = a - .map_or_else(|| ast::Arguments::empty(range), |mut arguments| { + .map_or_else(|| ast::Parameters::empty(range), |mut arguments| { arguments.range = range; arguments }); @@ -1058,15 +1058,15 @@ Parameters: ast::Arguments = { // Note that this is a macro which is used once for function defs, and // once for lambda defs. -ParameterList: ast::Arguments = { - > >)?> ","? =>? { +ParameterList: ast::Parameters = { + > >)?> ","? =>? { validate_pos_params(¶m1)?; let (posonlyargs, args) = param1; // Now gather rest of parameters: let (vararg, kwonlyargs, kwarg) = args2.unwrap_or((None, vec![], None)); - Ok(ast::Arguments { + Ok(ast::Parameters { posonlyargs, args, kwonlyargs, @@ -1075,7 +1075,7 @@ ParameterList: ast::Arguments = { range: (location..end_location).into() }) }, - > >)> ","? =>? { + > >)> ","? =>? { validate_pos_params(¶m1)?; let (posonlyargs, args) = param1; @@ -1084,7 +1084,7 @@ ParameterList: ast::Arguments = { let kwonlyargs = vec![]; let kwarg = kw; - Ok(ast::Arguments { + Ok(ast::Parameters { posonlyargs, args, kwonlyargs, @@ -1093,9 +1093,9 @@ ParameterList: ast::Arguments = { range: (location..end_location).into() }) }, - > ","? => { + > ","? => { let (vararg, kwonlyargs, kwarg) = params; - ast::Arguments { + ast::Parameters { posonlyargs: vec![], args: vec![], kwonlyargs, @@ -1104,8 +1104,8 @@ ParameterList: ast::Arguments = { range: (location..end_location).into() } }, - > ","? => { - ast::Arguments { + > ","? => { + ast::Parameters { posonlyargs: vec![], args: vec![], kwonlyargs: vec![], @@ -1118,61 +1118,61 @@ ParameterList: ast::Arguments = { // Use inline here to make sure the "," is not creating an ambiguity. #[inline] -ParameterDefs: (Vec, Vec) = { - >> => { +ParameterDefs: (Vec, Vec) = { + >> => { (vec![], args) }, - >> "," "/" >)*> => { + >> "," "/" >)*> => { (posonlyargs, args) }, }; -ParameterDef: ast::ArgWithDefault = { - => i, - "=" > => { +ParameterDef: ast::ParameterWithDefault = { + => i, + "=" > => { i.default = Some(Box::new(e)); i.range = (i.range.start()..end_location).into(); i }, }; -UntypedParameter: ast::ArgWithDefault = { +UntypedParameter: ast::ParameterWithDefault = { => { - let def = ast::Arg { arg, annotation: None, range: (location..end_location).into() }; - ast::ArgWithDefault { def, default: None, range: (location..end_location).into() } + let def = ast::Parameter { arg, annotation: None, range: (location..end_location).into() }; + ast::ParameterWithDefault { def, default: None, range: (location..end_location).into() } }, }; -StarUntypedParameter: ast::Arg = { - => ast::Arg { arg, annotation: None, range: (location..end_location).into() }, +StarUntypedParameter: ast::Parameter = { + => ast::Parameter { arg, annotation: None, range: (location..end_location).into() }, }; -TypedParameter: ast::ArgWithDefault = { +TypedParameter: ast::ParameterWithDefault = { >)?> => { let annotation = a.map(Box::new); - let def = ast::Arg { arg, annotation, range: (location..end_location).into() }; - ast::ArgWithDefault { def, default: None, range: (location..end_location).into() } + let def = ast::Parameter { arg, annotation, range: (location..end_location).into() }; + ast::ParameterWithDefault { def, default: None, range: (location..end_location).into() } }, }; -StarTypedParameter: ast::Arg = { +StarTypedParameter: ast::Parameter = { )?> => { let annotation = a.map(Box::new); - ast::Arg { arg, annotation, range: (location..end_location).into() } + ast::Parameter { arg, annotation, range: (location..end_location).into() } }, }; -DoubleStarTypedParameter: ast::Arg = { +DoubleStarTypedParameter: ast::Parameter = { >)?> => { let annotation = a.map(Box::new); - ast::Arg { arg, annotation, range: (location..end_location).into() } + ast::Parameter { arg, annotation, range: (location..end_location).into() } }, }; // Use inline here to make sure the "," is not creating an ambiguity. // TODO: figure out another grammar that makes this inline no longer required. #[inline] -ParameterListStarArgs: (Option>, Vec, Option>) = { - "*" >)*> >)?> =>? { +ParameterListStarArgs: (Option>, Vec, Option>) = { + "*" >)*> >)?> =>? { if va.is_none() && kwonlyargs.is_empty() && kwarg.is_none() { return Err(LexicalError { error: LexicalErrorType::OtherError("named arguments must follow bare *".to_string()), @@ -1187,8 +1187,8 @@ ParameterListStarArgs: (Option: Option> = { - "**" => { +KwargParameter: Option> = { + "**" => { kwarg.map(Box::new) } }; @@ -1291,11 +1291,11 @@ LambdaDef: ast::Expr = { "lambda" ?> ":" > =>? { p.as_ref().map(validate_arguments).transpose()?; let p = p - .unwrap_or_else(|| ast::Arguments::empty((location_args..end_location_args).into())); + .unwrap_or_else(|| ast::Parameters::empty((location_args..end_location_args).into())); Ok(ast::Expr::Lambda( ast::ExprLambda { - args: Box::new(p), + parameters: Box::new(p), body: Box::new(body), range: (location..end_location).into() } diff --git a/crates/ruff_python_parser/src/python.rs b/crates/ruff_python_parser/src/python.rs index b85ec359f4..9b09591e0b 100644 --- a/crates/ruff_python_parser/src/python.rs +++ b/crates/ruff_python_parser/src/python.rs @@ -1,5 +1,5 @@ // auto-generated: "lalrpop 0.20.0" -// sha3: 5eea4e365b6d7ea02f64f350bf973830a71442f4690d98e9a286c2a03b5260cc +// sha3: 9d48ea8f9d9a0a466240b3334066323fb9659fd9efe31f8748e4b940cd71b5e1 use num_bigint::BigInt; use ruff_text_size::TextSize; use ruff_python_ast::{self as ast, Ranged, MagicKind}; @@ -53,12 +53,12 @@ mod __parse__Top { Variant7(core::option::Option), Variant8((token::Tok, ArgumentList, token::Tok)), Variant9(core::option::Option<(token::Tok, ArgumentList, token::Tok)>), - Variant10(Option>), - Variant11(core::option::Option>>), - Variant12(ast::ArgWithDefault), - Variant13(alloc::vec::Vec), - Variant14((Option>, Vec, Option>)), - Variant15(core::option::Option<(Option>, Vec, Option>)>), + Variant10(Option>), + Variant11(core::option::Option>>), + Variant12(ast::ParameterWithDefault), + Variant13(alloc::vec::Vec), + Variant14((Option>, Vec, Option>)), + Variant15(core::option::Option<(Option>, Vec, Option>)>), Variant16(ast::Expr), Variant17(core::option::Option), Variant18(alloc::vec::Vec), @@ -90,8 +90,8 @@ mod __parse__Top { Variant44(alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>), Variant45((ast::CmpOp, ast::Expr)), Variant46(alloc::vec::Vec<(ast::CmpOp, ast::Expr)>), - Variant47(ast::Arguments), - Variant48(core::option::Option), + Variant47(ast::Parameters), + Variant48(core::option::Option), Variant49(TextSize), Variant50(ast::Operator), Variant51(ArgumentList), @@ -107,8 +107,8 @@ mod __parse__Top { Variant61((ast::Expr, ast::Expr)), Variant62(Vec<(Option>, ast::Expr)>), Variant63(core::option::Option>, ast::Expr)>>), - Variant64(ast::Arg), - Variant65(core::option::Option), + Variant64(ast::Parameter), + Variant65(core::option::Option), Variant66(ast::ExceptHandler), Variant67(alloc::vec::Vec), Variant68(core::option::Option<(Option<(TextSize, TextSize, Option)>, ast::Expr)>), @@ -124,9 +124,9 @@ mod __parse__Top { Variant78(Vec), Variant79(Vec<(ast::Identifier, ast::Pattern)>), Variant80(Vec<(ast::Expr, ast::Pattern)>), - Variant81(Vec), + Variant81(Vec), Variant82(Vec), - Variant83((Vec, Vec)), + Variant83((Vec, Vec)), Variant84(core::option::Option), Variant85(ast::Comprehension), Variant86(alloc::vec::Vec), @@ -17606,16 +17606,6 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant14< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, (Option>, Vec, Option>), TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } fn __pop_Variant60< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -17626,6 +17616,16 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } + fn __pop_Variant14< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, (Option>, Vec, Option>), TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } fn __pop_Variant73< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -17679,7 +17679,7 @@ mod __parse__Top { fn __pop_Variant83< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, (Vec, Vec), TextSize) + ) -> (TextSize, (Vec, Vec), TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant83(__v), __r)) => (__l, __v, __r), @@ -17789,7 +17789,7 @@ mod __parse__Top { fn __pop_Variant10< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Option>, TextSize) + ) -> (TextSize, Option>, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant10(__v), __r)) => (__l, __v, __r), @@ -17876,16 +17876,6 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant81< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant81(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } fn __pop_Variant54< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -17916,6 +17906,16 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } + fn __pop_Variant81< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant81(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } fn __pop_Variant53< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -18006,16 +18006,6 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant13< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, alloc::vec::Vec, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } fn __pop_Variant86< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -18076,6 +18066,16 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } + fn __pop_Variant13< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, alloc::vec::Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant13(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } fn __pop_Variant37< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -18126,36 +18126,6 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant64< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, ast::Arg, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant64(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant12< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, ast::ArgWithDefault, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant47< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, ast::Arguments, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant47(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } fn __pop_Variant56< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -18266,6 +18236,36 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } + fn __pop_Variant64< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, ast::Parameter, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant64(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant12< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, ast::ParameterWithDefault, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant12(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant47< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, ast::Parameters, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant47(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } fn __pop_Variant36< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -18339,7 +18339,7 @@ mod __parse__Top { fn __pop_Variant15< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize) + ) -> (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r), @@ -18369,7 +18369,7 @@ mod __parse__Top { fn __pop_Variant11< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, core::option::Option>>, TextSize) + ) -> (TextSize, core::option::Option>>, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant11(__v), __r)) => (__l, __v, __r), @@ -18436,26 +18436,6 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant65< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, core::option::Option, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant65(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant48< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, core::option::Option, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant48(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } fn __pop_Variant17< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -18476,6 +18456,26 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } + fn __pop_Variant65< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, core::option::Option, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant65(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant48< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, core::option::Option, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant48(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } fn __pop_Variant84< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -33457,7 +33457,7 @@ fn __action161< (_, _, _): (TextSize, token::Tok, TextSize), (_, name, _): (TextSize, ast::Identifier, TextSize), (_, type_params, _): (TextSize, core::option::Option>, TextSize), - (_, args, _): (TextSize, ast::Arguments, TextSize), + (_, args, _): (TextSize, ast::Parameters, TextSize), (_, r, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), @@ -33468,9 +33468,9 @@ fn __action161< let returns = r.map(Box::new); let end_location = body.last().unwrap().end(); if is_async.is_some() { - ast::StmtAsyncFunctionDef { name, args, body, decorator_list, returns, type_params: type_params.unwrap_or_default(), range: (location..end_location).into() }.into() + ast::StmtAsyncFunctionDef { name, parameters:args, body, decorator_list, returns, type_params: type_params.unwrap_or_default(), range: (location..end_location).into() }.into() } else { - ast::StmtFunctionDef { name, args, body, decorator_list, returns, type_params: type_params.unwrap_or_default(), range: (location..end_location).into() }.into() + ast::StmtFunctionDef { name, parameters:args, body, decorator_list, returns, type_params: type_params.unwrap_or_default(), range: (location..end_location).into() }.into() } } } @@ -33523,17 +33523,17 @@ fn __action164< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, a, _): (TextSize, core::option::Option, TextSize), + (_, a, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { a.as_ref().map(validate_arguments).transpose()?; let range = (location..end_location).into(); let args = a - .map_or_else(|| ast::Arguments::empty(range), |mut arguments| { + .map_or_else(|| ast::Parameters::empty(range), |mut arguments| { arguments.range = range; arguments }); @@ -33550,11 +33550,11 @@ fn __action165< (_, location, _): (TextSize, TextSize, TextSize), (_, arg, _): (TextSize, ast::Identifier, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { { - let def = ast::Arg { arg, annotation: None, range: (location..end_location).into() }; - ast::ArgWithDefault { def, default: None, range: (location..end_location).into() } + let def = ast::Parameter { arg, annotation: None, range: (location..end_location).into() }; + ast::ParameterWithDefault { def, default: None, range: (location..end_location).into() } } } @@ -33566,9 +33566,9 @@ fn __action166< (_, location, _): (TextSize, TextSize, TextSize), (_, arg, _): (TextSize, ast::Identifier, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { - ast::Arg { arg, annotation: None, range: (location..end_location).into() } + ast::Parameter { arg, annotation: None, range: (location..end_location).into() } } #[allow(unused_variables)] @@ -33580,12 +33580,12 @@ fn __action167< (_, arg, _): (TextSize, ast::Identifier, TextSize), (_, a, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { { let annotation = a.map(Box::new); - let def = ast::Arg { arg, annotation, range: (location..end_location).into() }; - ast::ArgWithDefault { def, default: None, range: (location..end_location).into() } + let def = ast::Parameter { arg, annotation, range: (location..end_location).into() }; + ast::ParameterWithDefault { def, default: None, range: (location..end_location).into() } } } @@ -33598,11 +33598,11 @@ fn __action168< (_, arg, _): (TextSize, ast::Identifier, TextSize), (_, a, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { { let annotation = a.map(Box::new); - ast::Arg { arg, annotation, range: (location..end_location).into() } + ast::Parameter { arg, annotation, range: (location..end_location).into() } } } @@ -33615,11 +33615,11 @@ fn __action169< (_, arg, _): (TextSize, ast::Identifier, TextSize), (_, a, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { { let annotation = a.map(Box::new); - ast::Arg { arg, annotation, range: (location..end_location).into() } + ast::Parameter { arg, annotation, range: (location..end_location).into() } } } @@ -33835,7 +33835,7 @@ fn __action181< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, location_args, _): (TextSize, TextSize, TextSize), - (_, p, _): (TextSize, core::option::Option, TextSize), + (_, p, _): (TextSize, core::option::Option, TextSize), (_, end_location_args, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Expr, TextSize), @@ -33845,11 +33845,11 @@ fn __action181< { p.as_ref().map(validate_arguments).transpose()?; let p = p - .unwrap_or_else(|| ast::Arguments::empty((location_args..end_location_args).into())); + .unwrap_or_else(|| ast::Parameters::empty((location_args..end_location_args).into())); Ok(ast::Expr::Lambda( ast::ExprLambda { - args: Box::new(p), + parameters: Box::new(p), body: Box::new(body), range: (location..end_location).into() } @@ -34864,8 +34864,8 @@ fn __action257< fn __action258< >( mode: Mode, - (_, __0, _): (TextSize, ast::Arguments, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::Parameters, TextSize), +) -> core::option::Option { Some(__0) } @@ -34877,7 +34877,7 @@ fn __action259< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -34888,11 +34888,11 @@ fn __action260< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, param1, _): (TextSize, (Vec, Vec), TextSize), - (_, args2, _): (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + (_, param1, _): (TextSize, (Vec, Vec), TextSize), + (_, args2, _): (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { validate_pos_params(¶m1)?; @@ -34901,7 +34901,7 @@ fn __action260< // Now gather rest of parameters: let (vararg, kwonlyargs, kwarg) = args2.unwrap_or((None, vec![], None)); - Ok(ast::Arguments { + Ok(ast::Parameters { posonlyargs, args, kwonlyargs, @@ -34918,11 +34918,11 @@ fn __action261< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, param1, _): (TextSize, (Vec, Vec), TextSize), - (_, kw, _): (TextSize, Option>, TextSize), + (_, param1, _): (TextSize, (Vec, Vec), TextSize), + (_, kw, _): (TextSize, Option>, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { validate_pos_params(¶m1)?; @@ -34933,7 +34933,7 @@ fn __action261< let kwonlyargs = vec![]; let kwarg = kw; - Ok(ast::Arguments { + Ok(ast::Parameters { posonlyargs, args, kwonlyargs, @@ -34950,14 +34950,14 @@ fn __action262< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, params, _): (TextSize, (Option>, Vec, Option>), TextSize), + (_, params, _): (TextSize, (Option>, Vec, Option>), TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { { let (vararg, kwonlyargs, kwarg) = params; - ast::Arguments { + ast::Parameters { posonlyargs: vec![], args: vec![], kwonlyargs, @@ -34974,13 +34974,13 @@ fn __action263< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, kwarg, _): (TextSize, Option>, TextSize), + (_, kwarg, _): (TextSize, Option>, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { { - ast::Arguments { + ast::Parameters { posonlyargs: vec![], args: vec![], kwonlyargs: vec![], @@ -35129,8 +35129,8 @@ fn __action274< fn __action275< >( mode: Mode, - (_, __0, _): (TextSize, ast::Arguments, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::Parameters, TextSize), +) -> core::option::Option { Some(__0) } @@ -35142,7 +35142,7 @@ fn __action276< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -35152,8 +35152,8 @@ fn __action276< fn __action277< >( mode: Mode, - (_, __0, _): (TextSize, ast::Arguments, TextSize), -) -> ast::Arguments + (_, __0, _): (TextSize, ast::Parameters, TextSize), +) -> ast::Parameters { __0 } @@ -35164,11 +35164,11 @@ fn __action278< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, param1, _): (TextSize, (Vec, Vec), TextSize), - (_, args2, _): (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + (_, param1, _): (TextSize, (Vec, Vec), TextSize), + (_, args2, _): (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { validate_pos_params(¶m1)?; @@ -35177,7 +35177,7 @@ fn __action278< // Now gather rest of parameters: let (vararg, kwonlyargs, kwarg) = args2.unwrap_or((None, vec![], None)); - Ok(ast::Arguments { + Ok(ast::Parameters { posonlyargs, args, kwonlyargs, @@ -35194,11 +35194,11 @@ fn __action279< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, param1, _): (TextSize, (Vec, Vec), TextSize), - (_, kw, _): (TextSize, Option>, TextSize), + (_, param1, _): (TextSize, (Vec, Vec), TextSize), + (_, kw, _): (TextSize, Option>, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { validate_pos_params(¶m1)?; @@ -35209,7 +35209,7 @@ fn __action279< let kwonlyargs = vec![]; let kwarg = kw; - Ok(ast::Arguments { + Ok(ast::Parameters { posonlyargs, args, kwonlyargs, @@ -35226,14 +35226,14 @@ fn __action280< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, params, _): (TextSize, (Option>, Vec, Option>), TextSize), + (_, params, _): (TextSize, (Option>, Vec, Option>), TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { { let (vararg, kwonlyargs, kwarg) = params; - ast::Arguments { + ast::Parameters { posonlyargs: vec![], args: vec![], kwonlyargs, @@ -35250,13 +35250,13 @@ fn __action281< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, kwarg, _): (TextSize, Option>, TextSize), + (_, kwarg, _): (TextSize, Option>, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { { - ast::Arguments { + ast::Parameters { posonlyargs: vec![], args: vec![], kwonlyargs: vec![], @@ -36873,8 +36873,8 @@ fn __action411< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, Option>, TextSize), -) -> Option> + (_, __0, _): (TextSize, Option>, TextSize), +) -> Option> { __0 } @@ -36885,8 +36885,8 @@ fn __action412< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, kwarg, _): (TextSize, core::option::Option, TextSize), -) -> Option> + (_, kwarg, _): (TextSize, core::option::Option, TextSize), +) -> Option> { { kwarg.map(Box::new) @@ -36898,8 +36898,8 @@ fn __action412< fn __action413< >( mode: Mode, - (_, __0, _): (TextSize, (Option>, Vec, Option>), TextSize), -) -> core::option::Option<(Option>, Vec, Option>)> + (_, __0, _): (TextSize, (Option>, Vec, Option>), TextSize), +) -> core::option::Option<(Option>, Vec, Option>)> { Some(__0) } @@ -36911,7 +36911,7 @@ fn __action414< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option<(Option>, Vec, Option>)> +) -> core::option::Option<(Option>, Vec, Option>)> { None } @@ -36922,8 +36922,8 @@ fn __action415< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, (Option>, Vec, Option>), TextSize), -) -> (Option>, Vec, Option>) + (_, __0, _): (TextSize, (Option>, Vec, Option>), TextSize), +) -> (Option>, Vec, Option>) { __0 } @@ -36935,10 +36935,10 @@ fn __action416< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, va, _): (TextSize, core::option::Option, TextSize), - (_, kwonlyargs, _): (TextSize, alloc::vec::Vec, TextSize), - (_, kwarg, _): (TextSize, core::option::Option>>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + (_, va, _): (TextSize, core::option::Option, TextSize), + (_, kwonlyargs, _): (TextSize, alloc::vec::Vec, TextSize), + (_, kwarg, _): (TextSize, core::option::Option>>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { { if va.is_none() && kwonlyargs.is_empty() && kwarg.is_none() { @@ -36960,8 +36960,8 @@ fn __action416< fn __action417< >( mode: Mode, - (_, args, _): (TextSize, Vec, TextSize), -) -> (Vec, Vec) + (_, args, _): (TextSize, Vec, TextSize), +) -> (Vec, Vec) { { (vec![], args) @@ -36973,11 +36973,11 @@ fn __action417< fn __action418< >( mode: Mode, - (_, posonlyargs, _): (TextSize, Vec, TextSize), + (_, posonlyargs, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, args, _): (TextSize, alloc::vec::Vec, TextSize), -) -> (Vec, Vec) + (_, args, _): (TextSize, alloc::vec::Vec, TextSize), +) -> (Vec, Vec) { { (posonlyargs, args) @@ -36990,8 +36990,8 @@ fn __action419< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, Option>, TextSize), -) -> Option> + (_, __0, _): (TextSize, Option>, TextSize), +) -> Option> { __0 } @@ -37002,8 +37002,8 @@ fn __action420< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, kwarg, _): (TextSize, core::option::Option, TextSize), -) -> Option> + (_, kwarg, _): (TextSize, core::option::Option, TextSize), +) -> Option> { { kwarg.map(Box::new) @@ -37015,8 +37015,8 @@ fn __action420< fn __action421< >( mode: Mode, - (_, __0, _): (TextSize, (Option>, Vec, Option>), TextSize), -) -> core::option::Option<(Option>, Vec, Option>)> + (_, __0, _): (TextSize, (Option>, Vec, Option>), TextSize), +) -> core::option::Option<(Option>, Vec, Option>)> { Some(__0) } @@ -37028,7 +37028,7 @@ fn __action422< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option<(Option>, Vec, Option>)> +) -> core::option::Option<(Option>, Vec, Option>)> { None } @@ -37039,8 +37039,8 @@ fn __action423< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, (Option>, Vec, Option>), TextSize), -) -> (Option>, Vec, Option>) + (_, __0, _): (TextSize, (Option>, Vec, Option>), TextSize), +) -> (Option>, Vec, Option>) { __0 } @@ -37052,10 +37052,10 @@ fn __action424< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, va, _): (TextSize, core::option::Option, TextSize), - (_, kwonlyargs, _): (TextSize, alloc::vec::Vec, TextSize), - (_, kwarg, _): (TextSize, core::option::Option>>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + (_, va, _): (TextSize, core::option::Option, TextSize), + (_, kwonlyargs, _): (TextSize, alloc::vec::Vec, TextSize), + (_, kwarg, _): (TextSize, core::option::Option>>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { { if va.is_none() && kwonlyargs.is_empty() && kwarg.is_none() { @@ -37077,8 +37077,8 @@ fn __action424< fn __action425< >( mode: Mode, - (_, args, _): (TextSize, Vec, TextSize), -) -> (Vec, Vec) + (_, args, _): (TextSize, Vec, TextSize), +) -> (Vec, Vec) { { (vec![], args) @@ -37090,11 +37090,11 @@ fn __action425< fn __action426< >( mode: Mode, - (_, posonlyargs, _): (TextSize, Vec, TextSize), + (_, posonlyargs, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, args, _): (TextSize, alloc::vec::Vec, TextSize), -) -> (Vec, Vec) + (_, args, _): (TextSize, alloc::vec::Vec, TextSize), +) -> (Vec, Vec) { { (posonlyargs, args) @@ -37420,8 +37420,8 @@ fn __action451< fn __action452< >( mode: Mode, - (_, e, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> Vec { vec![e] } @@ -37431,10 +37431,10 @@ fn __action452< fn __action453< >( mode: Mode, - (_, mut v, _): (TextSize, Vec, TextSize), + (_, mut v, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> Vec { { v.push(e); @@ -37447,8 +37447,8 @@ fn __action453< fn __action454< >( mode: Mode, - (_, __0, _): (TextSize, Option>, TextSize), -) -> core::option::Option>> + (_, __0, _): (TextSize, Option>, TextSize), +) -> core::option::Option>> { Some(__0) } @@ -37460,7 +37460,7 @@ fn __action455< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option>> +) -> core::option::Option>> { None } @@ -37472,7 +37472,7 @@ fn __action456< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> alloc::vec::Vec +) -> alloc::vec::Vec { alloc::vec![] } @@ -37482,8 +37482,8 @@ fn __action456< fn __action457< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), +) -> alloc::vec::Vec { v } @@ -37494,8 +37494,8 @@ fn __action458< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> ast::ArgWithDefault + (_, __0, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> ast::ParameterWithDefault { __0 } @@ -37505,8 +37505,8 @@ fn __action458< fn __action459< >( mode: Mode, - (_, i, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> ast::ArgWithDefault + (_, i, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> ast::ParameterWithDefault { i } @@ -37516,11 +37516,11 @@ fn __action459< fn __action460< >( mode: Mode, - (_, mut i, _): (TextSize, ast::ArgWithDefault, TextSize), + (_, mut i, _): (TextSize, ast::ParameterWithDefault, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, e, _): (TextSize, ast::Expr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { { i.default = Some(Box::new(e)); @@ -37534,8 +37534,8 @@ fn __action460< fn __action461< >( mode: Mode, - (_, __0, _): (TextSize, ast::Arg, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::Parameter, TextSize), +) -> core::option::Option { Some(__0) } @@ -37547,7 +37547,7 @@ fn __action462< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -37557,8 +37557,8 @@ fn __action462< fn __action463< >( mode: Mode, - (_, e, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> Vec { vec![e] } @@ -37568,10 +37568,10 @@ fn __action463< fn __action464< >( mode: Mode, - (_, mut v, _): (TextSize, Vec, TextSize), + (_, mut v, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> Vec { { v.push(e); @@ -37584,8 +37584,8 @@ fn __action464< fn __action465< >( mode: Mode, - (_, __0, _): (TextSize, Option>, TextSize), -) -> core::option::Option>> + (_, __0, _): (TextSize, Option>, TextSize), +) -> core::option::Option>> { Some(__0) } @@ -37597,7 +37597,7 @@ fn __action466< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option>> +) -> core::option::Option>> { None } @@ -37609,7 +37609,7 @@ fn __action467< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> alloc::vec::Vec +) -> alloc::vec::Vec { alloc::vec![] } @@ -37619,8 +37619,8 @@ fn __action467< fn __action468< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), +) -> alloc::vec::Vec { v } @@ -37631,8 +37631,8 @@ fn __action469< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> ast::ArgWithDefault + (_, __0, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> ast::ParameterWithDefault { __0 } @@ -37642,8 +37642,8 @@ fn __action469< fn __action470< >( mode: Mode, - (_, i, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> ast::ArgWithDefault + (_, i, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> ast::ParameterWithDefault { i } @@ -37653,11 +37653,11 @@ fn __action470< fn __action471< >( mode: Mode, - (_, mut i, _): (TextSize, ast::ArgWithDefault, TextSize), + (_, mut i, _): (TextSize, ast::ParameterWithDefault, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, e, _): (TextSize, ast::Expr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { { i.default = Some(Box::new(e)); @@ -37671,8 +37671,8 @@ fn __action471< fn __action472< >( mode: Mode, - (_, __0, _): (TextSize, ast::Arg, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::Parameter, TextSize), +) -> core::option::Option { Some(__0) } @@ -37684,7 +37684,7 @@ fn __action473< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -37694,8 +37694,8 @@ fn __action473< fn __action474< >( mode: Mode, - (_, __0, _): (TextSize, ast::Arg, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::Parameter, TextSize), +) -> core::option::Option { Some(__0) } @@ -37707,7 +37707,7 @@ fn __action475< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -37777,8 +37777,8 @@ fn __action479< fn __action480< >( mode: Mode, - (_, __0, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> alloc::vec::Vec + (_, __0, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> alloc::vec::Vec { alloc::vec![__0] } @@ -37788,9 +37788,9 @@ fn __action480< fn __action481< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), - (_, e, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), + (_, e, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> alloc::vec::Vec { { let mut v = v; v.push(e); v } } @@ -37800,8 +37800,8 @@ fn __action481< fn __action482< >( mode: Mode, - (_, __0, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> alloc::vec::Vec + (_, __0, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> alloc::vec::Vec { alloc::vec![__0] } @@ -37811,9 +37811,9 @@ fn __action482< fn __action483< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), - (_, e, _): (TextSize, ast::ArgWithDefault, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), + (_, e, _): (TextSize, ast::ParameterWithDefault, TextSize), +) -> alloc::vec::Vec { { let mut v = v; v.push(e); v } } @@ -40505,11 +40505,11 @@ fn __action618< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), - __2: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + __1: (TextSize, (Vec, Vec), TextSize), + __2: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.0; let __end0 = __3.2; @@ -40534,10 +40534,10 @@ fn __action619< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), - __2: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + __1: (TextSize, (Vec, Vec), TextSize), + __2: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __3.0; @@ -40563,11 +40563,11 @@ fn __action620< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), - __2: (TextSize, Option>, TextSize), + __1: (TextSize, (Vec, Vec), TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.0; let __end0 = __3.2; @@ -40592,10 +40592,10 @@ fn __action621< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), - __2: (TextSize, Option>, TextSize), + __1: (TextSize, (Vec, Vec), TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __3.0; @@ -40621,10 +40621,10 @@ fn __action622< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Option>, Vec, Option>), TextSize), + __1: (TextSize, (Option>, Vec, Option>), TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __2.0; let __end0 = __2.2; @@ -40648,9 +40648,9 @@ fn __action623< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Option>, Vec, Option>), TextSize), + __1: (TextSize, (Option>, Vec, Option>), TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __1.2; let __end0 = __2.0; @@ -40675,10 +40675,10 @@ fn __action624< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Option>, TextSize), + __1: (TextSize, Option>, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __2.0; let __end0 = __2.2; @@ -40702,9 +40702,9 @@ fn __action625< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Option>, TextSize), + __1: (TextSize, Option>, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __1.2; let __end0 = __2.0; @@ -40729,11 +40729,11 @@ fn __action626< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), - __2: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + __1: (TextSize, (Vec, Vec), TextSize), + __2: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.0; let __end0 = __3.2; @@ -40758,10 +40758,10 @@ fn __action627< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), - __2: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + __1: (TextSize, (Vec, Vec), TextSize), + __2: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __3.0; @@ -40787,11 +40787,11 @@ fn __action628< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), - __2: (TextSize, Option>, TextSize), + __1: (TextSize, (Vec, Vec), TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.0; let __end0 = __3.2; @@ -40816,10 +40816,10 @@ fn __action629< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), - __2: (TextSize, Option>, TextSize), + __1: (TextSize, (Vec, Vec), TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __3.0; @@ -40845,10 +40845,10 @@ fn __action630< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Option>, Vec, Option>), TextSize), + __1: (TextSize, (Option>, Vec, Option>), TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __2.0; let __end0 = __2.2; @@ -40872,9 +40872,9 @@ fn __action631< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Option>, Vec, Option>), TextSize), + __1: (TextSize, (Option>, Vec, Option>), TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __1.2; let __end0 = __2.0; @@ -40899,10 +40899,10 @@ fn __action632< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Option>, TextSize), + __1: (TextSize, Option>, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __2.0; let __end0 = __2.2; @@ -40926,9 +40926,9 @@ fn __action633< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Option>, TextSize), + __1: (TextSize, Option>, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __1.2; let __end0 = __2.0; @@ -41654,7 +41654,7 @@ fn __action658< __3: (TextSize, token::Tok, TextSize), __4: (TextSize, ast::Identifier, TextSize), __5: (TextSize, core::option::Option>, TextSize), - __6: (TextSize, ast::Arguments, TextSize), + __6: (TextSize, ast::Parameters, TextSize), __7: (TextSize, core::option::Option, TextSize), __8: (TextSize, token::Tok, TextSize), __9: (TextSize, ast::Suite, TextSize), @@ -41692,7 +41692,7 @@ fn __action659< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, core::option::Option>, TextSize), - __5: (TextSize, ast::Arguments, TextSize), + __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, core::option::Option, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), @@ -41958,8 +41958,8 @@ fn __action667< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Option>, TextSize), -) -> core::option::Option>> + __1: (TextSize, Option>, TextSize), +) -> core::option::Option>> { let __start0 = __0.0; let __end0 = __1.2; @@ -41981,12 +41981,12 @@ fn __action668< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, (Vec, Vec), TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.0; let __end0 = __3.2; @@ -42012,11 +42012,11 @@ fn __action669< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, (Vec, Vec), TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.0; let __end0 = __3.2; @@ -42042,11 +42042,11 @@ fn __action670< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __5: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __4.0; let __end0 = __5.2; @@ -42073,9 +42073,9 @@ fn __action671< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __3.2; let __end0 = __3.2; @@ -42101,8 +42101,8 @@ fn __action672< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Option>, TextSize), -) -> core::option::Option>> + __1: (TextSize, Option>, TextSize), +) -> core::option::Option>> { let __start0 = __0.0; let __end0 = __1.2; @@ -42124,12 +42124,12 @@ fn __action673< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, (Vec, Vec), TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.0; let __end0 = __3.2; @@ -42155,11 +42155,11 @@ fn __action674< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, (Vec, Vec), TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.0; let __end0 = __3.2; @@ -42185,11 +42185,11 @@ fn __action675< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __5: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __4.0; let __end0 = __5.2; @@ -42216,9 +42216,9 @@ fn __action676< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __3.2; let __end0 = __3.2; @@ -42244,8 +42244,8 @@ fn __action677< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::ArgWithDefault, TextSize), -) -> alloc::vec::Vec + __1: (TextSize, ast::ParameterWithDefault, TextSize), +) -> alloc::vec::Vec { let __start0 = __0.0; let __end0 = __1.2; @@ -42266,10 +42266,10 @@ fn __action677< fn __action678< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::ArgWithDefault, TextSize), -) -> alloc::vec::Vec + __2: (TextSize, ast::ParameterWithDefault, TextSize), +) -> alloc::vec::Vec { let __start0 = __1.0; let __end0 = __2.2; @@ -42291,10 +42291,10 @@ fn __action678< fn __action679< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> (Vec, Vec) +) -> (Vec, Vec) { let __start0 = __2.2; let __end0 = __2.2; @@ -42318,11 +42318,11 @@ fn __action679< fn __action680< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> (Vec, Vec) + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> (Vec, Vec) { let __start0 = __3.0; let __end0 = __3.2; @@ -42347,10 +42347,10 @@ fn __action681< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), + __2: (TextSize, core::option::Option, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __2.2; let __end0 = __3.0; @@ -42378,11 +42378,11 @@ fn __action682< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __5: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __3.0; let __end0 = __3.2; @@ -42409,8 +42409,8 @@ fn __action683< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, core::option::Option, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __2.2; let __end0 = __2.2; @@ -42436,9 +42436,9 @@ fn __action684< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __3.0; let __end0 = __3.2; @@ -42462,8 +42462,8 @@ fn __action685< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::ArgWithDefault, TextSize), -) -> alloc::vec::Vec + __1: (TextSize, ast::ParameterWithDefault, TextSize), +) -> alloc::vec::Vec { let __start0 = __0.0; let __end0 = __1.2; @@ -42484,10 +42484,10 @@ fn __action685< fn __action686< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::ArgWithDefault, TextSize), -) -> alloc::vec::Vec + __2: (TextSize, ast::ParameterWithDefault, TextSize), +) -> alloc::vec::Vec { let __start0 = __1.0; let __end0 = __2.2; @@ -42509,10 +42509,10 @@ fn __action686< fn __action687< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> (Vec, Vec) +) -> (Vec, Vec) { let __start0 = __2.2; let __end0 = __2.2; @@ -42536,11 +42536,11 @@ fn __action687< fn __action688< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> (Vec, Vec) + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> (Vec, Vec) { let __start0 = __3.0; let __end0 = __3.2; @@ -42565,10 +42565,10 @@ fn __action689< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), + __2: (TextSize, core::option::Option, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __2.2; let __end0 = __3.0; @@ -42596,11 +42596,11 @@ fn __action690< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __5: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __3.0; let __end0 = __3.2; @@ -42627,8 +42627,8 @@ fn __action691< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, core::option::Option, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __2.2; let __end0 = __2.2; @@ -42654,9 +42654,9 @@ fn __action692< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __3.0; let __end0 = __3.2; @@ -42681,10 +42681,10 @@ fn __action693< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), + __2: (TextSize, ast::Parameter, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __2.0; let __end0 = __2.2; @@ -42711,8 +42711,8 @@ fn __action694< __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.2; let __end0 = __2.0; @@ -42739,11 +42739,11 @@ fn __action695< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __5: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __2.0; let __end0 = __2.2; @@ -42770,10 +42770,10 @@ fn __action696< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.2; let __end0 = __2.0; @@ -42801,8 +42801,8 @@ fn __action697< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __2.0; let __end0 = __2.2; @@ -42826,7 +42826,7 @@ fn __action698< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.2; let __end0 = __1.2; @@ -42851,9 +42851,9 @@ fn __action699< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __2.0; let __end0 = __2.2; @@ -42878,8 +42878,8 @@ fn __action700< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.2; let __end0 = __2.0; @@ -45329,7 +45329,7 @@ fn __action784< __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __0.0; let __end0 = __0.0; @@ -45851,7 +45851,7 @@ fn __action802< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, core::option::Option>, TextSize), - __5: (TextSize, ast::Arguments, TextSize), + __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, core::option::Option, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), @@ -45889,7 +45889,7 @@ fn __action803< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, core::option::Option>, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, core::option::Option, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), @@ -46444,7 +46444,7 @@ fn __action823< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, ast::Expr, TextSize), @@ -47453,11 +47453,11 @@ fn __action857< fn __action858< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), - __1: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + __0: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -47482,10 +47482,10 @@ fn __action858< fn __action859< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), - __1: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + __0: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -47509,12 +47509,12 @@ fn __action859< fn __action860< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -47540,11 +47540,11 @@ fn __action860< fn __action861< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -47569,10 +47569,10 @@ fn __action861< fn __action862< >( mode: Mode, - __0: (TextSize, (Option>, Vec, Option>), TextSize), + __0: (TextSize, (Option>, Vec, Option>), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __0.0; let __end0 = __0.0; @@ -47596,9 +47596,9 @@ fn __action862< fn __action863< >( mode: Mode, - __0: (TextSize, (Option>, Vec, Option>), TextSize), + __0: (TextSize, (Option>, Vec, Option>), TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __0.0; let __end0 = __0.0; @@ -47621,10 +47621,10 @@ fn __action863< fn __action864< >( mode: Mode, - __0: (TextSize, Option>, TextSize), + __0: (TextSize, Option>, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __0.0; let __end0 = __0.0; @@ -47648,9 +47648,9 @@ fn __action864< fn __action865< >( mode: Mode, - __0: (TextSize, Option>, TextSize), + __0: (TextSize, Option>, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __0.0; let __end0 = __0.0; @@ -47673,11 +47673,11 @@ fn __action865< fn __action866< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), - __1: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + __0: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -47702,10 +47702,10 @@ fn __action866< fn __action867< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), - __1: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), + __0: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, core::option::Option<(Option>, Vec, Option>)>, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -47729,12 +47729,12 @@ fn __action867< fn __action868< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -47760,11 +47760,11 @@ fn __action868< fn __action869< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -47789,10 +47789,10 @@ fn __action869< fn __action870< >( mode: Mode, - __0: (TextSize, (Option>, Vec, Option>), TextSize), + __0: (TextSize, (Option>, Vec, Option>), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __0.0; let __end0 = __0.0; @@ -47816,9 +47816,9 @@ fn __action870< fn __action871< >( mode: Mode, - __0: (TextSize, (Option>, Vec, Option>), TextSize), + __0: (TextSize, (Option>, Vec, Option>), TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __0.0; let __end0 = __0.0; @@ -47841,10 +47841,10 @@ fn __action871< fn __action872< >( mode: Mode, - __0: (TextSize, Option>, TextSize), + __0: (TextSize, Option>, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __0.0; let __end0 = __0.0; @@ -47868,9 +47868,9 @@ fn __action872< fn __action873< >( mode: Mode, - __0: (TextSize, Option>, TextSize), + __0: (TextSize, Option>, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __0.0; let __end0 = __0.0; @@ -47894,10 +47894,10 @@ fn __action874< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -47924,8 +47924,8 @@ fn __action875< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -47950,11 +47950,11 @@ fn __action876< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -47981,10 +47981,10 @@ fn __action877< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -48010,8 +48010,8 @@ fn __action878< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __1: (TextSize, ast::Parameter, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -48035,7 +48035,7 @@ fn __action879< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -48058,9 +48058,9 @@ fn __action880< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -48085,8 +48085,8 @@ fn __action881< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __1: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -48110,10 +48110,10 @@ fn __action882< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -48139,11 +48139,11 @@ fn __action883< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, core::option::Option, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -48170,8 +48170,8 @@ fn __action884< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __1: (TextSize, core::option::Option, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -48195,9 +48195,9 @@ fn __action885< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __1: (TextSize, core::option::Option, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __0.0; @@ -48222,10 +48222,10 @@ fn __action886< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -48854,7 +48854,7 @@ fn __action908< __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __0.0; let __end0 = __0.0; @@ -48880,7 +48880,7 @@ fn __action909< mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __0.0; let __end0 = __0.0; @@ -49519,7 +49519,7 @@ fn __action931< __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { let __start0 = __0.0; let __end0 = __0.0; @@ -49545,7 +49545,7 @@ fn __action932< mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { let __start0 = __0.0; let __end0 = __0.0; @@ -49962,10 +49962,10 @@ fn __action947< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), + __2: (TextSize, ast::Parameter, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __4.2; @@ -49992,8 +49992,8 @@ fn __action948< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __3.2; @@ -50018,11 +50018,11 @@ fn __action949< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __5: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __5.2; @@ -50049,10 +50049,10 @@ fn __action950< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __4.2; @@ -50078,8 +50078,8 @@ fn __action951< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __2.2; @@ -50103,7 +50103,7 @@ fn __action952< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __1.2; @@ -50126,9 +50126,9 @@ fn __action953< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __3.2; @@ -50153,8 +50153,8 @@ fn __action954< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __2.2; @@ -50177,12 +50177,12 @@ fn __action955< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -50209,10 +50209,10 @@ fn __action956< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -50237,13 +50237,13 @@ fn __action957< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __4.2; @@ -50270,12 +50270,12 @@ fn __action958< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -50301,10 +50301,10 @@ fn __action959< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __1.2; @@ -50330,7 +50330,7 @@ fn __action960< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -50353,11 +50353,11 @@ fn __action961< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -50382,10 +50382,10 @@ fn __action962< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __1.2; @@ -50409,11 +50409,11 @@ fn __action963< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -50439,9 +50439,9 @@ fn __action964< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -50465,12 +50465,12 @@ fn __action965< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __4.2; @@ -50496,11 +50496,11 @@ fn __action966< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -50525,9 +50525,9 @@ fn __action967< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __1.2; @@ -50551,7 +50551,7 @@ fn __action968< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -50573,10 +50573,10 @@ fn __action969< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -50600,9 +50600,9 @@ fn __action970< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __1.2; @@ -50626,10 +50626,10 @@ fn __action971< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), + __2: (TextSize, ast::Parameter, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __4.2; @@ -50656,8 +50656,8 @@ fn __action972< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __3.2; @@ -50682,11 +50682,11 @@ fn __action973< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __5: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __5.2; @@ -50713,10 +50713,10 @@ fn __action974< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __4.2; @@ -50742,8 +50742,8 @@ fn __action975< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __2.2; @@ -50767,7 +50767,7 @@ fn __action976< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __1.2; @@ -50790,9 +50790,9 @@ fn __action977< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __3.2; @@ -50817,8 +50817,8 @@ fn __action978< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __2.2; @@ -50840,15 +50840,15 @@ fn __action978< fn __action979< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __5.2; @@ -50875,14 +50875,14 @@ fn __action979< fn __action980< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __4.2; @@ -50908,16 +50908,16 @@ fn __action980< fn __action981< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __6.2; @@ -50945,15 +50945,15 @@ fn __action981< fn __action982< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __5.2; @@ -50980,13 +50980,13 @@ fn __action982< fn __action983< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __3.2; @@ -51011,12 +51011,12 @@ fn __action983< fn __action984< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __2.2; @@ -51040,14 +51040,14 @@ fn __action984< fn __action985< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __4.2; @@ -51073,13 +51073,13 @@ fn __action985< fn __action986< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __3.2; @@ -51104,10 +51104,10 @@ fn __action986< fn __action987< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -51131,14 +51131,14 @@ fn __action987< fn __action988< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __5.2; @@ -51164,13 +51164,13 @@ fn __action988< fn __action989< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __4.2; @@ -51195,15 +51195,15 @@ fn __action989< fn __action990< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __6.2; @@ -51230,14 +51230,14 @@ fn __action990< fn __action991< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __5.2; @@ -51263,12 +51263,12 @@ fn __action991< fn __action992< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __3.2; @@ -51292,11 +51292,11 @@ fn __action992< fn __action993< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __2.2; @@ -51319,13 +51319,13 @@ fn __action993< fn __action994< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __4.2; @@ -51350,12 +51350,12 @@ fn __action994< fn __action995< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __3.2; @@ -51379,9 +51379,9 @@ fn __action995< fn __action996< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -51405,8 +51405,8 @@ fn __action997< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), -) -> Option> + __1: (TextSize, ast::Parameter, TextSize), +) -> Option> { let __start0 = __1.0; let __end0 = __1.2; @@ -51428,7 +51428,7 @@ fn __action998< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> Option> +) -> Option> { let __start0 = __0.2; let __end0 = __0.2; @@ -51451,10 +51451,10 @@ fn __action999< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __1.2; @@ -51479,8 +51479,8 @@ fn __action1000< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.2; let __end0 = __1.0; @@ -51505,11 +51505,11 @@ fn __action1001< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __1.2; @@ -51534,10 +51534,10 @@ fn __action1002< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.2; let __end0 = __1.0; @@ -51563,8 +51563,8 @@ fn __action1003< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __1: (TextSize, ast::Parameter, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __1.2; @@ -51586,7 +51586,7 @@ fn __action1004< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.2; let __end0 = __0.2; @@ -51609,9 +51609,9 @@ fn __action1005< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __1.2; @@ -51634,8 +51634,8 @@ fn __action1006< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __1: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __0.2; let __end0 = __1.0; @@ -51660,10 +51660,10 @@ fn __action1007< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), + __2: (TextSize, ast::Parameter, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __4.2; @@ -51690,8 +51690,8 @@ fn __action1008< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __3.2; @@ -51716,11 +51716,11 @@ fn __action1009< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __5: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __5.2; @@ -51747,10 +51747,10 @@ fn __action1010< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __4.2; @@ -51776,8 +51776,8 @@ fn __action1011< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __2.2; @@ -51801,7 +51801,7 @@ fn __action1012< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __1.2; @@ -51824,9 +51824,9 @@ fn __action1013< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __3.2; @@ -51851,8 +51851,8 @@ fn __action1014< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; let __end0 = __2.2; @@ -51875,12 +51875,12 @@ fn __action1015< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -51907,10 +51907,10 @@ fn __action1016< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -51935,13 +51935,13 @@ fn __action1017< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __4.2; @@ -51968,12 +51968,12 @@ fn __action1018< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -51999,10 +51999,10 @@ fn __action1019< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __1.2; @@ -52028,7 +52028,7 @@ fn __action1020< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -52051,11 +52051,11 @@ fn __action1021< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -52080,10 +52080,10 @@ fn __action1022< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __1.2; @@ -52107,11 +52107,11 @@ fn __action1023< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -52137,9 +52137,9 @@ fn __action1024< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -52163,12 +52163,12 @@ fn __action1025< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __4.2; @@ -52194,11 +52194,11 @@ fn __action1026< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -52223,9 +52223,9 @@ fn __action1027< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __1.2; @@ -52249,7 +52249,7 @@ fn __action1028< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -52271,10 +52271,10 @@ fn __action1029< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -52298,9 +52298,9 @@ fn __action1030< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __1.2; @@ -52324,10 +52324,10 @@ fn __action1031< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), + __2: (TextSize, ast::Parameter, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __4.2; @@ -52354,8 +52354,8 @@ fn __action1032< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __3: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __3.2; @@ -52380,11 +52380,11 @@ fn __action1033< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __5: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __5.2; @@ -52411,10 +52411,10 @@ fn __action1034< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __4: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __4.2; @@ -52440,8 +52440,8 @@ fn __action1035< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __2.2; @@ -52465,7 +52465,7 @@ fn __action1036< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __1.2; @@ -52488,9 +52488,9 @@ fn __action1037< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Arg, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __3.2; @@ -52515,8 +52515,8 @@ fn __action1038< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; let __end0 = __2.2; @@ -52538,15 +52538,15 @@ fn __action1038< fn __action1039< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __5.2; @@ -52573,14 +52573,14 @@ fn __action1039< fn __action1040< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __4.2; @@ -52606,16 +52606,16 @@ fn __action1040< fn __action1041< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __6.2; @@ -52643,15 +52643,15 @@ fn __action1041< fn __action1042< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __5.2; @@ -52678,13 +52678,13 @@ fn __action1042< fn __action1043< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __3.2; @@ -52709,12 +52709,12 @@ fn __action1043< fn __action1044< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __2.2; @@ -52738,14 +52738,14 @@ fn __action1044< fn __action1045< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __4.2; @@ -52771,13 +52771,13 @@ fn __action1045< fn __action1046< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __3.2; @@ -52802,10 +52802,10 @@ fn __action1046< fn __action1047< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -52829,14 +52829,14 @@ fn __action1047< fn __action1048< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __5.2; @@ -52862,13 +52862,13 @@ fn __action1048< fn __action1049< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __4.2; @@ -52893,15 +52893,15 @@ fn __action1049< fn __action1050< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __6.2; @@ -52928,14 +52928,14 @@ fn __action1050< fn __action1051< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __5.2; @@ -52961,12 +52961,12 @@ fn __action1051< fn __action1052< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __3.2; @@ -52990,11 +52990,11 @@ fn __action1052< fn __action1053< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __2.2; @@ -53017,13 +53017,13 @@ fn __action1053< fn __action1054< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __4.2; @@ -53048,12 +53048,12 @@ fn __action1054< fn __action1055< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __3.2; @@ -53077,9 +53077,9 @@ fn __action1055< fn __action1056< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -53681,7 +53681,7 @@ fn __action1077< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, core::option::Option>, TextSize), - __5: (TextSize, ast::Arguments, TextSize), + __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Expr, TextSize), __8: (TextSize, token::Tok, TextSize), @@ -53720,7 +53720,7 @@ fn __action1078< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, core::option::Option>, TextSize), - __5: (TextSize, ast::Arguments, TextSize), + __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -53756,7 +53756,7 @@ fn __action1079< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, core::option::Option>, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Expr, TextSize), __7: (TextSize, token::Tok, TextSize), @@ -53793,7 +53793,7 @@ fn __action1080< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, core::option::Option>, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -53899,7 +53899,7 @@ fn __action1084< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Expr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __1.0; let __end0 = __2.2; @@ -53924,7 +53924,7 @@ fn __action1085< mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __0.2; let __end0 = __1.0; @@ -54003,7 +54003,7 @@ fn __action1088< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Expr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { let __start0 = __1.0; let __end0 = __2.2; @@ -54028,7 +54028,7 @@ fn __action1089< mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { let __start0 = __0.2; let __end0 = __1.0; @@ -54078,7 +54078,7 @@ fn __action1091< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Expr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __1.0; let __end0 = __2.2; @@ -54103,7 +54103,7 @@ fn __action1092< mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __0.2; let __end0 = __1.0; @@ -59272,7 +59272,7 @@ fn __action1274< __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Expr, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __2.2; let __end0 = __2.2; @@ -59297,7 +59297,7 @@ fn __action1275< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __0.2; let __end0 = __0.2; @@ -60101,7 +60101,7 @@ fn __action1307< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Expr, TextSize), ) -> Result> @@ -60852,10 +60852,10 @@ fn __action1335< fn __action1336< >( mode: Mode, - __0: (TextSize, ast::ArgWithDefault, TextSize), + __0: (TextSize, ast::ParameterWithDefault, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Expr, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { let __start0 = __2.2; let __end0 = __2.2; @@ -60879,10 +60879,10 @@ fn __action1336< fn __action1337< >( mode: Mode, - __0: (TextSize, ast::ArgWithDefault, TextSize), + __0: (TextSize, ast::ParameterWithDefault, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Expr, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { let __start0 = __2.2; let __end0 = __2.2; @@ -60906,14 +60906,14 @@ fn __action1337< fn __action1338< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __6.2; let __end0 = __6.2; @@ -60941,13 +60941,13 @@ fn __action1338< fn __action1339< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -60974,15 +60974,15 @@ fn __action1339< fn __action1340< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __7.2; let __end0 = __7.2; @@ -61011,14 +61011,14 @@ fn __action1340< fn __action1341< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __6.2; let __end0 = __6.2; @@ -61046,12 +61046,12 @@ fn __action1341< fn __action1342< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -61077,11 +61077,11 @@ fn __action1342< fn __action1343< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -61106,13 +61106,13 @@ fn __action1343< fn __action1344< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -61139,12 +61139,12 @@ fn __action1344< fn __action1345< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -61170,9 +61170,9 @@ fn __action1345< fn __action1346< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.2; let __end0 = __1.2; @@ -61195,13 +61195,13 @@ fn __action1346< fn __action1347< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -61228,12 +61228,12 @@ fn __action1347< fn __action1348< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result> + __4: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -61259,14 +61259,14 @@ fn __action1348< fn __action1349< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), -) -> Result> + __6: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __6.2; let __end0 = __6.2; @@ -61294,13 +61294,13 @@ fn __action1349< fn __action1350< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -61327,11 +61327,11 @@ fn __action1350< fn __action1351< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), -) -> Result> + __3: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -61356,10 +61356,10 @@ fn __action1351< fn __action1352< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -61383,12 +61383,12 @@ fn __action1352< fn __action1353< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -61414,11 +61414,11 @@ fn __action1353< fn __action1354< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -61443,8 +61443,8 @@ fn __action1354< fn __action1355< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), -) -> Result> + __0: (TextSize, (Vec, Vec), TextSize), +) -> Result> { let __start0 = __0.2; let __end0 = __0.2; @@ -61466,11 +61466,11 @@ fn __action1355< fn __action1356< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -61495,10 +61495,10 @@ fn __action1356< fn __action1357< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result> + __2: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -61523,11 +61523,11 @@ fn __action1358< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -61555,9 +61555,9 @@ fn __action1359< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -61583,12 +61583,12 @@ fn __action1360< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -61616,11 +61616,11 @@ fn __action1361< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -61647,9 +61647,9 @@ fn __action1362< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -61675,7 +61675,7 @@ fn __action1363< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.2; let __end0 = __1.2; @@ -61699,10 +61699,10 @@ fn __action1364< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -61728,9 +61728,9 @@ fn __action1365< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -61755,10 +61755,10 @@ fn __action1366< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result> + __3: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -61785,8 +61785,8 @@ fn __action1367< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result> + __2: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -61811,11 +61811,11 @@ fn __action1368< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result> + __4: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -61842,10 +61842,10 @@ fn __action1369< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result> + __3: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -61871,8 +61871,8 @@ fn __action1370< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), -) -> Result> + __1: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __1.2; let __end0 = __1.2; @@ -61896,7 +61896,7 @@ fn __action1371< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __0.2; @@ -61919,9 +61919,9 @@ fn __action1372< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -61946,8 +61946,8 @@ fn __action1373< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __1: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __1.2; let __end0 = __1.2; @@ -61970,9 +61970,9 @@ fn __action1373< fn __action1374< >( mode: Mode, - __0: (TextSize, Option>, TextSize), + __0: (TextSize, Option>, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __1.2; let __end0 = __1.2; @@ -61995,8 +61995,8 @@ fn __action1374< fn __action1375< >( mode: Mode, - __0: (TextSize, Option>, TextSize), -) -> ast::Arguments + __0: (TextSize, Option>, TextSize), +) -> ast::Parameters { let __start0 = __0.2; let __end0 = __0.2; @@ -62018,14 +62018,14 @@ fn __action1375< fn __action1376< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __6.2; let __end0 = __6.2; @@ -62053,13 +62053,13 @@ fn __action1376< fn __action1377< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -62086,15 +62086,15 @@ fn __action1377< fn __action1378< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __7.2; let __end0 = __7.2; @@ -62123,14 +62123,14 @@ fn __action1378< fn __action1379< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __6.2; let __end0 = __6.2; @@ -62158,12 +62158,12 @@ fn __action1379< fn __action1380< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -62189,11 +62189,11 @@ fn __action1380< fn __action1381< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -62218,13 +62218,13 @@ fn __action1381< fn __action1382< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -62251,12 +62251,12 @@ fn __action1382< fn __action1383< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -62282,9 +62282,9 @@ fn __action1383< fn __action1384< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.2; let __end0 = __1.2; @@ -62307,13 +62307,13 @@ fn __action1384< fn __action1385< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -62340,12 +62340,12 @@ fn __action1385< fn __action1386< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result> + __4: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -62371,14 +62371,14 @@ fn __action1386< fn __action1387< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), -) -> Result> + __6: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __6.2; let __end0 = __6.2; @@ -62406,13 +62406,13 @@ fn __action1387< fn __action1388< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -62439,11 +62439,11 @@ fn __action1388< fn __action1389< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), -) -> Result> + __3: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -62468,10 +62468,10 @@ fn __action1389< fn __action1390< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -62495,12 +62495,12 @@ fn __action1390< fn __action1391< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -62526,11 +62526,11 @@ fn __action1391< fn __action1392< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -62555,8 +62555,8 @@ fn __action1392< fn __action1393< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), -) -> Result> + __0: (TextSize, (Vec, Vec), TextSize), +) -> Result> { let __start0 = __0.2; let __end0 = __0.2; @@ -62578,11 +62578,11 @@ fn __action1393< fn __action1394< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -62607,10 +62607,10 @@ fn __action1394< fn __action1395< >( mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), + __0: (TextSize, (Vec, Vec), TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result> + __2: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -62635,11 +62635,11 @@ fn __action1396< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -62667,9 +62667,9 @@ fn __action1397< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -62695,12 +62695,12 @@ fn __action1398< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -62728,11 +62728,11 @@ fn __action1399< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), + __3: (TextSize, Option>, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -62759,9 +62759,9 @@ fn __action1400< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -62787,7 +62787,7 @@ fn __action1401< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.2; let __end0 = __1.2; @@ -62811,10 +62811,10 @@ fn __action1402< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -62840,9 +62840,9 @@ fn __action1403< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -62867,10 +62867,10 @@ fn __action1404< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), + __1: (TextSize, ast::Parameter, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result> + __3: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -62897,8 +62897,8 @@ fn __action1405< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result> + __2: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -62923,11 +62923,11 @@ fn __action1406< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result> + __4: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __4.2; let __end0 = __4.2; @@ -62954,10 +62954,10 @@ fn __action1407< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result> + __3: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -62983,8 +62983,8 @@ fn __action1408< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), -) -> Result> + __1: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __1.2; let __end0 = __1.2; @@ -63008,7 +63008,7 @@ fn __action1409< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __0.2; @@ -63031,9 +63031,9 @@ fn __action1410< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -63058,8 +63058,8 @@ fn __action1411< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __1: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __1.2; let __end0 = __1.2; @@ -63082,9 +63082,9 @@ fn __action1411< fn __action1412< >( mode: Mode, - __0: (TextSize, Option>, TextSize), + __0: (TextSize, Option>, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> ast::Arguments +) -> ast::Parameters { let __start0 = __1.2; let __end0 = __1.2; @@ -63107,8 +63107,8 @@ fn __action1412< fn __action1413< >( mode: Mode, - __0: (TextSize, Option>, TextSize), -) -> ast::Arguments + __0: (TextSize, Option>, TextSize), +) -> ast::Parameters { let __start0 = __0.2; let __end0 = __0.2; @@ -63131,9 +63131,9 @@ fn __action1414< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __2.2; @@ -63723,7 +63723,7 @@ fn __action1436< __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Expr, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __2.2; let __end0 = __2.2; @@ -63748,7 +63748,7 @@ fn __action1437< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __0.2; let __end0 = __0.2; @@ -63771,7 +63771,7 @@ fn __action1438< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), -) -> ast::Arg +) -> ast::Parameter { let __start0 = __0.2; let __end0 = __0.2; @@ -64604,7 +64604,7 @@ fn __action1467< __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Expr, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { let __start0 = __2.2; let __end0 = __2.2; @@ -64629,7 +64629,7 @@ fn __action1468< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { let __start0 = __0.2; let __end0 = __0.2; @@ -64652,7 +64652,7 @@ fn __action1469< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), -) -> ast::ArgWithDefault +) -> ast::ParameterWithDefault { let __start0 = __0.2; let __end0 = __0.2; @@ -65462,8 +65462,8 @@ fn __action1499< fn __action1500< >( mode: Mode, - __0: (TextSize, ast::Arguments, TextSize), -) -> core::option::Option + __0: (TextSize, ast::Parameters, TextSize), +) -> core::option::Option { let __start0 = __0.0; let __end0 = __0.2; @@ -65484,9 +65484,9 @@ fn __action1501< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arguments, TextSize), + __1: (TextSize, ast::Parameters, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __1.2; @@ -65510,7 +65510,7 @@ fn __action1502< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -66309,7 +66309,7 @@ fn __action1533< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, core::option::Option>, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Expr, TextSize), __7: (TextSize, token::Tok, TextSize), @@ -66349,7 +66349,7 @@ fn __action1534< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, core::option::Option>, TextSize), - __5: (TextSize, ast::Arguments, TextSize), + __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Expr, TextSize), __8: (TextSize, token::Tok, TextSize), @@ -66387,7 +66387,7 @@ fn __action1535< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, core::option::Option>, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -66423,7 +66423,7 @@ fn __action1536< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, core::option::Option>, TextSize), - __5: (TextSize, ast::Arguments, TextSize), + __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -66456,7 +66456,7 @@ fn __action1537< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), __2: (TextSize, core::option::Option>, TextSize), - __3: (TextSize, ast::Arguments, TextSize), + __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Expr, TextSize), __6: (TextSize, token::Tok, TextSize), @@ -66494,7 +66494,7 @@ fn __action1538< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, core::option::Option>, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Expr, TextSize), __7: (TextSize, token::Tok, TextSize), @@ -66530,7 +66530,7 @@ fn __action1539< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), __2: (TextSize, core::option::Option>, TextSize), - __3: (TextSize, ast::Arguments, TextSize), + __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -66564,7 +66564,7 @@ fn __action1540< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, core::option::Option>, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -66694,8 +66694,8 @@ fn __action1545< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arg, TextSize), -) -> Option> + __1: (TextSize, ast::Parameter, TextSize), +) -> Option> { let __start0 = __1.0; let __end0 = __1.2; @@ -66717,7 +66717,7 @@ fn __action1546< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> Option> +) -> Option> { let __start0 = __0.2; let __end0 = __0.2; @@ -67085,14 +67085,14 @@ fn __action1560< fn __action1561< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -67118,16 +67118,16 @@ fn __action1561< fn __action1562< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), + __5: (TextSize, ast::Parameter, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), + __7: (TextSize, Option>, TextSize), __8: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -67155,17 +67155,17 @@ fn __action1562< fn __action1563< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), + __6: (TextSize, ast::Parameter, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), + __8: (TextSize, Option>, TextSize), __9: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -67194,13 +67194,13 @@ fn __action1563< fn __action1564< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -67225,15 +67225,15 @@ fn __action1564< fn __action1565< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -67260,16 +67260,16 @@ fn __action1565< fn __action1566< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), + __7: (TextSize, Option>, TextSize), __8: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -67297,15 +67297,15 @@ fn __action1566< fn __action1567< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -67332,17 +67332,17 @@ fn __action1567< fn __action1568< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, ast::Parameter, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), + __8: (TextSize, Option>, TextSize), __9: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -67371,18 +67371,18 @@ fn __action1568< fn __action1569< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, Option>, TextSize), + __9: (TextSize, Option>, TextSize), __10: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -67412,14 +67412,14 @@ fn __action1569< fn __action1570< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -67445,16 +67445,16 @@ fn __action1570< fn __action1571< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), + __7: (TextSize, Option>, TextSize), __8: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -67482,17 +67482,17 @@ fn __action1571< fn __action1572< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), + __8: (TextSize, Option>, TextSize), __9: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -67521,12 +67521,12 @@ fn __action1572< fn __action1573< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -67550,14 +67550,14 @@ fn __action1573< fn __action1574< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), + __5: (TextSize, ast::Parameter, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -67583,15 +67583,15 @@ fn __action1574< fn __action1575< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), + __6: (TextSize, ast::Parameter, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -67618,11 +67618,11 @@ fn __action1575< fn __action1576< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -67645,13 +67645,13 @@ fn __action1576< fn __action1577< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -67676,14 +67676,14 @@ fn __action1577< fn __action1578< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -67709,13 +67709,13 @@ fn __action1578< fn __action1579< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -67740,15 +67740,15 @@ fn __action1579< fn __action1580< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, ast::Parameter, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -67775,16 +67775,16 @@ fn __action1580< fn __action1581< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), __8: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -67812,12 +67812,12 @@ fn __action1581< fn __action1582< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -67841,14 +67841,14 @@ fn __action1582< fn __action1583< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -67874,15 +67874,15 @@ fn __action1583< fn __action1584< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -67909,9 +67909,9 @@ fn __action1584< fn __action1585< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -67932,11 +67932,11 @@ fn __action1585< fn __action1586< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -67959,12 +67959,12 @@ fn __action1586< fn __action1587< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -67988,13 +67988,13 @@ fn __action1587< fn __action1588< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68019,15 +68019,15 @@ fn __action1588< fn __action1589< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), + __5: (TextSize, ast::Parameter, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), -) -> Result> + __7: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68054,16 +68054,16 @@ fn __action1589< fn __action1590< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), + __6: (TextSize, ast::Parameter, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), -) -> Result> + __8: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68091,12 +68091,12 @@ fn __action1590< fn __action1591< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result> + __4: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68120,14 +68120,14 @@ fn __action1591< fn __action1592< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), -) -> Result> + __6: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68153,15 +68153,15 @@ fn __action1592< fn __action1593< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), -) -> Result> + __7: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68188,14 +68188,14 @@ fn __action1593< fn __action1594< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), -) -> Result> + __6: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68221,16 +68221,16 @@ fn __action1594< fn __action1595< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, ast::Parameter, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), -) -> Result> + __8: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68258,17 +68258,17 @@ fn __action1595< fn __action1596< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, Option>, TextSize), -) -> Result> + __9: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68297,13 +68297,13 @@ fn __action1596< fn __action1597< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68328,15 +68328,15 @@ fn __action1597< fn __action1598< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), -) -> Result> + __7: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68363,16 +68363,16 @@ fn __action1598< fn __action1599< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), -) -> Result> + __8: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68400,11 +68400,11 @@ fn __action1599< fn __action1600< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), -) -> Result> + __3: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68427,13 +68427,13 @@ fn __action1600< fn __action1601< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), -) -> Result> + __5: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68458,14 +68458,14 @@ fn __action1601< fn __action1602< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), -) -> Result> + __6: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68491,10 +68491,10 @@ fn __action1602< fn __action1603< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68516,12 +68516,12 @@ fn __action1603< fn __action1604< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68545,13 +68545,13 @@ fn __action1604< fn __action1605< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68576,12 +68576,12 @@ fn __action1605< fn __action1606< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68605,14 +68605,14 @@ fn __action1606< fn __action1607< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __5: (TextSize, ast::Parameter, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68638,15 +68638,15 @@ fn __action1607< fn __action1608< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68673,11 +68673,11 @@ fn __action1608< fn __action1609< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68700,13 +68700,13 @@ fn __action1609< fn __action1610< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __5: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68731,14 +68731,14 @@ fn __action1610< fn __action1611< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __6: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68764,8 +68764,8 @@ fn __action1611< fn __action1612< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> Result> + __0: (TextSize, Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68785,10 +68785,10 @@ fn __action1612< fn __action1613< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68810,11 +68810,11 @@ fn __action1613< fn __action1614< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68837,11 +68837,11 @@ fn __action1614< fn __action1615< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68864,13 +68864,13 @@ fn __action1615< fn __action1616< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68895,14 +68895,14 @@ fn __action1616< fn __action1617< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -68928,10 +68928,10 @@ fn __action1617< fn __action1618< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result> + __2: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -68953,12 +68953,12 @@ fn __action1618< fn __action1619< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result> + __4: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -68982,13 +68982,13 @@ fn __action1619< fn __action1620< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69013,14 +69013,14 @@ fn __action1620< fn __action1621< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69046,16 +69046,16 @@ fn __action1621< fn __action1622< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), + __5: (TextSize, ast::Parameter, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), + __7: (TextSize, Option>, TextSize), __8: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69083,17 +69083,17 @@ fn __action1622< fn __action1623< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), + __6: (TextSize, ast::Parameter, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), + __8: (TextSize, Option>, TextSize), __9: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69122,13 +69122,13 @@ fn __action1623< fn __action1624< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69153,15 +69153,15 @@ fn __action1624< fn __action1625< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69188,16 +69188,16 @@ fn __action1625< fn __action1626< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), + __7: (TextSize, Option>, TextSize), __8: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69225,15 +69225,15 @@ fn __action1626< fn __action1627< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), + __6: (TextSize, Option>, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69260,17 +69260,17 @@ fn __action1627< fn __action1628< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, ast::Parameter, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), + __8: (TextSize, Option>, TextSize), __9: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69299,18 +69299,18 @@ fn __action1628< fn __action1629< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, Option>, TextSize), + __9: (TextSize, Option>, TextSize), __10: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69340,14 +69340,14 @@ fn __action1629< fn __action1630< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69373,16 +69373,16 @@ fn __action1630< fn __action1631< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), + __7: (TextSize, Option>, TextSize), __8: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69410,17 +69410,17 @@ fn __action1631< fn __action1632< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), + __8: (TextSize, Option>, TextSize), __9: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69449,12 +69449,12 @@ fn __action1632< fn __action1633< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69478,14 +69478,14 @@ fn __action1633< fn __action1634< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), + __5: (TextSize, ast::Parameter, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69511,15 +69511,15 @@ fn __action1634< fn __action1635< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), + __6: (TextSize, ast::Parameter, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69546,11 +69546,11 @@ fn __action1635< fn __action1636< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69573,13 +69573,13 @@ fn __action1636< fn __action1637< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69604,14 +69604,14 @@ fn __action1637< fn __action1638< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69637,13 +69637,13 @@ fn __action1638< fn __action1639< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69668,15 +69668,15 @@ fn __action1639< fn __action1640< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, ast::Parameter, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69703,16 +69703,16 @@ fn __action1640< fn __action1641< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), __8: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69740,12 +69740,12 @@ fn __action1641< fn __action1642< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69769,14 +69769,14 @@ fn __action1642< fn __action1643< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69802,15 +69802,15 @@ fn __action1643< fn __action1644< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69837,9 +69837,9 @@ fn __action1644< fn __action1645< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69860,11 +69860,11 @@ fn __action1645< fn __action1646< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69887,12 +69887,12 @@ fn __action1646< fn __action1647< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -69916,13 +69916,13 @@ fn __action1647< fn __action1648< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), + __3: (TextSize, ast::Parameter, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -69947,15 +69947,15 @@ fn __action1648< fn __action1649< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), + __5: (TextSize, ast::Parameter, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), -) -> Result> + __7: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -69982,16 +69982,16 @@ fn __action1649< fn __action1650< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), + __6: (TextSize, ast::Parameter, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), -) -> Result> + __8: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70019,12 +70019,12 @@ fn __action1650< fn __action1651< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result> + __4: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70048,14 +70048,14 @@ fn __action1651< fn __action1652< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), -) -> Result> + __6: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70081,15 +70081,15 @@ fn __action1652< fn __action1653< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), -) -> Result> + __7: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70116,14 +70116,14 @@ fn __action1653< fn __action1654< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, Option>, TextSize), -) -> Result> + __6: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70149,16 +70149,16 @@ fn __action1654< fn __action1655< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, ast::Parameter, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), -) -> Result> + __8: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70186,17 +70186,17 @@ fn __action1655< fn __action1656< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, Option>, TextSize), -) -> Result> + __9: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70225,13 +70225,13 @@ fn __action1656< fn __action1657< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70256,15 +70256,15 @@ fn __action1657< fn __action1658< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), -) -> Result> + __7: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70291,16 +70291,16 @@ fn __action1658< fn __action1659< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), -) -> Result> + __8: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70328,11 +70328,11 @@ fn __action1659< fn __action1660< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), -) -> Result> + __3: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70355,13 +70355,13 @@ fn __action1660< fn __action1661< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), -) -> Result> + __5: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70386,14 +70386,14 @@ fn __action1661< fn __action1662< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), -) -> Result> + __6: (TextSize, ast::Parameter, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70419,10 +70419,10 @@ fn __action1662< fn __action1663< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70444,12 +70444,12 @@ fn __action1663< fn __action1664< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70473,13 +70473,13 @@ fn __action1664< fn __action1665< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70504,12 +70504,12 @@ fn __action1665< fn __action1666< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Arg, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70533,14 +70533,14 @@ fn __action1666< fn __action1667< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Arg, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __5: (TextSize, ast::Parameter, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70566,15 +70566,15 @@ fn __action1667< fn __action1668< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70601,11 +70601,11 @@ fn __action1668< fn __action1669< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70628,13 +70628,13 @@ fn __action1669< fn __action1670< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __5: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70659,14 +70659,14 @@ fn __action1670< fn __action1671< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __6: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70692,8 +70692,8 @@ fn __action1671< fn __action1672< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> Result> + __0: (TextSize, Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70713,10 +70713,10 @@ fn __action1672< fn __action1673< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70738,11 +70738,11 @@ fn __action1673< fn __action1674< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), -) -> Result> + __3: (TextSize, alloc::vec::Vec, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70765,11 +70765,11 @@ fn __action1674< fn __action1675< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), + __2: (TextSize, Option>, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70792,13 +70792,13 @@ fn __action1675< fn __action1676< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), + __4: (TextSize, Option>, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70823,14 +70823,14 @@ fn __action1676< fn __action1677< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), + __5: (TextSize, Option>, TextSize), __6: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70856,10 +70856,10 @@ fn __action1677< fn __action1678< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result> + __2: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __0.2; @@ -70881,12 +70881,12 @@ fn __action1678< fn __action1679< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), -) -> Result> + __4: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __2.2; @@ -70910,13 +70910,13 @@ fn __action1679< fn __action1680< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> + __5: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __0.0; let __end0 = __3.2; @@ -70942,7 +70942,7 @@ fn __action1681< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Arguments, TextSize), + __1: (TextSize, ast::Parameters, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Expr, TextSize), ) -> Result> @@ -72093,7 +72093,7 @@ fn __action1721< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, Vec, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Expr, TextSize), __7: (TextSize, token::Tok, TextSize), @@ -72129,7 +72129,7 @@ fn __action1722< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), - __3: (TextSize, ast::Arguments, TextSize), + __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Expr, TextSize), __6: (TextSize, token::Tok, TextSize), @@ -72168,7 +72168,7 @@ fn __action1723< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, Vec, TextSize), - __5: (TextSize, ast::Arguments, TextSize), + __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Expr, TextSize), __8: (TextSize, token::Tok, TextSize), @@ -72206,7 +72206,7 @@ fn __action1724< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Expr, TextSize), __7: (TextSize, token::Tok, TextSize), @@ -72245,7 +72245,7 @@ fn __action1725< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, Vec, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -72277,7 +72277,7 @@ fn __action1726< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), - __3: (TextSize, ast::Arguments, TextSize), + __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -72312,7 +72312,7 @@ fn __action1727< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, Vec, TextSize), - __5: (TextSize, ast::Arguments, TextSize), + __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -72346,7 +72346,7 @@ fn __action1728< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -72380,7 +72380,7 @@ fn __action1729< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), __2: (TextSize, Vec, TextSize), - __3: (TextSize, ast::Arguments, TextSize), + __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Expr, TextSize), __6: (TextSize, token::Tok, TextSize), @@ -72414,7 +72414,7 @@ fn __action1730< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), - __2: (TextSize, ast::Arguments, TextSize), + __2: (TextSize, ast::Parameters, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, ast::Expr, TextSize), __5: (TextSize, token::Tok, TextSize), @@ -72451,7 +72451,7 @@ fn __action1731< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, Vec, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Expr, TextSize), __7: (TextSize, token::Tok, TextSize), @@ -72487,7 +72487,7 @@ fn __action1732< __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), - __3: (TextSize, ast::Arguments, TextSize), + __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Expr, TextSize), __6: (TextSize, token::Tok, TextSize), @@ -72524,7 +72524,7 @@ fn __action1733< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), __2: (TextSize, Vec, TextSize), - __3: (TextSize, ast::Arguments, TextSize), + __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -72554,7 +72554,7 @@ fn __action1734< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), - __2: (TextSize, ast::Arguments, TextSize), + __2: (TextSize, ast::Parameters, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -72587,7 +72587,7 @@ fn __action1735< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, Vec, TextSize), - __4: (TextSize, ast::Arguments, TextSize), + __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -72619,7 +72619,7 @@ fn __action1736< __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), - __3: (TextSize, ast::Arguments, TextSize), + __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_kw_only_args.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_kw_only_args.snap index d862787c8a..aca3f30656 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_kw_only_args.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_kw_only_args.snap @@ -11,15 +11,15 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..17, posonlyargs: [], args: [], vararg: None, kwonlyargs: [ - ArgWithDefault { + ParameterWithDefault { range: 9..10, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "a", @@ -29,9 +29,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 12..13, - def: Arg { + def: Parameter { range: 12..13, arg: Identifier { id: "b", @@ -41,9 +41,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 15..16, - def: Arg { + def: Parameter { range: 15..16, arg: Identifier { id: "c", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_kw_only_args_with_defaults.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_kw_only_args_with_defaults.snap index f8eb841966..365d4b0a55 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_kw_only_args_with_defaults.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_kw_only_args_with_defaults.snap @@ -11,15 +11,15 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..23, posonlyargs: [], args: [], vararg: None, kwonlyargs: [ - ArgWithDefault { + ParameterWithDefault { range: 9..10, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "a", @@ -29,9 +29,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 12..16, - def: Arg { + def: Parameter { range: 12..13, arg: Identifier { id: "b", @@ -51,9 +51,9 @@ Ok( ), ), }, - ArgWithDefault { + ParameterWithDefault { range: 18..22, - def: Arg { + def: Parameter { range: 18..19, arg: Identifier { id: "c", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_no_args.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_no_args.snap index 27a71b8f54..0e3d2d4e4b 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_no_args.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_no_args.snap @@ -11,7 +11,7 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..7, posonlyargs: [], args: [], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_no_args_with_ranges.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_no_args_with_ranges.snap index 27a71b8f54..0e3d2d4e4b 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_no_args_with_ranges.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_no_args_with_ranges.snap @@ -11,7 +11,7 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..7, posonlyargs: [], args: [], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args.snap index 8ce96484b2..4a1dcd7e0b 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args.snap @@ -11,13 +11,13 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..26, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 6..7, - def: Arg { + def: Parameter { range: 6..7, arg: Identifier { id: "a", @@ -27,9 +27,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 9..10, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "b", @@ -39,9 +39,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 12..13, - def: Arg { + def: Parameter { range: 12..13, arg: Identifier { id: "c", @@ -54,9 +54,9 @@ Ok( ], vararg: None, kwonlyargs: [ - ArgWithDefault { + ParameterWithDefault { range: 18..19, - def: Arg { + def: Parameter { range: 18..19, arg: Identifier { id: "d", @@ -66,9 +66,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 21..22, - def: Arg { + def: Parameter { range: 21..22, arg: Identifier { id: "e", @@ -78,9 +78,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 24..25, - def: Arg { + def: Parameter { range: 24..25, arg: Identifier { id: "f", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults.snap index d15f0ac3a9..9b6c8ea4ff 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults.snap @@ -11,13 +11,13 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..32, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 6..7, - def: Arg { + def: Parameter { range: 6..7, arg: Identifier { id: "a", @@ -27,9 +27,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 9..10, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "b", @@ -39,9 +39,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 12..13, - def: Arg { + def: Parameter { range: 12..13, arg: Identifier { id: "c", @@ -54,9 +54,9 @@ Ok( ], vararg: None, kwonlyargs: [ - ArgWithDefault { + ParameterWithDefault { range: 18..19, - def: Arg { + def: Parameter { range: 18..19, arg: Identifier { id: "d", @@ -66,9 +66,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 21..25, - def: Arg { + def: Parameter { range: 21..22, arg: Identifier { id: "e", @@ -88,9 +88,9 @@ Ok( ), ), }, - ArgWithDefault { + ParameterWithDefault { range: 27..31, - def: Arg { + def: Parameter { range: 27..28, arg: Identifier { id: "f", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults_and_varargs.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults_and_varargs.snap index d1aaae3e13..0e371a31b2 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults_and_varargs.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults_and_varargs.snap @@ -11,13 +11,13 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..36, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 6..7, - def: Arg { + def: Parameter { range: 6..7, arg: Identifier { id: "a", @@ -27,9 +27,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 9..10, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "b", @@ -39,9 +39,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 12..13, - def: Arg { + def: Parameter { range: 12..13, arg: Identifier { id: "c", @@ -53,7 +53,7 @@ Ok( }, ], vararg: Some( - Arg { + Parameter { range: 16..20, arg: Identifier { id: "args", @@ -63,9 +63,9 @@ Ok( }, ), kwonlyargs: [ - ArgWithDefault { + ParameterWithDefault { range: 22..23, - def: Arg { + def: Parameter { range: 22..23, arg: Identifier { id: "d", @@ -75,9 +75,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 25..29, - def: Arg { + def: Parameter { range: 25..26, arg: Identifier { id: "e", @@ -97,9 +97,9 @@ Ok( ), ), }, - ArgWithDefault { + ParameterWithDefault { range: 31..35, - def: Arg { + def: Parameter { range: 31..32, arg: Identifier { id: "f", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults_and_varargs_and_kwargs.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults_and_varargs_and_kwargs.snap index 4169d01fa2..649d3c2b0e 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults_and_varargs_and_kwargs.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_and_kw_only_args_with_defaults_and_varargs_and_kwargs.snap @@ -11,13 +11,13 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..46, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 6..7, - def: Arg { + def: Parameter { range: 6..7, arg: Identifier { id: "a", @@ -27,9 +27,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 9..10, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "b", @@ -39,9 +39,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 12..13, - def: Arg { + def: Parameter { range: 12..13, arg: Identifier { id: "c", @@ -53,7 +53,7 @@ Ok( }, ], vararg: Some( - Arg { + Parameter { range: 16..20, arg: Identifier { id: "args", @@ -63,9 +63,9 @@ Ok( }, ), kwonlyargs: [ - ArgWithDefault { + ParameterWithDefault { range: 22..23, - def: Arg { + def: Parameter { range: 22..23, arg: Identifier { id: "d", @@ -75,9 +75,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 25..29, - def: Arg { + def: Parameter { range: 25..26, arg: Identifier { id: "e", @@ -97,9 +97,9 @@ Ok( ), ), }, - ArgWithDefault { + ParameterWithDefault { range: 31..35, - def: Arg { + def: Parameter { range: 31..32, arg: Identifier { id: "f", @@ -121,7 +121,7 @@ Ok( }, ], kwarg: Some( - Arg { + Parameter { range: 39..45, arg: Identifier { id: "kwargs", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args.snap index b51a3a66c5..6ebff36da8 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args.snap @@ -11,13 +11,13 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..14, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 6..7, - def: Arg { + def: Parameter { range: 6..7, arg: Identifier { id: "a", @@ -27,9 +27,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 9..10, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "b", @@ -39,9 +39,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 12..13, - def: Arg { + def: Parameter { range: 12..13, arg: Identifier { id: "c", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args_with_defaults.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args_with_defaults.snap index 4ed3f2362b..988b874b77 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args_with_defaults.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args_with_defaults.snap @@ -11,13 +11,13 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..20, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 6..7, - def: Arg { + def: Parameter { range: 6..7, arg: Identifier { id: "a", @@ -27,9 +27,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 9..13, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "b", @@ -49,9 +49,9 @@ Ok( ), ), }, - ArgWithDefault { + ParameterWithDefault { range: 15..19, - def: Arg { + def: Parameter { range: 15..16, arg: Identifier { id: "c", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args_with_ranges.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args_with_ranges.snap index b51a3a66c5..6ebff36da8 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args_with_ranges.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__function_pos_args_with_ranges.snap @@ -11,13 +11,13 @@ Ok( id: "f", range: 4..5, }, - args: Arguments { + parameters: Parameters { range: 5..14, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 6..7, - def: Arg { + def: Parameter { range: 6..7, arg: Identifier { id: "a", @@ -27,9 +27,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 9..10, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "b", @@ -39,9 +39,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 12..13, - def: Arg { + def: Parameter { range: 12..13, arg: Identifier { id: "c", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_kw_only_args.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_kw_only_args.snap index 174ed9b1b7..e113bbf405 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_kw_only_args.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_kw_only_args.snap @@ -10,15 +10,15 @@ Ok( value: Lambda( ExprLambda { range: 0..20, - args: Arguments { + parameters: Parameters { range: 7..17, posonlyargs: [], args: [], vararg: None, kwonlyargs: [ - ArgWithDefault { + ParameterWithDefault { range: 10..11, - def: Arg { + def: Parameter { range: 10..11, arg: Identifier { id: "a", @@ -28,9 +28,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 13..14, - def: Arg { + def: Parameter { range: 13..14, arg: Identifier { id: "b", @@ -40,9 +40,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 16..17, - def: Arg { + def: Parameter { range: 16..17, arg: Identifier { id: "c", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_kw_only_args_with_defaults.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_kw_only_args_with_defaults.snap index 0b79a86f16..8e18db7f99 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_kw_only_args_with_defaults.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_kw_only_args_with_defaults.snap @@ -10,15 +10,15 @@ Ok( value: Lambda( ExprLambda { range: 0..26, - args: Arguments { + parameters: Parameters { range: 7..23, posonlyargs: [], args: [], vararg: None, kwonlyargs: [ - ArgWithDefault { + ParameterWithDefault { range: 10..11, - def: Arg { + def: Parameter { range: 10..11, arg: Identifier { id: "a", @@ -28,9 +28,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 13..17, - def: Arg { + def: Parameter { range: 13..14, arg: Identifier { id: "b", @@ -50,9 +50,9 @@ Ok( ), ), }, - ArgWithDefault { + ParameterWithDefault { range: 19..23, - def: Arg { + def: Parameter { range: 19..20, arg: Identifier { id: "c", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_no_args.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_no_args.snap index 3562bea124..daa1f9ae29 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_no_args.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_no_args.snap @@ -10,7 +10,7 @@ Ok( value: Lambda( ExprLambda { range: 0..9, - args: Arguments { + parameters: Parameters { range: 6..6, posonlyargs: [], args: [], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_and_kw_only_args.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_and_kw_only_args.snap index 9240b4f472..ed2ac7f87b 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_and_kw_only_args.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_and_kw_only_args.snap @@ -10,13 +10,13 @@ Ok( value: Lambda( ExprLambda { range: 0..26, - args: Arguments { + parameters: Parameters { range: 7..23, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 7..8, - def: Arg { + def: Parameter { range: 7..8, arg: Identifier { id: "a", @@ -26,9 +26,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 10..11, - def: Arg { + def: Parameter { range: 10..11, arg: Identifier { id: "b", @@ -38,9 +38,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 13..14, - def: Arg { + def: Parameter { range: 13..14, arg: Identifier { id: "c", @@ -53,9 +53,9 @@ Ok( ], vararg: None, kwonlyargs: [ - ArgWithDefault { + ParameterWithDefault { range: 19..20, - def: Arg { + def: Parameter { range: 19..20, arg: Identifier { id: "d", @@ -65,9 +65,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 22..23, - def: Arg { + def: Parameter { range: 22..23, arg: Identifier { id: "e", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_args.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_args.snap index ba1c8ee2eb..8d0f5dbd83 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_args.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_args.snap @@ -10,13 +10,13 @@ Ok( value: Lambda( ExprLambda { range: 0..17, - args: Arguments { + parameters: Parameters { range: 7..14, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 7..8, - def: Arg { + def: Parameter { range: 7..8, arg: Identifier { id: "a", @@ -26,9 +26,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 10..11, - def: Arg { + def: Parameter { range: 10..11, arg: Identifier { id: "b", @@ -38,9 +38,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 13..14, - def: Arg { + def: Parameter { range: 13..14, arg: Identifier { id: "c", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_args_with_defaults.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_args_with_defaults.snap index d3d028d558..46d2ea68b5 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_args_with_defaults.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__function__tests__lambda_pos_args_with_defaults.snap @@ -10,13 +10,13 @@ Ok( value: Lambda( ExprLambda { range: 0..23, - args: Arguments { + parameters: Parameters { range: 7..20, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 7..8, - def: Arg { + def: Parameter { range: 7..8, arg: Identifier { id: "a", @@ -26,9 +26,9 @@ Ok( }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 10..14, - def: Arg { + def: Parameter { range: 10..11, arg: Identifier { id: "b", @@ -48,9 +48,9 @@ Ok( ), ), }, - ArgWithDefault { + ParameterWithDefault { range: 16..20, - def: Arg { + def: Parameter { range: 16..17, arg: Identifier { id: "c", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__decorator_ranges.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__decorator_ranges.snap index c32f7dcbce..9de3a7f538 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__decorator_ranges.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__decorator_ranges.snap @@ -10,7 +10,7 @@ expression: parse_ast id: "test", range: 18..22, }, - args: Arguments { + parameters: Parameters { range: 22..24, posonlyargs: [], args: [], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__jupyter_magic.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__jupyter_magic.snap index f24364d893..352e0ae52a 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__jupyter_magic.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__jupyter_magic.snap @@ -129,7 +129,7 @@ Module( id: "foo", range: 570..573, }, - args: Arguments { + parameters: Parameters { range: 573..575, posonlyargs: [], args: [], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__match_as_identifier.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__match_as_identifier.snap index 94b281807c..f9f467db40 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__match_as_identifier.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__match_as_identifier.snap @@ -1,6 +1,6 @@ --- source: crates/ruff_python_parser/src/parser.rs -expression: "ast::Suite::parse(source, \"\").unwrap()" +expression: "parse_suite(source, \"\").unwrap()" --- [ Expr( @@ -709,13 +709,13 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" value: Lambda( ExprLambda { range: 591..619, - args: Arguments { + parameters: Parameters { range: 598..603, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 598..603, - def: Arg { + def: Parameter { range: 598..603, arg: Identifier { id: "query", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_class.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_class.snap index b439b18abf..fa635cc9a2 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_class.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_class.snap @@ -1,6 +1,6 @@ --- source: crates/ruff_python_parser/src/parser.rs -expression: "ast::Suite::parse(source, \"\").unwrap()" +expression: "parse_suite(source, \"\").unwrap()" --- [ ClassDef( @@ -35,13 +35,13 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" id: "__init__", range: 22..30, }, - args: Arguments { + parameters: Parameters { range: 30..36, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 31..35, - def: Arg { + def: Parameter { range: 31..35, arg: Identifier { id: "self", @@ -75,13 +75,13 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" id: "method_with_default", range: 50..69, }, - args: Arguments { + parameters: Parameters { range: 69..90, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 70..74, - def: Arg { + def: Parameter { range: 70..74, arg: Identifier { id: "self", @@ -91,9 +91,9 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 76..89, - def: Arg { + def: Parameter { range: 76..79, arg: Identifier { id: "arg", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_function_definition.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_function_definition.snap index fff68f3279..0d9d0ae03d 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_function_definition.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_function_definition.snap @@ -1,6 +1,6 @@ --- source: crates/ruff_python_parser/src/parser.rs -expression: "ast::Suite::parse(source, \"\").unwrap()" +expression: "parse_suite(source, \"\").unwrap()" --- [ FunctionDef( @@ -10,13 +10,13 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" id: "func", range: 4..8, }, - args: Arguments { + parameters: Parameters { range: 8..11, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 9..10, - def: Arg { + def: Parameter { range: 9..10, arg: Identifier { id: "a", @@ -57,13 +57,13 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" id: "func", range: 26..30, }, - args: Arguments { + parameters: Parameters { range: 33..39, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 34..38, - def: Arg { + def: Parameter { range: 34..38, arg: Identifier { id: "a", @@ -131,13 +131,13 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" id: "func", range: 59..63, }, - args: Arguments { + parameters: Parameters { range: 71..77, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 72..76, - def: Arg { + def: Parameter { range: 72..76, arg: Identifier { id: "a", @@ -213,13 +213,13 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" id: "func", range: 97..101, }, - args: Arguments { + parameters: Parameters { range: 118..124, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 119..123, - def: Arg { + def: Parameter { range: 119..123, arg: Identifier { id: "a", @@ -310,12 +310,12 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" id: "func", range: 144..148, }, - args: Arguments { + parameters: Parameters { range: 153..162, posonlyargs: [], args: [], vararg: Some( - Arg { + Parameter { range: 155..161, arg: Identifier { id: "a", @@ -377,12 +377,12 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" id: "func", range: 177..181, }, - args: Arguments { + parameters: Parameters { range: 186..221, posonlyargs: [], args: [], vararg: Some( - Arg { + Parameter { range: 188..200, arg: Identifier { id: "args", @@ -411,7 +411,7 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" ), kwonlyargs: [], kwarg: Some( - Arg { + Parameter { range: 204..220, arg: Identifier { id: "kwargs", @@ -475,7 +475,7 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" id: "func", range: 236..240, }, - args: Arguments { + parameters: Parameters { range: 261..263, posonlyargs: [], args: [], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_lambda.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_lambda.snap index cd7629d670..6781c1c84d 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_lambda.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_lambda.snap @@ -9,13 +9,13 @@ expression: parse_ast value: Lambda( ExprLambda { range: 0..18, - args: Arguments { + parameters: Parameters { range: 7..11, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 7..8, - def: Arg { + def: Parameter { range: 7..8, arg: Identifier { id: "x", @@ -25,9 +25,9 @@ expression: parse_ast }, default: None, }, - ArgWithDefault { + ParameterWithDefault { range: 10..11, - def: Arg { + def: Parameter { range: 10..11, arg: Identifier { id: "y", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_lambda_no_args.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_lambda_no_args.snap index 4910981fc9..970316e846 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_lambda_no_args.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parse_lambda_no_args.snap @@ -9,7 +9,7 @@ expression: parse_ast value: Lambda( ExprLambda { range: 0..9, - args: Arguments { + parameters: Parameters { range: 6..6, posonlyargs: [], args: [], diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__type_as_identifier.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__type_as_identifier.snap index 76001aa670..6c39711b47 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__type_as_identifier.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__type_as_identifier.snap @@ -1,6 +1,6 @@ --- source: crates/ruff_python_parser/src/parser.rs -expression: "ast::Suite::parse(source, \"\").unwrap()" +expression: "parse_suite(source, \"\").unwrap()" --- [ Expr( @@ -645,13 +645,13 @@ expression: "ast::Suite::parse(source, \"\").unwrap()" value: Lambda( ExprLambda { range: 507..535, - args: Arguments { + parameters: Parameters { range: 514..519, posonlyargs: [], args: [ - ArgWithDefault { + ParameterWithDefault { range: 514..519, - def: Arg { + def: Parameter { range: 514..519, arg: Identifier { id: "query", diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__variadic_generics.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__variadic_generics.snap index 528eb65a1a..df70e64ebb 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__variadic_generics.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__variadic_generics.snap @@ -10,12 +10,12 @@ expression: parse_ast id: "args_to_tuple", range: 5..18, }, - args: Arguments { + parameters: Parameters { range: 18..30, posonlyargs: [], args: [], vararg: Some( - Arg { + Parameter { range: 20..29, arg: Identifier { id: "args",