From dc4db39f782ec6c0005d19d3107a58ddb094eefb Mon Sep 17 00:00:00 2001 From: Anselm Hahn Date: Tue, 29 Aug 2023 23:08:08 +0200 Subject: [PATCH 001/164] docs: :memo: Updating the example for `assert(S101)` (#6986) ## Summary Rewriting the `if`-comparison to focus on the meaning of rule ` assert S101`. Fixes #6984 ## Test Plan --------- Co-authored-by: Zanie Blue --- crates/ruff/src/rules/flake8_bandit/rules/assert_used.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ruff/src/rules/flake8_bandit/rules/assert_used.rs b/crates/ruff/src/rules/flake8_bandit/rules/assert_used.rs index 4112c6ae7a..6c91cb0c17 100644 --- a/crates/ruff/src/rules/flake8_bandit/rules/assert_used.rs +++ b/crates/ruff/src/rules/flake8_bandit/rules/assert_used.rs @@ -23,6 +23,10 @@ use ruff_text_size::Ranged; /// /// Use instead: /// ```python +/// if not x > 0: +/// raise ValueError("Expected positive value.") +/// +/// # or even better: /// if x <= 0: /// raise ValueError("Expected positive value.") /// ``` From 1550a6bfe79536ad74de1b1db78f1b3c3810e296 Mon Sep 17 00:00:00 2001 From: qdegraaf <34540841+qdegraaf@users.noreply.github.com> Date: Tue, 29 Aug 2023 23:16:31 +0200 Subject: [PATCH 002/164] [`perflint`] Chore: correct PERF401 fixture comments (#6993) ## Summary Fixes comments in PERF401 fixture to correctly reflect how rule works --- crates/ruff/resources/test/fixtures/perflint/PERF401.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ruff/resources/test/fixtures/perflint/PERF401.py b/crates/ruff/resources/test/fixtures/perflint/PERF401.py index 886e5b9ada..304d1a6f80 100644 --- a/crates/ruff/resources/test/fixtures/perflint/PERF401.py +++ b/crates/ruff/resources/test/fixtures/perflint/PERF401.py @@ -18,11 +18,11 @@ def f(): result = [] for i in items: if i % 2: - result.append(i) # PERF401 + result.append(i) # Ok elif i % 2: - result.append(i) # PERF401 + result.append(i) else: - result.append(i) # PERF401 + result.append(i) def f(): From 34e8de738e9e48423c538ea0a12c52a2d5f036c1 Mon Sep 17 00:00:00 2001 From: qdegraaf <34540841+qdegraaf@users.noreply.github.com> Date: Wed, 30 Aug 2023 01:15:29 +0200 Subject: [PATCH 003/164] [`perflint`] Expand `PERF401` and `PERF402` with type checks (#6994) ## Summary Attempt at a small improvement to two `perflint` rules using the new type inference capabilities to only flag `PERF401` and `PERF402` for values we infer to be lists. This makes the rule more conservative, as it only flags values that we _know_ to be lists, but it's overall a desirable change, as it favors false negatives over false positives for a "nice-to-have" rule. Closes https://github.com/astral-sh/ruff/issues/6995. ## Test Plan Add non-list value cases and make sure all old cases are still caught. --- .../test/fixtures/perflint/PERF401.py | 12 +++++++ .../test/fixtures/perflint/PERF402.py | 19 ++++++++++ .../rules/manual_list_comprehension.rs | 35 +++++++++++++++---- .../rules/perflint/rules/manual_list_copy.rs | 31 +++++++++++++--- 4 files changed, 85 insertions(+), 12 deletions(-) diff --git a/crates/ruff/resources/test/fixtures/perflint/PERF401.py b/crates/ruff/resources/test/fixtures/perflint/PERF401.py index 304d1a6f80..86cd660d39 100644 --- a/crates/ruff/resources/test/fixtures/perflint/PERF401.py +++ b/crates/ruff/resources/test/fixtures/perflint/PERF401.py @@ -60,3 +60,15 @@ def f(): for i in range(20): foo.fibonacci.append(sum(foo.fibonacci[-2:])) # OK print(foo.fibonacci) + + +class Foo: + def append(self, x): + pass + + +def f(): + items = [1, 2, 3, 4] + result = Foo() + for i in items: + result.append(i) # Ok diff --git a/crates/ruff/resources/test/fixtures/perflint/PERF402.py b/crates/ruff/resources/test/fixtures/perflint/PERF402.py index 55f3e08cbc..b45a8c80c9 100644 --- a/crates/ruff/resources/test/fixtures/perflint/PERF402.py +++ b/crates/ruff/resources/test/fixtures/perflint/PERF402.py @@ -24,3 +24,22 @@ def f(): result = {} for i in items: result[i].append(i * i) # OK + + +class Foo: + def append(self, x): + pass + + +def f(): + items = [1, 2, 3, 4] + result = Foo() + for i in items: + result.append(i) # OK + + +def f(): + import sys + + for path in ("foo", "bar"): + sys.path.append(path) # OK diff --git a/crates/ruff/src/rules/perflint/rules/manual_list_comprehension.rs b/crates/ruff/src/rules/perflint/rules/manual_list_comprehension.rs index d3d4476b8f..bf04777f79 100644 --- a/crates/ruff/src/rules/perflint/rules/manual_list_comprehension.rs +++ b/crates/ruff/src/rules/perflint/rules/manual_list_comprehension.rs @@ -4,6 +4,8 @@ use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; use ruff_python_ast::comparable::ComparableExpr; use ruff_python_ast::helpers::any_over_expr; +use ruff_python_semantic::analyze::typing::is_list; +use ruff_python_semantic::Binding; use crate::checkers::ast::Checker; @@ -112,13 +114,6 @@ pub(crate) fn manual_list_comprehension(checker: &mut Checker, target: &Expr, bo return; }; - // Ignore direct list copies (e.g., `for x in y: filtered.append(x)`). - if if_test.is_none() { - if arg.as_name_expr().is_some_and(|arg| arg.id == *id) { - return; - } - } - let Expr::Attribute(ast::ExprAttribute { attr, value, .. }) = func.as_ref() else { return; }; @@ -127,6 +122,13 @@ pub(crate) fn manual_list_comprehension(checker: &mut Checker, target: &Expr, bo return; } + // Ignore direct list copies (e.g., `for x in y: filtered.append(x)`). + if if_test.is_none() { + if arg.as_name_expr().is_some_and(|arg| arg.id == *id) { + return; + } + } + // Avoid, e.g., `for x in y: filtered[x].append(x * x)`. if any_over_expr(value, &|expr| { expr.as_name_expr().is_some_and(|expr| expr.id == *id) @@ -141,6 +143,25 @@ pub(crate) fn manual_list_comprehension(checker: &mut Checker, target: &Expr, bo return; } + // Avoid non-list values. + let Expr::Name(ast::ExprName { id, .. }) = value.as_ref() else { + return; + }; + let bindings: Vec<&Binding> = checker + .semantic() + .current_scope() + .get_all(id) + .map(|binding_id| checker.semantic().binding(binding_id)) + .collect(); + + let [binding] = bindings.as_slice() else { + return; + }; + + if !is_list(binding, checker.semantic()) { + return; + } + // Avoid if the value is used in the conditional test, e.g., // // ```python diff --git a/crates/ruff/src/rules/perflint/rules/manual_list_copy.rs b/crates/ruff/src/rules/perflint/rules/manual_list_copy.rs index 7e12dccf76..39ad7dc059 100644 --- a/crates/ruff/src/rules/perflint/rules/manual_list_copy.rs +++ b/crates/ruff/src/rules/perflint/rules/manual_list_copy.rs @@ -2,6 +2,8 @@ use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; use ruff_python_ast::helpers::any_over_expr; use ruff_python_ast::{self as ast, Arguments, Expr, Stmt}; +use ruff_python_semantic::analyze::typing::is_list; +use ruff_python_semantic::Binding; use crate::checkers::ast::Checker; @@ -79,11 +81,6 @@ pub(crate) fn manual_list_copy(checker: &mut Checker, target: &Expr, body: &[Stm return; }; - // Only flag direct list copies (e.g., `for x in y: filtered.append(x)`). - if !arg.as_name_expr().is_some_and(|arg| arg.id == *id) { - return; - } - let Expr::Attribute(ast::ExprAttribute { attr, value, .. }) = func.as_ref() else { return; }; @@ -92,6 +89,11 @@ pub(crate) fn manual_list_copy(checker: &mut Checker, target: &Expr, body: &[Stm return; } + // Only flag direct list copies (e.g., `for x in y: filtered.append(x)`). + if !arg.as_name_expr().is_some_and(|arg| arg.id == *id) { + return; + } + // Avoid, e.g., `for x in y: filtered[x].append(x)`. if any_over_expr(value, &|expr| { expr.as_name_expr().is_some_and(|expr| expr.id == *id) @@ -99,6 +101,25 @@ pub(crate) fn manual_list_copy(checker: &mut Checker, target: &Expr, body: &[Stm return; } + // Avoid non-list values. + let Expr::Name(ast::ExprName { id, .. }) = value.as_ref() else { + return; + }; + let bindings: Vec<&Binding> = checker + .semantic() + .current_scope() + .get_all(id) + .map(|binding_id| checker.semantic().binding(binding_id)) + .collect(); + + let [binding] = bindings.as_slice() else { + return; + }; + + if !is_list(binding, checker.semantic()) { + return; + } + checker .diagnostics .push(Diagnostic::new(ManualListCopy, *range)); From b404e54f336b822b09a07a586ee2ca241eec94fe Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 29 Aug 2023 20:44:11 -0400 Subject: [PATCH 004/164] Remove unnecessary `Comment#slice` calls (#6997) --- .../ruff_python_formatter/src/comments/format.rs | 12 ++++-------- .../src/comments/placement.rs | 15 +++++---------- .../ruff_python_formatter/src/comments/visitor.rs | 14 ++++---------- .../src/expression/expr_slice.rs | 4 ++-- .../src/expression/string.rs | 4 ++-- .../src/other/comprehension.rs | 3 +-- .../ruff_python_formatter/src/other/parameters.rs | 2 +- .../src/statement/stmt_for.rs | 2 +- .../src/statement/stmt_try.rs | 2 +- .../src/statement/stmt_while.rs | 2 +- .../ruff_python_formatter/src/statement/suite.rs | 2 +- 11 files changed, 23 insertions(+), 39 deletions(-) diff --git a/crates/ruff_python_formatter/src/comments/format.rs b/crates/ruff_python_formatter/src/comments/format.rs index 4084d76a28..fcfa3b6811 100644 --- a/crates/ruff_python_formatter/src/comments/format.rs +++ b/crates/ruff_python_formatter/src/comments/format.rs @@ -40,9 +40,7 @@ impl Format> for FormatLeadingComments<'_> { .iter() .filter(|comment| comment.is_unformatted()) { - let slice = comment.slice(); - - let lines_after_comment = lines_after(slice.end(), f.context().source()); + let lines_after_comment = lines_after(comment.end(), f.context().source()); write!( f, [format_comment(comment), empty_lines(lines_after_comment)] @@ -83,7 +81,7 @@ impl Format> for FormatLeadingAlternateBranchComments<'_> { if let Some(first_leading) = self.comments.first() { // Leading comments only preserves the lines after the comment but not before. // Insert the necessary lines. - if lines_before(first_leading.slice().start(), f.context().source()) > 1 { + if lines_before(first_leading.start(), f.context().source()) > 1 { write!(f, [empty_line()])?; } @@ -133,12 +131,10 @@ impl Format> for FormatTrailingComments<'_> { .iter() .filter(|comment| comment.is_unformatted()) { - let slice = trailing.slice(); - has_trailing_own_line_comment |= trailing.line_position().is_own_line(); if has_trailing_own_line_comment { - let lines_before_comment = lines_before(slice.start(), f.context().source()); + let lines_before_comment = lines_before(trailing.start(), f.context().source()); // A trailing comment at the end of a body or list // ```python @@ -223,7 +219,7 @@ impl Format> for FormatDanglingComments<'_> { f, [ format_comment(comment), - empty_lines(lines_after(comment.slice().end(), f.context().source())) + empty_lines(lines_after(comment.end(), f.context().source())) ] )?; diff --git a/crates/ruff_python_formatter/src/comments/placement.rs b/crates/ruff_python_formatter/src/comments/placement.rs index 0db12e13c8..c506054b46 100644 --- a/crates/ruff_python_formatter/src/comments/placement.rs +++ b/crates/ruff_python_formatter/src/comments/placement.rs @@ -647,11 +647,10 @@ fn handle_parameters_separator_comment<'a>( locator: &Locator, ) -> CommentPlacement<'a> { let (slash, star) = find_parameter_separators(locator.contents(), parameters); - let comment_range = comment.slice().range(); let placement = assign_argument_separator_comment_placement( slash.as_ref(), star.as_ref(), - comment_range, + comment.range(), comment.line_position(), ); if placement.is_some() { @@ -695,9 +694,7 @@ fn handle_trailing_binary_expression_left_or_operator_comment<'a>( .expect("Expected a token for the operator") .start(); - let comment_range = comment.slice().range(); - - if comment_range.end() < operator_offset { + if comment.end() < operator_offset { // ```python // a = ( // 5 @@ -816,8 +813,7 @@ fn handle_module_level_own_line_comment_before_class_or_function_comment<'a>( } // Make the comment a leading comment if there's no empty line between the comment and the function / class header - if max_empty_lines(locator.slice(TextRange::new(comment.slice().end(), following.start()))) == 0 - { + if max_empty_lines(locator.slice(TextRange::new(comment.end(), following.start()))) == 0 { CommentPlacement::leading(following, comment) } else { // Otherwise attach the comment as trailing comment to the previous statement @@ -872,8 +868,7 @@ fn handle_slice_comments<'a>( return CommentPlacement::dangling(comment.enclosing_node(), comment); } - let assignment = - assign_comment_in_slice(comment.slice().range(), locator.contents(), expr_slice); + let assignment = assign_comment_in_slice(comment.range(), locator.contents(), expr_slice); let node = match assignment { ExprSliceCommentSection::Lower => lower, ExprSliceCommentSection::Upper => upper, @@ -1558,7 +1553,7 @@ fn handle_comprehension_comment<'a>( // b in c // ] // ``` - if comment.slice().end() < comprehension.target.start() { + if comment.end() < comprehension.target.start() { return if is_own_line { // own line comments are correctly assigned as leading the target CommentPlacement::Default(comment) diff --git a/crates/ruff_python_formatter/src/comments/visitor.rs b/crates/ruff_python_formatter/src/comments/visitor.rs index c6aa5abb7c..b4b94ae293 100644 --- a/crates/ruff_python_formatter/src/comments/visitor.rs +++ b/crates/ruff_python_formatter/src/comments/visitor.rs @@ -1,17 +1,16 @@ use std::iter::Peekable; -use ruff_python_ast::{Mod, Stmt}; -use ruff_text_size::{Ranged, TextRange, TextSize}; - use ruff_formatter::{SourceCode, SourceCodeSlice}; use ruff_python_ast::node::AnyNodeRef; -use ruff_python_index::CommentRanges; -use ruff_source_file::Locator; +use ruff_python_ast::{Mod, Stmt}; // The interface is designed to only export the members relevant for iterating nodes in // pre-order. #[allow(clippy::wildcard_imports)] use ruff_python_ast::visitor::preorder::*; +use ruff_python_index::CommentRanges; use ruff_python_trivia::is_python_whitespace; +use ruff_source_file::Locator; +use ruff_text_size::{Ranged, TextRange, TextSize}; use crate::comments::node_key::NodeRefEqualityKey; use crate::comments::placement::place_comment; @@ -212,11 +211,6 @@ impl<'a> DecoratedComment<'a> { self.parent } - /// Returns the slice into the source code. - pub(super) fn slice(&self) -> &SourceCodeSlice { - &self.slice - } - /// Returns the comment's preceding node. /// /// The direct child node (ignoring lists) of the [`enclosing_node`](DecoratedComment::enclosing_node) that precedes this comment. diff --git a/crates/ruff_python_formatter/src/expression/expr_slice.rs b/crates/ruff_python_formatter/src/expression/expr_slice.rs index 01a49f852f..8d1dfc627c 100644 --- a/crates/ruff_python_formatter/src/expression/expr_slice.rs +++ b/crates/ruff_python_formatter/src/expression/expr_slice.rs @@ -39,13 +39,13 @@ impl FormatNodeRule for FormatExprSlice { let slice_dangling_comments = comments.dangling(item.as_any_node_ref()); // Put the dangling comments (where the nodes are missing) into buckets let first_colon_partition_index = - slice_dangling_comments.partition_point(|x| x.slice().start() < first_colon.start()); + slice_dangling_comments.partition_point(|x| x.start() < first_colon.start()); let (dangling_lower_comments, dangling_upper_step_comments) = slice_dangling_comments.split_at(first_colon_partition_index); let (dangling_upper_comments, dangling_step_comments) = if let Some(second_colon) = &second_colon { let second_colon_partition_index = dangling_upper_step_comments - .partition_point(|x| x.slice().start() < second_colon.start()); + .partition_point(|x| x.start() < second_colon.start()); dangling_upper_step_comments.split_at(second_colon_partition_index) } else { // Without a second colon they remaining dangling comments belong between the first diff --git a/crates/ruff_python_formatter/src/expression/string.rs b/crates/ruff_python_formatter/src/expression/string.rs index e6178ef0c3..c4e53a1064 100644 --- a/crates/ruff_python_formatter/src/expression/string.rs +++ b/crates/ruff_python_formatter/src/expression/string.rs @@ -212,7 +212,7 @@ impl Format> for FormatStringContinuation<'_> { // ) // ``` let leading_comments_end = dangling_comments - .partition_point(|comment| comment.slice().start() <= token_range.start()); + .partition_point(|comment| comment.start() <= token_range.start()); let (leading_part_comments, rest) = dangling_comments.split_at(leading_comments_end); @@ -227,7 +227,7 @@ impl Format> for FormatStringContinuation<'_> { comment.line_position().is_end_of_line() && !locator.contains_line_break(TextRange::new( token_range.end(), - comment.slice().start(), + comment.start(), )) }); diff --git a/crates/ruff_python_formatter/src/other/comprehension.rs b/crates/ruff_python_formatter/src/other/comprehension.rs index 0a58fbfc38..23224f56c8 100644 --- a/crates/ruff_python_formatter/src/other/comprehension.rs +++ b/crates/ruff_python_formatter/src/other/comprehension.rs @@ -38,8 +38,7 @@ impl FormatNodeRule for FormatComprehension { let comments = f.context().comments().clone(); let dangling_item_comments = comments.dangling(item); let (before_target_comments, before_in_comments) = dangling_item_comments.split_at( - dangling_item_comments - .partition_point(|comment| comment.slice().end() < target.start()), + dangling_item_comments.partition_point(|comment| comment.end() < target.start()), ); let trailing_in_comments = comments.dangling(iter); diff --git a/crates/ruff_python_formatter/src/other/parameters.rs b/crates/ruff_python_formatter/src/other/parameters.rs index 2e6c451ae4..cb5666fbed 100644 --- a/crates/ruff_python_formatter/src/other/parameters.rs +++ b/crates/ruff_python_formatter/src/other/parameters.rs @@ -127,7 +127,7 @@ impl FormatNodeRule for FormatParameters { let assignment = assign_argument_separator_comment_placement( slash.as_ref(), star.as_ref(), - comment.slice().range(), + comment.range(), comment.line_position(), ) .expect("Unexpected dangling comment type in function parameters"); diff --git a/crates/ruff_python_formatter/src/statement/stmt_for.rs b/crates/ruff_python_formatter/src/statement/stmt_for.rs index 66a3012e81..a66cc1888b 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_for.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_for.rs @@ -42,7 +42,7 @@ impl FormatNodeRule for FormatStmtFor { let dangling_comments = comments.dangling(item); let body_start = body.first().map_or(iter.end(), Stmt::start); let or_else_comments_start = - dangling_comments.partition_point(|comment| comment.slice().end() < body_start); + dangling_comments.partition_point(|comment| comment.end() < body_start); let (trailing_condition_comments, or_else_comments) = dangling_comments.split_at(or_else_comments_start); diff --git a/crates/ruff_python_formatter/src/statement/stmt_try.rs b/crates/ruff_python_formatter/src/statement/stmt_try.rs index 63bbcd4096..3cbf7ff7f8 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_try.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_try.rs @@ -119,7 +119,7 @@ fn format_case<'a>( Ok(if let Some(last) = body.last() { let case_comments_start = - dangling_comments.partition_point(|comment| comment.slice().end() <= last.end()); + dangling_comments.partition_point(|comment| comment.end() <= last.end()); let (case_comments, rest) = dangling_comments.split_at(case_comments_start); let partition_point = case_comments.partition_point(|comment| comment.line_position().is_own_line()); diff --git a/crates/ruff_python_formatter/src/statement/stmt_while.rs b/crates/ruff_python_formatter/src/statement/stmt_while.rs index b9212831dd..af667a6cf5 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_while.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_while.rs @@ -26,7 +26,7 @@ impl FormatNodeRule for FormatStmtWhile { let body_start = body.first().map_or(test.end(), Stmt::start); let or_else_comments_start = - dangling_comments.partition_point(|comment| comment.slice().end() < body_start); + dangling_comments.partition_point(|comment| comment.end() < body_start); let (trailing_condition_comments, or_else_comments) = dangling_comments.split_at(or_else_comments_start); diff --git a/crates/ruff_python_formatter/src/statement/suite.rs b/crates/ruff_python_formatter/src/statement/suite.rs index bb29230c1e..e266554d74 100644 --- a/crates/ruff_python_formatter/src/statement/suite.rs +++ b/crates/ruff_python_formatter/src/statement/suite.rs @@ -223,7 +223,7 @@ impl FormatRule> for FormatSuite { // the leading comment. This is why the suite handling counts the lines before the // start of the next statement or before the first leading comments for compound statements. let start = if let Some(first_leading) = comments.leading(following).first() { - first_leading.slice().start() + first_leading.start() } else { following.start() }; From 31947af6a3dda383ca07f3bdef5fc8244e0f3fdb Mon Sep 17 00:00:00 2001 From: Victor Hugo Gomes Date: Wed, 30 Aug 2023 01:11:58 -0300 Subject: [PATCH 005/164] Don't "flatten" nested if expressions when formatting (#6996) --- .../test/fixtures/ruff/expression/if.py | 69 +++++++++ .../src/expression/expr_if_exp.rs | 104 ++++++++++--- ...mpatibility@conditional_expression.py.snap | 13 +- .../snapshots/format@expression__if.py.snap | 144 ++++++++++++++++++ 4 files changed, 305 insertions(+), 25 deletions(-) diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/if.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/if.py index df4c488603..b3fc460e44 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/if.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/if.py @@ -39,3 +39,72 @@ d1 = [ ("b") else # 2 ("c") ] + +e1 = ( + a + if True # 1 + else b + if False # 2 + else c +) + + +# Flattening nested if-expressions. +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else FlatValuesListIterable + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + (NamedValuesListIterable + if named + else FlatValuesListIterable) + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else (FlatValuesListIterable + if flat + else ValuesListIterable) + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else FlatValuesListIterable(1,) + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else FlatValuesListIterable + FlatValuesListIterable + FlatValuesListIterable + FlatValuesListIterable + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else (FlatValuesListIterable + FlatValuesListIterable + FlatValuesListIterable + FlatValuesListIterable + if flat + else ValuesListIterable) + ) diff --git a/crates/ruff_python_formatter/src/expression/expr_if_exp.rs b/crates/ruff_python_formatter/src/expression/expr_if_exp.rs index e774b6d0b3..07236000c1 100644 --- a/crates/ruff_python_formatter/src/expression/expr_if_exp.rs +++ b/crates/ruff_python_formatter/src/expression/expr_if_exp.rs @@ -1,16 +1,46 @@ -use ruff_formatter::{format_args, write}; +use ruff_formatter::{write, FormatRuleWithOptions}; use ruff_python_ast::node::AnyNodeRef; -use ruff_python_ast::ExprIfExp; +use ruff_python_ast::{Expr, ExprIfExp}; use crate::comments::leading_comments; use crate::expression::parentheses::{ - in_parentheses_only_group, in_parentheses_only_soft_line_break_or_space, NeedsParentheses, - OptionalParentheses, + in_parentheses_only_group, in_parentheses_only_soft_line_break_or_space, + is_expression_parenthesized, NeedsParentheses, OptionalParentheses, }; use crate::prelude::*; +#[derive(Default, Copy, Clone)] +pub enum ExprIfExpLayout { + #[default] + Default, + + /// The [`ExprIfExp`] is nested inside another [`ExprIfExp`], so it should not be given a new + /// group. For example, avoid grouping the `else` clause in: + /// ```python + /// clone._iterable_class = ( + /// NamedValuesListIterable + /// if named + /// else FlatValuesListIterable + /// if flat + /// else ValuesListIterable + /// ) + /// ``` + Nested, +} + #[derive(Default)] -pub struct FormatExprIfExp; +pub struct FormatExprIfExp { + layout: ExprIfExpLayout, +} + +impl FormatRuleWithOptions> for FormatExprIfExp { + type Options = ExprIfExpLayout; + + fn with_options(mut self, options: Self::Options) -> Self { + self.layout = options; + self + } +} impl FormatNodeRule for FormatExprIfExp { fn fmt_fields(&self, item: &ExprIfExp, f: &mut PyFormatter) -> FormatResult<()> { @@ -22,25 +52,33 @@ impl FormatNodeRule for FormatExprIfExp { } = item; let comments = f.context().comments().clone(); - // We place `if test` and `else orelse` on a single line, so the `test` and `orelse` leading - // comments go on the line before the `if` or `else` instead of directly ahead `test` or - // `orelse` - write!( - f, - [in_parentheses_only_group(&format_args![ - body.format(), - in_parentheses_only_soft_line_break_or_space(), - leading_comments(comments.leading(test.as_ref())), - text("if"), - space(), - test.format(), - in_parentheses_only_soft_line_break_or_space(), - leading_comments(comments.leading(orelse.as_ref())), - text("else"), - space(), - orelse.format() - ])] - ) + let inner = format_with(|f: &mut PyFormatter| { + // We place `if test` and `else orelse` on a single line, so the `test` and `orelse` leading + // comments go on the line before the `if` or `else` instead of directly ahead `test` or + // `orelse` + write!( + f, + [ + body.format(), + in_parentheses_only_soft_line_break_or_space(), + leading_comments(comments.leading(test.as_ref())), + text("if"), + space(), + test.format(), + in_parentheses_only_soft_line_break_or_space(), + leading_comments(comments.leading(orelse.as_ref())), + text("else"), + space(), + ] + )?; + + FormatOrElse { orelse }.fmt(f) + }); + + match self.layout { + ExprIfExpLayout::Default => in_parentheses_only_group(&inner).fmt(f), + ExprIfExpLayout::Nested => inner.fmt(f), + } } } @@ -53,3 +91,21 @@ impl NeedsParentheses for ExprIfExp { OptionalParentheses::Multiline } } + +#[derive(Debug)] +struct FormatOrElse<'a> { + orelse: &'a Expr, +} + +impl Format> for FormatOrElse<'_> { + fn fmt(&self, f: &mut Formatter>) -> FormatResult<()> { + match self.orelse { + Expr::IfExp(expr) + if !is_expression_parenthesized(expr.into(), f.context().source()) => + { + write!(f, [expr.format().with_options(ExprIfExpLayout::Nested)]) + } + _ => write!(f, [in_parentheses_only_group(&self.orelse.format())]), + } + } +} diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@conditional_expression.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@conditional_expression.py.snap index 2536898905..f7012d70b5 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@conditional_expression.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@conditional_expression.py.snap @@ -136,6 +136,15 @@ def something(): for some_boolean_variable in some_iterable ) +@@ -86,5 +78,7 @@ + clone._iterable_class = ( + NamedValuesListIterable + if named +- else FlatValuesListIterable if flat else ValuesListIterable ++ else FlatValuesListIterable ++ if flat ++ else ValuesListIterable + ) ``` ## Ruff Output @@ -221,7 +230,9 @@ def something(): clone._iterable_class = ( NamedValuesListIterable if named - else FlatValuesListIterable if flat else ValuesListIterable + else FlatValuesListIterable + if flat + else ValuesListIterable ) ``` diff --git a/crates/ruff_python_formatter/tests/snapshots/format@expression__if.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@expression__if.py.snap index f5a195c622..7aa5a080c8 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@expression__if.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@expression__if.py.snap @@ -45,6 +45,75 @@ d1 = [ ("b") else # 2 ("c") ] + +e1 = ( + a + if True # 1 + else b + if False # 2 + else c +) + + +# Flattening nested if-expressions. +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else FlatValuesListIterable + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + (NamedValuesListIterable + if named + else FlatValuesListIterable) + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else (FlatValuesListIterable + if flat + else ValuesListIterable) + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else FlatValuesListIterable(1,) + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else FlatValuesListIterable + FlatValuesListIterable + FlatValuesListIterable + FlatValuesListIterable + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else (FlatValuesListIterable + FlatValuesListIterable + FlatValuesListIterable + FlatValuesListIterable + if flat + else ValuesListIterable) + ) ``` ## Output @@ -96,6 +165,81 @@ d1 = [ # 2 else ("c") ] + +e1 = ( + a + if True # 1 + else b + if False # 2 + else c +) + + +# Flattening nested if-expressions. +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else FlatValuesListIterable + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + (NamedValuesListIterable if named else FlatValuesListIterable) + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else (FlatValuesListIterable if flat else ValuesListIterable) + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else FlatValuesListIterable( + 1, + ) + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else FlatValuesListIterable + + FlatValuesListIterable + + FlatValuesListIterable + + FlatValuesListIterable + if flat + else ValuesListIterable + ) + + +def something(): + clone._iterable_class = ( + NamedValuesListIterable + if named + else ( + FlatValuesListIterable + + FlatValuesListIterable + + FlatValuesListIterable + + FlatValuesListIterable + if flat + else ValuesListIterable + ) + ) ``` From eb2b22614222b0c83e3bfb60d73f89d94aa1490d Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 30 Aug 2023 02:20:28 -0400 Subject: [PATCH 006/164] Unset `after_class_docstring` state on every iteration (#7001) --- .../ruff/statement/class_definition.py | 16 ++++++++++ .../src/statement/suite.rs | 2 +- ...format@statement__class_definition.py.snap | 32 +++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/class_definition.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/class_definition.py index 442441465e..296b4a79ad 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/class_definition.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/class_definition.py @@ -206,3 +206,19 @@ class TestTypeParams[Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa class TestTypeParams[A, B, C](meta=Aaaaaaaaaaaaaaaaaaaaaa): pass + + +# Regression test for: https://github.com/astral-sh/ruff/pull/7001 +class QuerySet(AltersData): + """Represent a lazy database lookup for a set of objects.""" + + def as_manager(cls): + # Address the circular dependency between `Queryset` and `Manager`. + from django.db.models.manager import Manager + + manager = Manager.from_queryset(cls)() + manager._built_with_as_manager = True + return manager + + as_manager.queryset_only = True + as_manager = classmethod(as_manager) diff --git a/crates/ruff_python_formatter/src/statement/suite.rs b/crates/ruff_python_formatter/src/statement/suite.rs index e266554d74..6d1595b5e5 100644 --- a/crates/ruff_python_formatter/src/statement/suite.rs +++ b/crates/ruff_python_formatter/src/statement/suite.rs @@ -255,7 +255,6 @@ impl FormatRule> for FormatSuite { // ... // ``` empty_line().fmt(f)?; - after_class_docstring = false; } else { // Insert the appropriate number of empty lines based on the node level, e.g.: // * [`NodeLevel::Module`]: Up to two empty lines @@ -320,6 +319,7 @@ impl FormatRule> for FormatSuite { following.format().fmt(f)?; preceding = following; } + after_class_docstring = false; } Ok(()) diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__class_definition.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__class_definition.py.snap index 185579f079..9258c1ca71 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__class_definition.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__class_definition.py.snap @@ -212,6 +212,22 @@ class TestTypeParams[Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa class TestTypeParams[A, B, C](meta=Aaaaaaaaaaaaaaaaaaaaaa): pass + + +# Regression test for: https://github.com/astral-sh/ruff/pull/7001 +class QuerySet(AltersData): + """Represent a lazy database lookup for a set of objects.""" + + def as_manager(cls): + # Address the circular dependency between `Queryset` and `Manager`. + from django.db.models.manager import Manager + + manager = Manager.from_queryset(cls)() + manager._built_with_as_manager = True + return manager + + as_manager.queryset_only = True + as_manager = classmethod(as_manager) ``` ## Output @@ -459,6 +475,22 @@ class TestTypeParams[ class TestTypeParams[A, B, C](meta=Aaaaaaaaaaaaaaaaaaaaaa): pass + + +# Regression test for: https://github.com/astral-sh/ruff/pull/7001 +class QuerySet(AltersData): + """Represent a lazy database lookup for a set of objects.""" + + def as_manager(cls): + # Address the circular dependency between `Queryset` and `Manager`. + from django.db.models.manager import Manager + + manager = Manager.from_queryset(cls)() + manager._built_with_as_manager = True + return manager + + as_manager.queryset_only = True + as_manager = classmethod(as_manager) ``` From 9c382e829124430b6843cf8398eb7bce727219e6 Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Wed, 30 Aug 2023 08:47:45 +0200 Subject: [PATCH 007/164] Show changed files (#7003) --- crates/ruff_dev/src/format_dev.rs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/crates/ruff_dev/src/format_dev.rs b/crates/ruff_dev/src/format_dev.rs index 604327fc78..4f7f2a3f65 100644 --- a/crates/ruff_dev/src/format_dev.rs +++ b/crates/ruff_dev/src/format_dev.rs @@ -94,6 +94,8 @@ pub(crate) struct Statistics { ruff_output: u32, /// The number of matching identical lines intersection: u32, + /// Files that have differences + files_with_differences: u32, } impl Statistics { @@ -104,6 +106,7 @@ impl Statistics { black_input: 0, ruff_output: 0, intersection, + files_with_differences: 0, } } else { // `similar` was too slow (for some files >90% diffing instead of formatting) @@ -117,6 +120,7 @@ impl Statistics { black_input: changes.removals, ruff_output: changes.insertions, intersection: u32::try_from(input.before.len()).unwrap() - changes.removals, + files_with_differences: 1, } } } @@ -141,6 +145,7 @@ impl Add for Statistics { black_input: self.black_input + rhs.black_input, ruff_output: self.ruff_output + rhs.ruff_output, intersection: self.intersection + rhs.intersection, + files_with_differences: self.files_with_differences + rhs.files_with_differences, } } } @@ -231,10 +236,11 @@ pub(crate) fn main(args: &Args) -> anyhow::Result { } info!( parent: None, - "Done: {} stability errors, {} files, similarity index {:.5}), took {:.2}s, {} input files contained syntax errors ", + "Done: {} stability errors, {} files, similarity index {:.5}), files with differences: {} took {:.2}s, {} input files contained syntax errors ", error_count, result.file_count, result.statistics.similarity_index(), + result.statistics.files_with_differences, result.duration.as_secs_f32(), result.syntax_error_in_input, ); @@ -336,11 +342,12 @@ fn format_dev_multi_project( info!( parent: None, - "Finished {}: {} stability errors, {} files, similarity index {:.5}), took {:.2}s, {} input files contained syntax errors ", + "Finished {}: {} stability errors, {} files, similarity index {:.5}), files with differences {}, took {:.2}s, {} input files contained syntax errors ", project_path.display(), result.error_count(), result.file_count, result.statistics.similarity_index(), + result.statistics.files_with_differences, result.duration.as_secs_f32(), result.syntax_error_in_input, ); @@ -387,20 +394,22 @@ fn format_dev_multi_project( let mut stats_file = BufWriter::new(File::create(stats_file)?); writeln!( stats_file, - "| {: Date: Wed, 30 Aug 2023 09:57:57 +0200 Subject: [PATCH 008/164] Add unicode benchmark (#7002) --- Cargo.lock | 42 ++++++++++++++-------- crates/ruff_benchmark/benches/formatter.rs | 10 ++---- crates/ruff_benchmark/benches/linter.rs | 10 ++---- crates/ruff_benchmark/benches/parser.rs | 11 ++---- 4 files changed, 33 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 24f7e2ccc2..ebe84be395 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -610,9 +610,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -620,9 +620,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", @@ -634,15 +634,24 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.1" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", "syn 2.0.23", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" +dependencies = [ + "serde", +] + [[package]] name = "diff" version = "0.1.13" @@ -1071,6 +1080,7 @@ checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", "hashbrown 0.14.0", + "serde", ] [[package]] @@ -2786,25 +2796,26 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.0.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513" +checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237" dependencies = [ "base64", "chrono", "hex", "indexmap 1.9.3", + "indexmap 2.0.0", "serde", "serde_json", "serde_with_macros", - "time 0.3.22", + "time 0.3.26", ] [[package]] name = "serde_with_macros" -version = "3.0.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" +checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c" dependencies = [ "darling", "proc-macro2", @@ -3089,10 +3100,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.22" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07" dependencies = [ + "deranged", "itoa", "serde", "time-core", @@ -3107,9 +3119,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "75c65469ed6b3a4809d987a41eb1dc918e9bc1d92211cbad7ae82931846f7451" dependencies = [ "time-core", ] diff --git a/crates/ruff_benchmark/benches/formatter.rs b/crates/ruff_benchmark/benches/formatter.rs index cc52e167c0..603f13555c 100644 --- a/crates/ruff_benchmark/benches/formatter.rs +++ b/crates/ruff_benchmark/benches/formatter.rs @@ -1,10 +1,9 @@ use std::path::Path; -use std::time::Duration; use ruff_benchmark::criterion::{ criterion_group, criterion_main, BenchmarkId, Criterion, Throughput, }; -use ruff_benchmark::{TestCase, TestCaseSpeed, TestFile, TestFileDownloadError}; +use ruff_benchmark::{TestCase, TestFile, TestFileDownloadError}; use ruff_python_formatter::{format_node, PyFormatOptions}; use ruff_python_index::CommentRangesBuilder; use ruff_python_parser::lexer::lex; @@ -29,6 +28,7 @@ static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; fn create_test_cases() -> Result, TestFileDownloadError> { Ok(vec![ TestCase::fast(TestFile::try_download("numpy/globals.py", "https://raw.githubusercontent.com/numpy/numpy/89d64415e349ca75a25250f22b874aa16e5c0973/numpy/_globals.py")?), + TestCase::fast(TestFile::try_download("unicode/pypinyin.py", "https://raw.githubusercontent.com/mozillazg/python-pinyin/9521e47d96e3583a5477f5e43a2e82d513f27a3f/pypinyin/standard.py")?), TestCase::normal(TestFile::try_download( "pydantic/types.py", "https://raw.githubusercontent.com/pydantic/pydantic/83b3c49e99ceb4599d9286a3d793cea44ac36d4b/pydantic/types.py", @@ -48,12 +48,6 @@ fn benchmark_formatter(criterion: &mut Criterion) { for case in test_cases { group.throughput(Throughput::Bytes(case.code().len() as u64)); - group.measurement_time(match case.speed() { - TestCaseSpeed::Fast => Duration::from_secs(5), - TestCaseSpeed::Normal => Duration::from_secs(10), - TestCaseSpeed::Slow => Duration::from_secs(20), - }); - group.bench_with_input( BenchmarkId::from_parameter(case.name()), &case, diff --git a/crates/ruff_benchmark/benches/linter.rs b/crates/ruff_benchmark/benches/linter.rs index f48b55b7d7..950d9cac88 100644 --- a/crates/ruff_benchmark/benches/linter.rs +++ b/crates/ruff_benchmark/benches/linter.rs @@ -1,5 +1,3 @@ -use std::time::Duration; - use ruff::linter::lint_only; use ruff::settings::{flags, Settings}; use ruff::source_kind::SourceKind; @@ -7,7 +5,7 @@ use ruff::RuleSelector; use ruff_benchmark::criterion::{ criterion_group, criterion_main, BenchmarkGroup, BenchmarkId, Criterion, Throughput, }; -use ruff_benchmark::{TestCase, TestCaseSpeed, TestFile, TestFileDownloadError}; +use ruff_benchmark::{TestCase, TestFile, TestFileDownloadError}; use ruff_python_ast::PySourceType; #[cfg(target_os = "windows")] @@ -29,6 +27,7 @@ static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; fn create_test_cases() -> Result, TestFileDownloadError> { Ok(vec![ TestCase::fast(TestFile::try_download("numpy/globals.py", "https://raw.githubusercontent.com/numpy/numpy/89d64415e349ca75a25250f22b874aa16e5c0973/numpy/_globals.py")?), + TestCase::fast(TestFile::try_download("unicode/pypinyin.py", "https://raw.githubusercontent.com/mozillazg/python-pinyin/9521e47d96e3583a5477f5e43a2e82d513f27a3f/pypinyin/standard.py")?), TestCase::normal(TestFile::try_download( "pydantic/types.py", "https://raw.githubusercontent.com/pydantic/pydantic/83b3c49e99ceb4599d9286a3d793cea44ac36d4b/pydantic/types.py", @@ -46,11 +45,6 @@ fn benchmark_linter(mut group: BenchmarkGroup, settings: &Settings) { for case in test_cases { group.throughput(Throughput::Bytes(case.code().len() as u64)); - group.measurement_time(match case.speed() { - TestCaseSpeed::Fast => Duration::from_secs(10), - TestCaseSpeed::Normal => Duration::from_secs(20), - TestCaseSpeed::Slow => Duration::from_secs(45), - }); group.bench_with_input( BenchmarkId::from_parameter(case.name()), diff --git a/crates/ruff_benchmark/benches/parser.rs b/crates/ruff_benchmark/benches/parser.rs index 4efbb72f3c..6d208c78fd 100644 --- a/crates/ruff_benchmark/benches/parser.rs +++ b/crates/ruff_benchmark/benches/parser.rs @@ -1,9 +1,7 @@ -use std::time::Duration; - use ruff_benchmark::criterion::{ criterion_group, criterion_main, measurement::WallTime, BenchmarkId, Criterion, Throughput, }; -use ruff_benchmark::{TestCase, TestCaseSpeed, TestFile, TestFileDownloadError}; +use ruff_benchmark::{TestCase, TestFile, TestFileDownloadError}; use ruff_python_ast::statement_visitor::{walk_stmt, StatementVisitor}; use ruff_python_ast::Stmt; use ruff_python_parser::parse_suite; @@ -27,6 +25,7 @@ static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; fn create_test_cases() -> Result, TestFileDownloadError> { Ok(vec![ TestCase::fast(TestFile::try_download("numpy/globals.py", "https://raw.githubusercontent.com/numpy/numpy/89d64415e349ca75a25250f22b874aa16e5c0973/numpy/_globals.py")?), + TestCase::fast(TestFile::try_download("unicode/pypinyin.py", "https://raw.githubusercontent.com/mozillazg/python-pinyin/9521e47d96e3583a5477f5e43a2e82d513f27a3f/pypinyin/standard.py")?), TestCase::normal(TestFile::try_download( "pydantic/types.py", "https://raw.githubusercontent.com/pydantic/pydantic/83b3c49e99ceb4599d9286a3d793cea44ac36d4b/pydantic/types.py", @@ -56,12 +55,6 @@ fn benchmark_parser(criterion: &mut Criterion) { for case in test_cases { group.throughput(Throughput::Bytes(case.code().len() as u64)); - group.measurement_time(match case.speed() { - TestCaseSpeed::Fast => Duration::from_secs(10), - TestCaseSpeed::Normal => Duration::from_secs(20), - TestCaseSpeed::Slow => Duration::from_secs(45), - }); - group.bench_with_input( BenchmarkId::from_parameter(case.name()), &case, From a3f4d7745a23c64f0860027c060ba554bc27a7d5 Mon Sep 17 00:00:00 2001 From: Chris Pryer <14341145+cnpryer@users.noreply.github.com> Date: Wed, 30 Aug 2023 04:07:11 -0400 Subject: [PATCH 009/164] Use reserved width to include line suffix measurement (#6901) Co-authored-by: Micha Reiser --- .../comments_non_breaking_space.py | 2 +- .../test/fixtures/ruff/expression/tuple.py | 3 + .../test/fixtures/ruff/trailing_comments.py | 6 + .../src/comments/format.rs | 219 ++++++++++++----- .../src/expression/mod.rs | 11 +- ...patibility@simple_cases__comments6.py.snap | 11 +- ...atibility@simple_cases__expression.py.snap | 19 +- ...ity@simple_cases__power_op_spacing.py.snap | 232 ++++++++++++++++++ ...@simple_cases__remove_await_parens.py.snap | 13 +- ...ompatibility@simple_cases__torture.py.snap | 15 +- .../format@expression__tuple.py.snap | 7 + .../format@parentheses__call_chains.py.snap | 4 +- .../format@statement__delete.py.snap | 8 +- .../snapshots/format@statement__try.py.snap | 4 +- .../snapshots/format@statement__while.py.snap | 4 +- .../format@trailing_comments.py.snap | 26 ++ 16 files changed, 504 insertions(+), 80 deletions(-) create mode 100644 crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_comments.py create mode 100644 crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__power_op_spacing.py.snap create mode 100644 crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap diff --git a/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments_non_breaking_space.py b/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments_non_breaking_space.py index d1d42f0259..0c5f5660eb 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments_non_breaking_space.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments_non_breaking_space.py @@ -14,6 +14,6 @@ def function(a:int=42): a b """ - #  There's a NBSP + 3 spaces before + #    There's a NBSP + 3 spaces before # And 4 spaces on the next line pass diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/tuple.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/tuple.py index 9c6c5a6d5b..af5273484d 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/tuple.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/tuple.py @@ -66,3 +66,6 @@ g2 = ( # a h1 = ((((1, 2)))) h2 = ((((1, "qweiurpoiqwurepqiurpqirpuqoiwrupqoirupqoirupqoiurpqiorupwqiourpqurpqurpqurpqurpqurpqurüqurqpuriq")))) h3 = 1, "qweiurpoiqwurepqiurpqirpuqoiwrupqoirupqoirupqoiurpqiorupwqiourpqurpqurpqurpqurpqurpqurüqurqpuriq" + +i1 = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # This should break + diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_comments.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_comments.py new file mode 100644 index 0000000000..5bfe148cf5 --- /dev/null +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_comments.py @@ -0,0 +1,6 @@ +# As of adding this fixture Black adds a space before the non-breaking space if part of a type pragma. +# https://github.com/psf/black/blob/b4dca26c7d93f930bbd5a7b552807370b60d4298/src/black/comments.py#L122-L129 +i2 = "" #  type: Add space before leading NBSP followed by spaces +i3 = "" #type: A space is added +i4 = "" #  type: Add space before leading NBSP followed by a space +i5 = "" # type: Add space before leading NBSP diff --git a/crates/ruff_python_formatter/src/comments/format.rs b/crates/ruff_python_formatter/src/comments/format.rs index fcfa3b6811..7be01669e3 100644 --- a/crates/ruff_python_formatter/src/comments/format.rs +++ b/crates/ruff_python_formatter/src/comments/format.rs @@ -1,6 +1,9 @@ -use ruff_text_size::{Ranged, TextLen, TextRange, TextSize}; +use std::borrow::Cow; +use unicode_width::UnicodeWidthChar; -use ruff_formatter::{format_args, write, FormatError, SourceCode}; +use ruff_text_size::{Ranged, TextLen, TextRange}; + +use ruff_formatter::{format_args, write, FormatError, FormatOptions, SourceCode}; use ruff_python_ast::node::{AnyNodeRef, AstNode}; use ruff_python_trivia::{lines_after, lines_after_ignoring_trivia, lines_before}; @@ -151,19 +154,22 @@ impl Format> for FormatTrailingComments<'_> { empty_lines(lines_before_comment), format_comment(trailing) ], + // Reserving width isn't necessary because we don't split + // comments and the empty lines expand any enclosing group. 0 ), expand_parent() ] )?; } else { - write!( - f, - [ - line_suffix(&format_args![space(), space(), format_comment(trailing)], 0), - expand_parent() - ] - )?; + // A trailing comment at the end of a line has a reserved width to + // consider during line measurement. + // ```python + // tup = ( + // "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + // ) # Some comment + // ``` + trailing_end_of_line_comment(trailing).fmt(f)?; } trailing.mark_formatted(); @@ -262,13 +268,7 @@ impl Format> for FormatDanglingOpenParenthesisComments<'_> { "Expected dangling comment to be at the end of the line" ); - write!( - f, - [ - line_suffix(&format_args!(space(), space(), format_comment(comment)), 0), - expand_parent() - ] - )?; + trailing_end_of_line_comment(comment).fmt(f)?; comment.mark_formatted(); } @@ -291,50 +291,11 @@ pub(crate) struct FormatComment<'a> { impl Format> for FormatComment<'_> { fn fmt(&self, f: &mut PyFormatter) -> FormatResult<()> { let slice = self.comment.slice(); - let comment_text = slice.text(SourceCode::new(f.context().source())); + let source = SourceCode::new(f.context().source()); - let trimmed = comment_text.trim_end(); - let trailing_whitespace_len = comment_text.text_len() - trimmed.text_len(); + let normalized_comment = normalize_comment(self.comment, source)?; - let Some(content) = trimmed.strip_prefix('#') else { - return Err(FormatError::syntax_error( - "Didn't find expected comment token `#`", - )); - }; - - // Fast path for correctly formatted comments: - // * Start with a `#` and are followed by a space - // * Have no trailing whitespace. - if trailing_whitespace_len == TextSize::new(0) && content.starts_with(' ') { - return source_text_slice(slice.range(), ContainsNewlines::No).fmt(f); - } - - write!(f, [source_position(slice.start()), text("#")])?; - - // Starts with a non breaking space - let start_offset = - if content.starts_with('\u{A0}') && !content.trim_start().starts_with("type:") { - // Replace non-breaking space with a space (if not followed by a normal space) - "#\u{A0}".text_len() - } else { - '#'.text_len() - }; - - // Add a space between the `#` and the text if the source contains none. - if !content.is_empty() && !content.starts_with([' ', '!', ':', '#', '\'']) { - write!(f, [space()])?; - } - - let start = slice.start() + start_offset; - let end = slice.end() - trailing_whitespace_len; - - write!( - f, - [ - source_text_slice(TextRange::new(start, end), ContainsNewlines::No), - source_position(slice.end()) - ] - ) + format_normalized_comment(normalized_comment, slice.range()).fmt(f) } } @@ -372,3 +333,145 @@ impl Format> for FormatEmptyLines { } } } + +/// A helper that constructs a formattable element using a reserved-width line-suffix +/// for normalized comments. +/// +/// * Black normalization of `SourceComment`. +/// * Line suffix with reserved width for the final, normalized content. +/// * Expands parent node. +pub(crate) const fn trailing_end_of_line_comment( + comment: &SourceComment, +) -> FormatTrailingEndOfLineComment { + FormatTrailingEndOfLineComment { comment } +} + +pub(crate) struct FormatTrailingEndOfLineComment<'a> { + comment: &'a SourceComment, +} + +impl Format> for FormatTrailingEndOfLineComment<'_> { + fn fmt(&self, f: &mut PyFormatter) -> FormatResult<()> { + let slice = self.comment.slice(); + let source = SourceCode::new(f.context().source()); + + let normalized_comment = normalize_comment(self.comment, source)?; + + // Start with 2 because of the two leading spaces. + let mut reserved_width = 2; + + // SAFE: The formatted file is <= 4GB, and each comment should as well. + #[allow(clippy::cast_possible_truncation)] + for c in normalized_comment.chars() { + reserved_width += match c { + '\t' => f.options().tab_width().value(), + c => c.width().unwrap_or(0) as u32, + } + } + + write!( + f, + [ + line_suffix( + &format_args![ + space(), + space(), + format_normalized_comment(normalized_comment, slice.range()) + ], + reserved_width + ), + expand_parent() + ] + ) + } +} + +/// A helper that constructs formattable normalized comment text as efficiently as +/// possible. +/// +/// * If the content is unaltered then format with source text slice strategy and no +/// unnecessary allocations. +/// * If the content is modified then make as few allocations as possible and use +/// a dynamic text element at the original slice's start position. +pub(crate) const fn format_normalized_comment( + comment: Cow<'_, str>, + range: TextRange, +) -> FormatNormalizedComment<'_> { + FormatNormalizedComment { comment, range } +} + +pub(crate) struct FormatNormalizedComment<'a> { + comment: Cow<'a, str>, + range: TextRange, +} + +impl Format> for FormatNormalizedComment<'_> { + fn fmt(&self, f: &mut Formatter) -> FormatResult<()> { + match self.comment { + Cow::Borrowed(borrowed) => source_text_slice( + TextRange::at(self.range.start(), borrowed.text_len()), + ContainsNewlines::No, + ) + .fmt(f), + + Cow::Owned(ref owned) => { + write!( + f, + [ + dynamic_text(owned, Some(self.range.start())), + source_position(self.range.end()) + ] + ) + } + } + } +} + +/// A helper for normalizing comments efficiently. +/// +/// * Return as fast as possible without making unnecessary allocations. +/// * Trim any trailing whitespace. +/// * Normalize for a leading '# '. +/// * Retain non-breaking spaces for 'type:' pragmas by leading with '# \u{A0}'. +fn normalize_comment<'a>( + comment: &'a SourceComment, + source: SourceCode<'a>, +) -> FormatResult> { + let slice = comment.slice(); + let comment_text = slice.text(source); + + let trimmed = comment_text.trim_end(); + + let Some(content) = trimmed.strip_prefix('#') else { + return Err(FormatError::syntax_error( + "Didn't find expected comment token `#`", + )); + }; + + if content.is_empty() { + return Ok(Cow::Borrowed("#")); + } + + // Fast path for correctly formatted comments: + // * Start with a `# '. + // * Have no trailing whitespace. + if content.starts_with([' ', '!', ':', '#', '\'']) { + return Ok(Cow::Borrowed(trimmed)); + } + + if content.starts_with('\u{A0}') { + let trimmed = content.trim_start_matches('\u{A0}'); + + // Black adds a space before the non-breaking space if part of a type pragma. + if trimmed.trim_start().starts_with("type:") { + return Ok(Cow::Owned(std::format!("# \u{A0}{trimmed}"))); + } + + // Black replaces the non-breaking space with a space if followed by a space. + if trimmed.starts_with(' ') { + return Ok(Cow::Owned(std::format!("# {trimmed}"))); + } + } + + Ok(Cow::Owned(std::format!("# {}", content.trim_start()))) +} diff --git a/crates/ruff_python_formatter/src/expression/mod.rs b/crates/ruff_python_formatter/src/expression/mod.rs index 4e525bebc9..8904e470e4 100644 --- a/crates/ruff_python_formatter/src/expression/mod.rs +++ b/crates/ruff_python_formatter/src/expression/mod.rs @@ -247,10 +247,13 @@ impl Format> for MaybeParenthesizeExpression<'_> { if format_expression.inspect(f)?.will_break() { // The group here is necessary because `format_expression` may contain IR elements // that refer to the group id - group(&format_expression) - .with_group_id(Some(group_id)) - .should_expand(true) - .fmt(f) + group(&format_args![ + text("("), + soft_block_indent(&format_expression), + text(")") + ]) + .with_group_id(Some(group_id)) + .fmt(f) } else { // Only add parentheses if it makes the expression fit on the line. // Using the flat version as the most expanded version gives a left-to-right splitting behavior diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__comments6.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__comments6.py.snap index 6725d8d840..f48ec014b3 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__comments6.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__comments6.py.snap @@ -156,7 +156,7 @@ aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*ite ) -@@ -108,11 +112,18 @@ +@@ -108,11 +112,20 @@ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ) @@ -176,7 +176,10 @@ aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*ite + ], # type: ignore ) - aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*items))) # type: ignore[arg-type] +-aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*items))) # type: ignore[arg-type] ++aaaaaaaaaaaaa, bbbbbbbbb = map( ++ list, map(itertools.chain.from_iterable, zip(*items)) ++) # type: ignore[arg-type] ``` ## Ruff Output @@ -310,7 +313,9 @@ call_to_some_function_asdf( ], # type: ignore ) -aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*items))) # type: ignore[arg-type] +aaaaaaaaaaaaa, bbbbbbbbb = map( + list, map(itertools.chain.from_iterable, zip(*items)) +) # type: ignore[arg-type] ``` ## Black Output diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap index 86a5b37df9..e55f593032 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap @@ -300,7 +300,18 @@ last_call() ) # note: no trailing comma pre-3.6 call(*gidgets[:2]) call(a, *gidgets[:2]) -@@ -328,13 +329,18 @@ +@@ -142,7 +143,9 @@ + xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( # type: ignore + sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__) + ) +-xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( # type: ignore ++xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[ ++ ..., List[SomeClass] ++] = classmethod( # type: ignore + sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__) + ) + xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( +@@ -328,13 +331,18 @@ ): return True if ( @@ -322,7 +333,7 @@ last_call() ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l**aaaaaaaa.m // aaaaaaaa.n ): return True -@@ -342,7 +348,8 @@ +@@ -342,7 +350,8 @@ ~aaaaaaaaaaaaaaaa.a + aaaaaaaaaaaaaaaa.b - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e @@ -482,7 +493,9 @@ very_long_variable_name_filters: t.List[ xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( # type: ignore sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__) ) -xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( # type: ignore +xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[ + ..., List[SomeClass] +] = classmethod( # type: ignore sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__) ) xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__power_op_spacing.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__power_op_spacing.py.snap new file mode 100644 index 0000000000..de37c70486 --- /dev/null +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__power_op_spacing.py.snap @@ -0,0 +1,232 @@ +--- +source: crates/ruff_python_formatter/tests/fixtures.rs +input_file: crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/power_op_spacing.py +--- +## Input + +```py +def function(**kwargs): + t = a**2 + b**3 + return t ** 2 + + +def function_replace_spaces(**kwargs): + t = a **2 + b** 3 + c ** 4 + + +def function_dont_replace_spaces(): + {**a, **b, **c} + + +a = 5**~4 +b = 5 ** f() +c = -(5**2) +d = 5 ** f["hi"] +e = lazy(lambda **kwargs: 5) +f = f() ** 5 +g = a.b**c.d +h = 5 ** funcs.f() +i = funcs.f() ** 5 +j = super().name ** 5 +k = [(2**idx, value) for idx, value in pairs] +l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) +m = [([2**63], [1, 2**63])] +n = count <= 10**5 +o = settings(max_examples=10**6) +p = {(k, k**2): v**2 for k, v in pairs} +q = [10**i for i in range(6)] +r = x**y + +a = 5.0**~4.0 +b = 5.0 ** f() +c = -(5.0**2.0) +d = 5.0 ** f["hi"] +e = lazy(lambda **kwargs: 5) +f = f() ** 5.0 +g = a.b**c.d +h = 5.0 ** funcs.f() +i = funcs.f() ** 5.0 +j = super().name ** 5.0 +k = [(2.0**idx, value) for idx, value in pairs] +l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) +m = [([2.0**63.0], [1.0, 2**63.0])] +n = count <= 10**5.0 +o = settings(max_examples=10**6.0) +p = {(k, k**2): v**2.0 for k, v in pairs} +q = [10.5**i for i in range(6)] + + +# WE SHOULD DEFINITELY NOT EAT THESE COMMENTS (https://github.com/psf/black/issues/2873) +if hasattr(view, "sum_of_weights"): + return np.divide( # type: ignore[no-any-return] + view.variance, # type: ignore[union-attr] + view.sum_of_weights, # type: ignore[union-attr] + out=np.full(view.sum_of_weights.shape, np.nan), # type: ignore[union-attr] + where=view.sum_of_weights**2 > view.sum_of_weights_squared, # type: ignore[union-attr] + ) + +return np.divide( + where=view.sum_of_weights_of_weight_long**2 > view.sum_of_weights_squared, # type: ignore +) +``` + +## Black Differences + +```diff +--- Black ++++ Ruff +@@ -55,9 +55,11 @@ + view.variance, # type: ignore[union-attr] + view.sum_of_weights, # type: ignore[union-attr] + out=np.full(view.sum_of_weights.shape, np.nan), # type: ignore[union-attr] +- where=view.sum_of_weights**2 > view.sum_of_weights_squared, # type: ignore[union-attr] ++ where=view.sum_of_weights**2 ++ > view.sum_of_weights_squared, # type: ignore[union-attr] + ) + + return np.divide( +- where=view.sum_of_weights_of_weight_long**2 > view.sum_of_weights_squared, # type: ignore ++ where=view.sum_of_weights_of_weight_long**2 ++ > view.sum_of_weights_squared, # type: ignore + ) +``` + +## Ruff Output + +```py +def function(**kwargs): + t = a**2 + b**3 + return t**2 + + +def function_replace_spaces(**kwargs): + t = a**2 + b**3 + c**4 + + +def function_dont_replace_spaces(): + {**a, **b, **c} + + +a = 5**~4 +b = 5 ** f() +c = -(5**2) +d = 5 ** f["hi"] +e = lazy(lambda **kwargs: 5) +f = f() ** 5 +g = a.b**c.d +h = 5 ** funcs.f() +i = funcs.f() ** 5 +j = super().name ** 5 +k = [(2**idx, value) for idx, value in pairs] +l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) +m = [([2**63], [1, 2**63])] +n = count <= 10**5 +o = settings(max_examples=10**6) +p = {(k, k**2): v**2 for k, v in pairs} +q = [10**i for i in range(6)] +r = x**y + +a = 5.0**~4.0 +b = 5.0 ** f() +c = -(5.0**2.0) +d = 5.0 ** f["hi"] +e = lazy(lambda **kwargs: 5) +f = f() ** 5.0 +g = a.b**c.d +h = 5.0 ** funcs.f() +i = funcs.f() ** 5.0 +j = super().name ** 5.0 +k = [(2.0**idx, value) for idx, value in pairs] +l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) +m = [([2.0**63.0], [1.0, 2**63.0])] +n = count <= 10**5.0 +o = settings(max_examples=10**6.0) +p = {(k, k**2): v**2.0 for k, v in pairs} +q = [10.5**i for i in range(6)] + + +# WE SHOULD DEFINITELY NOT EAT THESE COMMENTS (https://github.com/psf/black/issues/2873) +if hasattr(view, "sum_of_weights"): + return np.divide( # type: ignore[no-any-return] + view.variance, # type: ignore[union-attr] + view.sum_of_weights, # type: ignore[union-attr] + out=np.full(view.sum_of_weights.shape, np.nan), # type: ignore[union-attr] + where=view.sum_of_weights**2 + > view.sum_of_weights_squared, # type: ignore[union-attr] + ) + +return np.divide( + where=view.sum_of_weights_of_weight_long**2 + > view.sum_of_weights_squared, # type: ignore +) +``` + +## Black Output + +```py +def function(**kwargs): + t = a**2 + b**3 + return t**2 + + +def function_replace_spaces(**kwargs): + t = a**2 + b**3 + c**4 + + +def function_dont_replace_spaces(): + {**a, **b, **c} + + +a = 5**~4 +b = 5 ** f() +c = -(5**2) +d = 5 ** f["hi"] +e = lazy(lambda **kwargs: 5) +f = f() ** 5 +g = a.b**c.d +h = 5 ** funcs.f() +i = funcs.f() ** 5 +j = super().name ** 5 +k = [(2**idx, value) for idx, value in pairs] +l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) +m = [([2**63], [1, 2**63])] +n = count <= 10**5 +o = settings(max_examples=10**6) +p = {(k, k**2): v**2 for k, v in pairs} +q = [10**i for i in range(6)] +r = x**y + +a = 5.0**~4.0 +b = 5.0 ** f() +c = -(5.0**2.0) +d = 5.0 ** f["hi"] +e = lazy(lambda **kwargs: 5) +f = f() ** 5.0 +g = a.b**c.d +h = 5.0 ** funcs.f() +i = funcs.f() ** 5.0 +j = super().name ** 5.0 +k = [(2.0**idx, value) for idx, value in pairs] +l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) +m = [([2.0**63.0], [1.0, 2**63.0])] +n = count <= 10**5.0 +o = settings(max_examples=10**6.0) +p = {(k, k**2): v**2.0 for k, v in pairs} +q = [10.5**i for i in range(6)] + + +# WE SHOULD DEFINITELY NOT EAT THESE COMMENTS (https://github.com/psf/black/issues/2873) +if hasattr(view, "sum_of_weights"): + return np.divide( # type: ignore[no-any-return] + view.variance, # type: ignore[union-attr] + view.sum_of_weights, # type: ignore[union-attr] + out=np.full(view.sum_of_weights.shape, np.nan), # type: ignore[union-attr] + where=view.sum_of_weights**2 > view.sum_of_weights_squared, # type: ignore[union-attr] + ) + +return np.divide( + where=view.sum_of_weights_of_weight_long**2 > view.sum_of_weights_squared, # type: ignore +) +``` + + diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__remove_await_parens.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__remove_await_parens.py.snap index 428ca61376..628dbb5c6a 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__remove_await_parens.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__remove_await_parens.py.snap @@ -93,7 +93,7 @@ async def main(): ```diff --- Black +++ Ruff -@@ -21,7 +21,9 @@ +@@ -21,11 +21,15 @@ # Check comments async def main(): @@ -103,6 +103,13 @@ async def main(): + ) + async def main(): +- await asyncio.sleep(1) # Hello ++ await ( ++ asyncio.sleep(1) # Hello ++ ) + + async def main(): ``` @@ -138,7 +145,9 @@ async def main(): async def main(): - await asyncio.sleep(1) # Hello + await ( + asyncio.sleep(1) # Hello + ) async def main(): diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__torture.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__torture.py.snap index f44e1053f0..3a57c5b7a9 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__torture.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__torture.py.snap @@ -50,14 +50,17 @@ assert ( ) # assert sort_by_dependency( -@@ -25,9 +25,9 @@ +@@ -25,9 +25,11 @@ class A: def foo(self): for _ in range(10): - aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc( -+ aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc( # pylint: disable=no-member - xxxxxxxxxxxx +- xxxxxxxxxxxx - ) # pylint: disable=no-member ++ aaaaaaaaaaaaaaaaaaa = ( ++ bbbbbbbbbbbbbbb.cccccccccc( # pylint: disable=no-member ++ xxxxxxxxxxxx ++ ) + ) @@ -94,8 +97,10 @@ importA class A: def foo(self): for _ in range(10): - aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc( # pylint: disable=no-member - xxxxxxxxxxxx + aaaaaaaaaaaaaaaaaaa = ( + bbbbbbbbbbbbbbb.cccccccccc( # pylint: disable=no-member + xxxxxxxxxxxx + ) ) diff --git a/crates/ruff_python_formatter/tests/snapshots/format@expression__tuple.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@expression__tuple.py.snap index 85dfa81fff..0f8997294a 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@expression__tuple.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@expression__tuple.py.snap @@ -72,6 +72,9 @@ g2 = ( # a h1 = ((((1, 2)))) h2 = ((((1, "qweiurpoiqwurepqiurpqirpuqoiwrupqoirupqoirupqoiurpqiorupwqiourpqurpqurpqurpqurpqurpqurüqurqpuriq")))) h3 = 1, "qweiurpoiqwurepqiurpqirpuqoiwrupqoirupqoirupqoiurpqiorupwqiourpqurpqurpqurpqurpqurpqurüqurqpuriq" + +i1 = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # This should break + ``` ## Output @@ -275,6 +278,10 @@ h3 = ( 1, "qweiurpoiqwurepqiurpqirpuqoiwrupqoirupqoirupqoiurpqiorupwqiourpqurpqurpqurpqurpqurpqurüqurqpuriq", ) + +i1 = ( + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", +) # This should break ``` diff --git a/crates/ruff_python_formatter/tests/snapshots/format@parentheses__call_chains.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@parentheses__call_chains.py.snap index 8c8c952a79..1bd2089f6b 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@parentheses__call_chains.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@parentheses__call_chains.py.snap @@ -268,7 +268,9 @@ d13 = ( ) # Doesn't fit, default -d2 = x.e().esadjkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkfsdddd() # +d2 = ( + x.e().esadjkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkfsdddd() # +) # Doesn't fit, fluent style d3 = ( diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__delete.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__delete.py.snap index ce4add0b94..2afea0bb26 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__delete.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__delete.py.snap @@ -204,7 +204,13 @@ del ( # NOTE: This shouldn't format. See https://github.com/astral-sh/ruff/issues/5630. # Delete something -del x, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, b, c, d # Delete these +del ( + x, + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, + b, + c, + d, +) # Delete these # Ready to delete # Delete something diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__try.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__try.py.snap index 589d8a25e7..e4fe04e434 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__try.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__try.py.snap @@ -324,7 +324,9 @@ finally: try: # 1 preceding: any, following: first in body, enclosing: try print(1) # 2 preceding: last in body, following: fist in alt body, enclosing: try -except ZeroDivisionError: # 3 preceding: test, following: fist in alt body, enclosing: try +except ( + ZeroDivisionError +): # 3 preceding: test, following: fist in alt body, enclosing: try print(2) # 4 preceding: last in body, following: fist in alt body, enclosing: exc except: # 5 preceding: last in body, following: fist in alt body, enclosing: try print(2) # 6 preceding: last in body, following: fist in alt body, enclosing: exc diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__while.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__while.py.snap index fdc99df9a6..9b09af15db 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__while.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__while.py.snap @@ -57,7 +57,9 @@ while aVeryLongConditionThatSpillsOverToTheNextLineBecauseItIsExtremelyLongAndGo else: ... -while some_condition(unformatted, args) and anotherCondition or aThirdCondition: # comment +while ( + some_condition(unformatted, args) and anotherCondition or aThirdCondition +): # comment print("Do something") diff --git a/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap new file mode 100644 index 0000000000..8ddbd6b6f5 --- /dev/null +++ b/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap @@ -0,0 +1,26 @@ +--- +source: crates/ruff_python_formatter/tests/fixtures.rs +input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_comments.py +--- +## Input +```py +# As of adding this fixture Black adds a space before the non-breaking space if part of a type pragma. +# https://github.com/psf/black/blob/b4dca26c7d93f930bbd5a7b552807370b60d4298/src/black/comments.py#L122-L129 +i2 = "" #  type: Add space before leading NBSP followed by spaces +i3 = "" #type: A space is added +i4 = "" #  type: Add space before leading NBSP followed by a space +i5 = "" # type: Add space before leading NBSP +``` + +## Output +```py +# As of adding this fixture Black adds a space before the non-breaking space if part of a type pragma. +# https://github.com/psf/black/blob/b4dca26c7d93f930bbd5a7b552807370b60d4298/src/black/comments.py#L122-L129 +i2 = "" #   type: Add space before leading NBSP followed by spaces +i3 = "" # type: A space is added +i4 = "" #   type: Add space before leading NBSP followed by a space +i5 = "" #  type: Add space before leading NBSP +``` + + + From e2b2b1759fdb5d3989c92b458724f4a351f432d2 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Wed, 30 Aug 2023 09:52:51 -0400 Subject: [PATCH 010/164] Handle keyword comments between = and value (#6883) ## Summary This PR adds comment handling for comments between the `=` and the `value` for keywords, as in the following cases: ```python func( x # dangling = # dangling # dangling 1, ** # dangling y ) ``` (Comments after the `**` were already handled in some cases, but I've unified the handling with the `=` handling.) Note that, previously, comments between the `**` and its value were rendered as trailing comments on the value (so they'd appear after `y`). This struck me as odd since it effectively re-ordered the comment with respect to its closest AST node (the value). I've made them leading comments, though I don't know that that's a significant improvement. I could also imagine us leaving them where they are. --- .../test/fixtures/ruff/expression/call.py | 37 ++++++++ .../src/comments/placement.rs | 80 +++++++++++++++-- .../src/expression/expr_dict.rs | 2 + .../src/other/keyword.rs | 2 +- .../snapshots/format@expression__call.py.snap | 87 ++++++++++++++++++- .../snapshots/format@expression__dict.py.snap | 12 ++- .../snapshots/format@statement__match.py.snap | 8 +- 7 files changed, 211 insertions(+), 17 deletions(-) diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/call.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/call.py index 5dc7d1af44..bb4425afbb 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/call.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/call.py @@ -80,6 +80,21 @@ f( # oddly placed own line comment dict() ) +f( + session, + b=1, + **(# oddly placed own line comment + dict() + ) +) +f( + session, + b=1, + **( + # oddly placed own line comment + dict() + ) +) # Don't add a magic trailing comma when there is only one entry # Minimized from https://github.com/django/django/blob/7eeadc82c2f7d7a778e3bb43c34d642e6275dacf/django/contrib/admin/checks.py#L674-L681 @@ -205,3 +220,25 @@ aaa = ( () .bbbbbbbbbbbbbbbb ) + +# Comments around keywords +f(x= # comment + 1) + +f(x # comment + = + 1) + +f(x= + # comment + 1) + +f(x=(# comment + 1 +)) + + +f(x=( + # comment + 1 +)) diff --git a/crates/ruff_python_formatter/src/comments/placement.rs b/crates/ruff_python_formatter/src/comments/placement.rs index c506054b46..0a50bc0674 100644 --- a/crates/ruff_python_formatter/src/comments/placement.rs +++ b/crates/ruff_python_formatter/src/comments/placement.rs @@ -191,7 +191,10 @@ fn handle_enclosed_comment<'a>( locator, ) } - AnyNodeRef::Keyword(_) => handle_dict_unpacking_comment(comment, locator), + AnyNodeRef::Keyword(keyword) => handle_keyword_comment(comment, keyword, locator), + AnyNodeRef::PatternKeyword(pattern_keyword) => { + handle_pattern_keyword_comment(comment, pattern_keyword, locator) + } AnyNodeRef::ExprNamedExpr(_) => handle_named_expr_comment(comment, locator), AnyNodeRef::ExprDict(_) => handle_dict_unpacking_comment(comment, locator) .or_else(|comment| handle_bracketed_end_of_line_comment(comment, locator)), @@ -940,6 +943,74 @@ fn handle_leading_class_with_decorators_comment<'a>( CommentPlacement::Default(comment) } +/// Handles comments between a keyword's identifier and value: +/// ```python +/// func( +/// x # dangling +/// = # dangling +/// # dangling +/// 1, +/// ** # dangling +/// y +/// ) +/// ``` +fn handle_keyword_comment<'a>( + comment: DecoratedComment<'a>, + keyword: &'a ast::Keyword, + locator: &Locator, +) -> CommentPlacement<'a> { + let start = keyword.arg.as_ref().map_or(keyword.start(), Ranged::end); + + // If the comment is parenthesized, it should be attached to the value: + // ```python + // func( + // x=( # comment + // 1 + // ) + // ) + // ``` + let mut tokenizer = + SimpleTokenizer::new(locator.contents(), TextRange::new(start, comment.start())); + if tokenizer.any(|token| token.kind == SimpleTokenKind::LParen) { + return CommentPlacement::Default(comment); + } + + CommentPlacement::leading(comment.enclosing_node(), comment) +} + +/// Handles comments between a pattern keyword's identifier and value: +/// ```python +/// case Point2D( +/// x # dangling +/// = # dangling +/// # dangling +/// 1 +/// ) +/// ``` +fn handle_pattern_keyword_comment<'a>( + comment: DecoratedComment<'a>, + pattern_keyword: &'a ast::PatternKeyword, + locator: &Locator, +) -> CommentPlacement<'a> { + // If the comment is parenthesized, it should be attached to the value: + // ```python + // case Point2D( + // x=( # comment + // 1 + // ) + // ) + // ``` + let mut tokenizer = SimpleTokenizer::new( + locator.contents(), + TextRange::new(pattern_keyword.attr.end(), comment.start()), + ); + if tokenizer.any(|token| token.kind == SimpleTokenKind::LParen) { + return CommentPlacement::Default(comment); + } + + CommentPlacement::leading(comment.enclosing_node(), comment) +} + /// Handles comments between `**` and the variable name in dict unpacking /// It attaches these to the appropriate value node. /// @@ -954,10 +1025,7 @@ fn handle_dict_unpacking_comment<'a>( comment: DecoratedComment<'a>, locator: &Locator, ) -> CommentPlacement<'a> { - debug_assert!(matches!( - comment.enclosing_node(), - AnyNodeRef::ExprDict(_) | AnyNodeRef::Keyword(_) - )); + debug_assert!(matches!(comment.enclosing_node(), AnyNodeRef::ExprDict(_))); // no node after our comment so we can't be between `**` and the name (node) let Some(following) = comment.following_node() else { @@ -980,7 +1048,7 @@ fn handle_dict_unpacking_comment<'a>( // if the remaining tokens from the previous node are exactly `**`, // re-assign the comment to the one that follows the stars if tokens.any(|token| token.kind == SimpleTokenKind::DoubleStar) { - CommentPlacement::trailing(following, comment) + CommentPlacement::leading(following, comment) } else { CommentPlacement::Default(comment) } diff --git a/crates/ruff_python_formatter/src/expression/expr_dict.rs b/crates/ruff_python_formatter/src/expression/expr_dict.rs index 851898ee87..d53e6b6b5f 100644 --- a/crates/ruff_python_formatter/src/expression/expr_dict.rs +++ b/crates/ruff_python_formatter/src/expression/expr_dict.rs @@ -40,6 +40,8 @@ impl Format> for KeyValuePair<'_> { ])] ) } else { + // TODO(charlie): Make these dangling comments on the `ExprDict`, and identify them + // dynamically, so as to avoid the parent rendering its child's comments. let comments = f.context().comments().clone(); let leading_value_comments = comments.leading(self.value); write!( diff --git a/crates/ruff_python_formatter/src/other/keyword.rs b/crates/ruff_python_formatter/src/other/keyword.rs index ed5ef0cca6..914a467ef8 100644 --- a/crates/ruff_python_formatter/src/other/keyword.rs +++ b/crates/ruff_python_formatter/src/other/keyword.rs @@ -13,10 +13,10 @@ impl FormatNodeRule for FormatKeyword { arg, value, } = item; + // Comments after the `=` or `**` are reassigned as leading comments on the value. if let Some(arg) = arg { write!(f, [arg.format(), text("="), value.format()]) } else { - // Comments after the stars are reassigned as trailing value comments write!(f, [text("**"), value.format()]) } } diff --git a/crates/ruff_python_formatter/tests/snapshots/format@expression__call.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@expression__call.py.snap index e3771e0389..a8877d445c 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@expression__call.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@expression__call.py.snap @@ -86,6 +86,21 @@ f( # oddly placed own line comment dict() ) +f( + session, + b=1, + **(# oddly placed own line comment + dict() + ) +) +f( + session, + b=1, + **( + # oddly placed own line comment + dict() + ) +) # Don't add a magic trailing comma when there is only one entry # Minimized from https://github.com/django/django/blob/7eeadc82c2f7d7a778e3bb43c34d642e6275dacf/django/contrib/admin/checks.py#L674-L681 @@ -211,6 +226,28 @@ aaa = ( () .bbbbbbbbbbbbbbbb ) + +# Comments around keywords +f(x= # comment + 1) + +f(x # comment + = + 1) + +f(x= + # comment + 1) + +f(x=(# comment + 1 +)) + + +f(x=( + # comment + 1 +)) ``` ## Output @@ -288,13 +325,29 @@ f("aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaaaaa", "aaaaa f( session, b=1, - **dict(), # oddly placed end-of-line comment + # oddly placed end-of-line comment + **dict(), ) f( session, b=1, - **dict(), # oddly placed own line comment + **dict(), +) +f( + session, + b=1, + **( # oddly placed own line comment + dict() + ), +) +f( + session, + b=1, + **( + # oddly placed own line comment + dict() + ), ) # Don't add a magic trailing comma when there is only one entry @@ -408,6 +461,36 @@ aaa = ( bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb # awkward comment )().bbbbbbbbbbbbbbbb + +# Comments around keywords +f( + # comment + x=1 +) + +f( + # comment + x=1 +) + +f( + # comment + x=1 +) + +f( + x=( # comment + 1 + ) +) + + +f( + x=( + # comment + 1 + ) +) ``` diff --git a/crates/ruff_python_formatter/tests/snapshots/format@expression__dict.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@expression__dict.py.snap index a5b6c5e896..a1e535b1c2 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@expression__dict.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@expression__dict.py.snap @@ -80,22 +80,26 @@ x={ # dangling end of line comment { **a, # leading - **b, # middle # trailing + # middle + **b, # trailing } { - **b # middle with single item + # middle with single item + **b } { # before - **b, # between + # between + **b, } { **a, # comment before preceding node's comma # before - **b, # between + # between + **b, } {} diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__match.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__match.py.snap index 8a23c2f6d7..2ca2c18fa8 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__match.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__match.py.snap @@ -985,18 +985,18 @@ match pattern_match_class: ... case A( - b=# b + # b # c - 2 # d + b=2 # d # e ): pass case A( # a - b=# b + # b # c - 2 # d + b=2 # d # e ): pass From eb552da8a90ede1afb4a48cc8daf4895fa244b66 Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Wed, 30 Aug 2023 16:03:17 +0200 Subject: [PATCH 011/164] Avoid parenthesizing multiline strings in binary expressions (#6973) --- .../test/fixtures/ruff/expression/binary.py | 91 +++++++++ .../ruff_python_formatter/src/comments/mod.rs | 11 ++ .../src/expression/expr_bin_op.rs | 18 +- ...tibility@simple_cases__composition.py.snap | 25 +-- ...ses__composition_no_trailing_comma.py.snap | 25 +-- .../format@expression__binary.py.snap | 185 ++++++++++++++++++ 6 files changed, 315 insertions(+), 40 deletions(-) diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/binary.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/binary.py index 572518635e..45b6e40732 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/binary.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/binary.py @@ -222,3 +222,94 @@ x = ( x = ( () - () # ) + + +# Avoid unnecessary parentheses around multiline strings. +expected_content = """ + +%s/simple/sitemap-simple.xml%s + + +""" % ( + self.base_url, + date.today(), +) + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + # Needs parentheses + % ( + self.base_url, + date.today(), + ) +) + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + % + # Needs parentheses + ( + self.base_url, + date.today(), + ) +) + + +expected_content = """ + +%s/simple/sitemap-simple.xml%s + + +""" + a.call.expression( + self.base_url, + date.today(), +) + +expected_content = """ + +%s/simple/sitemap-simple.xml%s + + +""" + sssssssssssssssssssssssssssssssssssssssssooooo * looooooooooooooooooooooooooooooongggggggggggg + +call(arg1, arg2, """ +short +""", arg3=True) + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + % + ( + self.base_url + ) +) + + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + % + ( + # Needs parentheses + self.base_url + ) +) diff --git a/crates/ruff_python_formatter/src/comments/mod.rs b/crates/ruff_python_formatter/src/comments/mod.rs index 57ded7ba08..91ff7e2b8b 100644 --- a/crates/ruff_python_formatter/src/comments/mod.rs +++ b/crates/ruff_python_formatter/src/comments/mod.rs @@ -330,6 +330,17 @@ impl<'a> Comments<'a> { Self::new(map) } + /// Returns `true` if the given `node` has any comments. + #[inline] + pub(crate) fn has(&self, node: T) -> bool + where + T: Into>, + { + self.data + .comments + .has(&NodeRefEqualityKey::from_ref(node.into())) + } + /// Returns `true` if the given `node` has any [leading comments](self#leading-comments). #[inline] pub(crate) fn has_leading(&self, node: T) -> bool diff --git a/crates/ruff_python_formatter/src/expression/expr_bin_op.rs b/crates/ruff_python_formatter/src/expression/expr_bin_op.rs index 8c1f823f43..e25aaeaaa4 100644 --- a/crates/ruff_python_formatter/src/expression/expr_bin_op.rs +++ b/crates/ruff_python_formatter/src/expression/expr_bin_op.rs @@ -10,7 +10,8 @@ use ruff_python_ast::{ }; use crate::comments::{trailing_comments, trailing_node_comments, SourceComment}; -use crate::expression::expr_constant::ExprConstantLayout; +use crate::expression::expr_constant::{is_multiline_string, ExprConstantLayout}; +use crate::expression::has_parentheses; use crate::expression::parentheses::{ in_parentheses_only_group, in_parentheses_only_soft_line_break, in_parentheses_only_soft_line_break_or_space, is_expression_parenthesized, parenthesized, @@ -263,10 +264,23 @@ impl NeedsParentheses for ExprBinOp { fn needs_parentheses( &self, parent: AnyNodeRef, - _context: &PyFormatContext, + context: &PyFormatContext, ) -> OptionalParentheses { if parent.is_expr_await() && !self.op.is_pow() { OptionalParentheses::Always + } else if let Expr::Constant(constant) = self.left.as_ref() { + // Multiline strings are guaranteed to never fit, avoid adding unnecessary parentheses + if !constant.value.is_implicit_concatenated() + && is_multiline_string(constant, context.source()) + && has_parentheses(&self.right, context).is_some() + && !context.comments().has_dangling(self) + && !context.comments().has(self.left.as_ref()) + && !context.comments().has(self.right.as_ref()) + { + OptionalParentheses::Never + } else { + OptionalParentheses::Multiline + } } else { OptionalParentheses::Multiline } diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__composition.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__composition.py.snap index 25780932c6..fbda66e07b 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__composition.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__composition.py.snap @@ -227,27 +227,17 @@ class C: assert expected( value, is_going_to_be="too long to fit in a single line", srsly=True -@@ -153,7 +154,8 @@ - " because it's too long" - ) - -- dis_c_instance_method = """\ -+ dis_c_instance_method = ( -+ """\ - %3d 0 LOAD_FAST 1 (x) - 2 LOAD_CONST 1 (1) - 4 COMPARE_OP 2 (==) -@@ -161,8 +163,8 @@ +@@ -161,9 +162,7 @@ 8 STORE_ATTR 0 (x) 10 LOAD_CONST 0 (None) 12 RETURN_VALUE - """ % ( - _C.__init__.__code__.co_firstlineno + 1, -+ """ -+ % (_C.__init__.__code__.co_firstlineno + 1,) - ) +- ) ++ """ % (_C.__init__.__code__.co_firstlineno + 1,) assert ( + expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect ``` ## Ruff Output @@ -409,8 +399,7 @@ class C: " because it's too long" ) - dis_c_instance_method = ( - """\ + dis_c_instance_method = """\ %3d 0 LOAD_FAST 1 (x) 2 LOAD_CONST 1 (1) 4 COMPARE_OP 2 (==) @@ -418,9 +407,7 @@ class C: 8 STORE_ATTR 0 (x) 10 LOAD_CONST 0 (None) 12 RETURN_VALUE - """ - % (_C.__init__.__code__.co_firstlineno + 1,) - ) + """ % (_C.__init__.__code__.co_firstlineno + 1,) assert ( expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__composition_no_trailing_comma.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__composition_no_trailing_comma.py.snap index 48a59144c5..06bcb6b4e7 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__composition_no_trailing_comma.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__composition_no_trailing_comma.py.snap @@ -227,27 +227,17 @@ class C: assert expected( value, is_going_to_be="too long to fit in a single line", srsly=True -@@ -153,7 +154,8 @@ - " because it's too long" - ) - -- dis_c_instance_method = """\ -+ dis_c_instance_method = ( -+ """\ - %3d 0 LOAD_FAST 1 (x) - 2 LOAD_CONST 1 (1) - 4 COMPARE_OP 2 (==) -@@ -161,8 +163,8 @@ +@@ -161,9 +162,7 @@ 8 STORE_ATTR 0 (x) 10 LOAD_CONST 0 (None) 12 RETURN_VALUE - """ % ( - _C.__init__.__code__.co_firstlineno + 1, -+ """ -+ % (_C.__init__.__code__.co_firstlineno + 1,) - ) +- ) ++ """ % (_C.__init__.__code__.co_firstlineno + 1,) assert ( + expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect ``` ## Ruff Output @@ -409,8 +399,7 @@ class C: " because it's too long" ) - dis_c_instance_method = ( - """\ + dis_c_instance_method = """\ %3d 0 LOAD_FAST 1 (x) 2 LOAD_CONST 1 (1) 4 COMPARE_OP 2 (==) @@ -418,9 +407,7 @@ class C: 8 STORE_ATTR 0 (x) 10 LOAD_CONST 0 (None) 12 RETURN_VALUE - """ - % (_C.__init__.__code__.co_firstlineno + 1,) - ) + """ % (_C.__init__.__code__.co_firstlineno + 1,) assert ( expectedexpectedexpectedexpectedexpectedexpectedexpectedexpectedexpect diff --git a/crates/ruff_python_formatter/tests/snapshots/format@expression__binary.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@expression__binary.py.snap index 172b318812..1e0a59d33e 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@expression__binary.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@expression__binary.py.snap @@ -228,6 +228,97 @@ x = ( x = ( () - () # ) + + +# Avoid unnecessary parentheses around multiline strings. +expected_content = """ + +%s/simple/sitemap-simple.xml%s + + +""" % ( + self.base_url, + date.today(), +) + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + # Needs parentheses + % ( + self.base_url, + date.today(), + ) +) + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + % + # Needs parentheses + ( + self.base_url, + date.today(), + ) +) + + +expected_content = """ + +%s/simple/sitemap-simple.xml%s + + +""" + a.call.expression( + self.base_url, + date.today(), +) + +expected_content = """ + +%s/simple/sitemap-simple.xml%s + + +""" + sssssssssssssssssssssssssssssssssssssssssooooo * looooooooooooooooooooooooooooooongggggggggggg + +call(arg1, arg2, """ +short +""", arg3=True) + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + % + ( + self.base_url + ) +) + + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + % + ( + # Needs parentheses + self.base_url + ) +) ``` ## Output @@ -512,6 +603,100 @@ x = ( x = ( () - () # ) + + +# Avoid unnecessary parentheses around multiline strings. +expected_content = """ + +%s/simple/sitemap-simple.xml%s + + +""" % ( + self.base_url, + date.today(), +) + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + # Needs parentheses + % ( + self.base_url, + date.today(), + ) +) + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + % + # Needs parentheses + ( + self.base_url, + date.today(), + ) +) + + +expected_content = """ + +%s/simple/sitemap-simple.xml%s + + +""" + a.call.expression( + self.base_url, + date.today(), +) + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + + sssssssssssssssssssssssssssssssssssssssssooooo + * looooooooooooooooooooooooooooooongggggggggggg +) + +call( + arg1, + arg2, + """ +short +""", + arg3=True, +) + +expected_content = """ + +%s/simple/sitemap-simple.xml%s + + +""" % (self.base_url) + + +expected_content = ( + """ + +%s/simple/sitemap-simple.xml%s + + +""" + % + ( + # Needs parentheses + self.base_url + ) +) ``` From 92143afeee088551b3074c4660d6b1640f21f7af Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Thu, 31 Aug 2023 09:19:45 +0200 Subject: [PATCH 012/164] Group binary operators with same precedence only (#7010) --- .../src/expression/expr_bin_op.rs | 6 +- .../src/expression/mod.rs | 80 +++++++++++-------- ...atibility@simple_cases__expression.py.snap | 46 +---------- ...expression__binary_implicit_string.py.snap | 3 +- 4 files changed, 55 insertions(+), 80 deletions(-) diff --git a/crates/ruff_python_formatter/src/expression/expr_bin_op.rs b/crates/ruff_python_formatter/src/expression/expr_bin_op.rs index e25aaeaaa4..2241d014cb 100644 --- a/crates/ruff_python_formatter/src/expression/expr_bin_op.rs +++ b/crates/ruff_python_formatter/src/expression/expr_bin_op.rs @@ -18,6 +18,7 @@ use crate::expression::parentheses::{ NeedsParentheses, OptionalParentheses, }; use crate::expression::string::StringLayout; +use crate::expression::OperatorPrecedence; use crate::prelude::*; #[derive(Default)] @@ -67,10 +68,13 @@ impl FormatNodeRule for FormatExprBinOp { BinOpLayout::Default => { let format_inner = format_with(|f: &mut PyFormatter| { let source = f.context().source(); + let precedence = OperatorPrecedence::from(item.op); let binary_chain: SmallVec<[&ExprBinOp; 4]> = iter::successors(Some(item), |parent| { parent.left.as_bin_op_expr().and_then(|bin_expression| { - if is_expression_parenthesized(bin_expression.into(), source) { + if OperatorPrecedence::from(bin_expression.op) != precedence + || is_expression_parenthesized(bin_expression.into(), source) + { None } else { Some(bin_expression) diff --git a/crates/ruff_python_formatter/src/expression/mod.rs b/crates/ruff_python_formatter/src/expression/mod.rs index 8904e470e4..9594ab08f6 100644 --- a/crates/ruff_python_formatter/src/expression/mod.rs +++ b/crates/ruff_python_formatter/src/expression/mod.rs @@ -363,9 +363,9 @@ impl<'ast> IntoFormat> for Expr { /// Tests if it is safe to omit the optional parentheses. /// /// We prefer parentheses at least in the following cases: -/// * The expression contains more than one unparenthesized expression with the same priority. For example, +/// * The expression contains more than one unparenthesized expression with the same precedence. For example, /// the expression `a * b * c` contains two multiply operations. We prefer parentheses in that case. -/// `(a * b) * c` or `a * b + c` are okay, because the subexpression is parenthesized, or the expression uses operands with a lower priority +/// `(a * b) * c` or `a * b + c` are okay, because the subexpression is parenthesized, or the expression uses operands with a lower precedence /// * The expression contains at least one parenthesized sub expression (optimization to avoid unnecessary work) /// /// This mimics Black's [`_maybe_split_omitting_optional_parens`](https://github.com/psf/black/blob/d1248ca9beaf0ba526d265f4108836d89cf551b7/src/black/linegen.py#L746-L820) @@ -373,11 +373,11 @@ fn can_omit_optional_parentheses(expr: &Expr, context: &PyFormatContext) -> bool let mut visitor = CanOmitOptionalParenthesesVisitor::new(context); visitor.visit_subexpression(expr); - if visitor.max_priority == OperatorPriority::None { + if visitor.max_precedence == OperatorPrecedence::None { true - } else if visitor.max_priority_count > 1 { + } else if visitor.pax_precedence_count > 1 { false - } else if visitor.max_priority == OperatorPriority::Attribute { + } else if visitor.max_precedence == OperatorPrecedence::Attribute { true } else if !visitor.any_parenthesized_expressions { // Only use the more complex IR when there is any expression that we can possibly split by @@ -397,8 +397,8 @@ fn can_omit_optional_parentheses(expr: &Expr, context: &PyFormatContext) -> bool #[derive(Clone, Debug)] struct CanOmitOptionalParenthesesVisitor<'input> { - max_priority: OperatorPriority, - max_priority_count: u32, + max_precedence: OperatorPrecedence, + pax_precedence_count: u32, any_parenthesized_expressions: bool, last: Option<&'input Expr>, first: Option<&'input Expr>, @@ -409,26 +409,26 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> { fn new(context: &'input PyFormatContext) -> Self { Self { context, - max_priority: OperatorPriority::None, - max_priority_count: 0, + max_precedence: OperatorPrecedence::None, + pax_precedence_count: 0, any_parenthesized_expressions: false, last: None, first: None, } } - fn update_max_priority(&mut self, current_priority: OperatorPriority) { - self.update_max_priority_with_count(current_priority, 1); + fn update_max_precedence(&mut self, precedence: OperatorPrecedence) { + self.update_max_precedence_with_count(precedence, 1); } - fn update_max_priority_with_count(&mut self, current_priority: OperatorPriority, count: u32) { - match self.max_priority.cmp(¤t_priority) { + fn update_max_precedence_with_count(&mut self, precedence: OperatorPrecedence, count: u32) { + match self.max_precedence.cmp(&precedence) { Ordering::Less => { - self.max_priority_count = count; - self.max_priority = current_priority; + self.pax_precedence_count = count; + self.max_precedence = precedence; } Ordering::Equal => { - self.max_priority_count += count; + self.pax_precedence_count += count; } Ordering::Greater => {} } @@ -455,8 +455,8 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> { range: _, op: _, values, - }) => self.update_max_priority_with_count( - OperatorPriority::BooleanOperation, + }) => self.update_max_precedence_with_count( + OperatorPrecedence::BooleanOperation, values.len().saturating_sub(1) as u32, ), Expr::BinOp(ast::ExprBinOp { @@ -464,11 +464,11 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> { left: _, right: _, range: _, - }) => self.update_max_priority(OperatorPriority::from(*op)), + }) => self.update_max_precedence(OperatorPrecedence::from(*op)), Expr::IfExp(_) => { // + 1 for the if and one for the else - self.update_max_priority_with_count(OperatorPriority::Conditional, 2); + self.update_max_precedence_with_count(OperatorPrecedence::Conditional, 2); } // It's impossible for a file smaller or equal to 4GB to contain more than 2^32 comparisons @@ -480,7 +480,10 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> { ops, comparators: _, }) => { - self.update_max_priority_with_count(OperatorPriority::Comparator, ops.len() as u32); + self.update_max_precedence_with_count( + OperatorPrecedence::Comparator, + ops.len() as u32, + ); } Expr::Call(ast::ExprCall { range: _, @@ -506,7 +509,7 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> { operand: _, }) => { if op.is_invert() { - self.update_max_priority(OperatorPriority::BitwiseInversion); + self.update_max_precedence(OperatorPrecedence::BitwiseInversion); } } @@ -519,7 +522,7 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> { }) => { self.visit_expr(value); if has_parentheses(value, self.context).is_some() { - self.update_max_priority(OperatorPriority::Attribute); + self.update_max_precedence(OperatorPrecedence::Attribute); } self.last = Some(expr); return; @@ -541,7 +544,7 @@ impl<'input> CanOmitOptionalParenthesesVisitor<'input> { implicit_concatenated: true, .. }) => { - self.update_max_priority(OperatorPriority::String); + self.update_max_precedence(OperatorPrecedence::String); } Expr::NamedExpr(_) @@ -777,38 +780,45 @@ pub(crate) fn has_own_parentheses( } } +/// The precedence of [python operators](https://docs.python.org/3/reference/expressions.html#operator-precedence) from +/// lowest to highest priority. +/// +/// Ruff uses the operator precedence to decide in which order to split operators: +/// Operators with a lower precedence split before higher-precedence operators. +/// Splitting by precedence ensures that the visual grouping reflects the precedence. #[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq)] -enum OperatorPriority { +enum OperatorPrecedence { None, Attribute, - Comparator, Exponential, BitwiseInversion, Multiplicative, Additive, Shift, BitwiseAnd, - BitwiseOr, BitwiseXor, + BitwiseOr, + Comparator, + // Implicit string concatenation String, BooleanOperation, Conditional, } -impl From for OperatorPriority { +impl From for OperatorPrecedence { fn from(value: Operator) -> Self { match value { - Operator::Add | Operator::Sub => OperatorPriority::Additive, + Operator::Add | Operator::Sub => OperatorPrecedence::Additive, Operator::Mult | Operator::MatMult | Operator::Div | Operator::Mod - | Operator::FloorDiv => OperatorPriority::Multiplicative, - Operator::Pow => OperatorPriority::Exponential, - Operator::LShift | Operator::RShift => OperatorPriority::Shift, - Operator::BitOr => OperatorPriority::BitwiseOr, - Operator::BitXor => OperatorPriority::BitwiseXor, - Operator::BitAnd => OperatorPriority::BitwiseAnd, + | Operator::FloorDiv => OperatorPrecedence::Multiplicative, + Operator::Pow => OperatorPrecedence::Exponential, + Operator::LShift | Operator::RShift => OperatorPrecedence::Shift, + Operator::BitOr => OperatorPrecedence::BitwiseOr, + Operator::BitXor => OperatorPrecedence::BitwiseXor, + Operator::BitAnd => OperatorPrecedence::BitwiseAnd, } } } diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap index e55f593032..d8e7464160 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap @@ -311,38 +311,6 @@ last_call() sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__) ) xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( -@@ -328,13 +331,18 @@ - ): - return True - if ( -- ~aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e -+ ~aaaa.a -+ + aaaa.b -+ - aaaa.c * aaaa.d / aaaa.e - | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l**aaaa.m // aaaa.n - ): - return True - if ( -- ~aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e -- | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h -+ ~aaaaaaaa.a -+ + aaaaaaaa.b -+ - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e -+ | aaaaaaaa.f -+ & aaaaaaaa.g % aaaaaaaa.h - ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l**aaaaaaaa.m // aaaaaaaa.n - ): - return True -@@ -342,7 +350,8 @@ - ~aaaaaaaaaaaaaaaa.a - + aaaaaaaaaaaaaaaa.b - - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e -- | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h -+ | aaaaaaaaaaaaaaaa.f -+ & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h - ^ aaaaaaaaaaaaaaaa.i - << aaaaaaaaaaaaaaaa.k - >> aaaaaaaaaaaaaaaa.l**aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n ``` ## Ruff Output @@ -681,18 +649,13 @@ if ( ): return True if ( - ~aaaa.a - + aaaa.b - - aaaa.c * aaaa.d / aaaa.e + ~aaaa.a + aaaa.b - aaaa.c * aaaa.d / aaaa.e | aaaa.f & aaaa.g % aaaa.h ^ aaaa.i << aaaa.k >> aaaa.l**aaaa.m // aaaa.n ): return True if ( - ~aaaaaaaa.a - + aaaaaaaa.b - - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e - | aaaaaaaa.f - & aaaaaaaa.g % aaaaaaaa.h + ~aaaaaaaa.a + aaaaaaaa.b - aaaaaaaa.c @ aaaaaaaa.d / aaaaaaaa.e + | aaaaaaaa.f & aaaaaaaa.g % aaaaaaaa.h ^ aaaaaaaa.i << aaaaaaaa.k >> aaaaaaaa.l**aaaaaaaa.m // aaaaaaaa.n ): return True @@ -700,8 +663,7 @@ if ( ~aaaaaaaaaaaaaaaa.a + aaaaaaaaaaaaaaaa.b - aaaaaaaaaaaaaaaa.c * aaaaaaaaaaaaaaaa.d @ aaaaaaaaaaaaaaaa.e - | aaaaaaaaaaaaaaaa.f - & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h + | aaaaaaaaaaaaaaaa.f & aaaaaaaaaaaaaaaa.g % aaaaaaaaaaaaaaaa.h ^ aaaaaaaaaaaaaaaa.i << aaaaaaaaaaaaaaaa.k >> aaaaaaaaaaaaaaaa.l**aaaaaaaaaaaaaaaa.m // aaaaaaaaaaaaaaaa.n diff --git a/crates/ruff_python_formatter/tests/snapshots/format@expression__binary_implicit_string.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@expression__binary_implicit_string.py.snap index 207b8772ba..8cb1927ad4 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@expression__binary_implicit_string.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@expression__binary_implicit_string.py.snap @@ -215,8 +215,7 @@ self._assert_skipping( ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "bbbbbbbbbbbbbbbbbbbbbbbbbbbbb" - "cccccccccccccccccccccccccc" - % aaaaaaaaaaaa + "cccccccccccccccccccccccccc" % aaaaaaaaaaaa + x ) From f4ba0ea1440416b196d5be3124ad7a015ace8db6 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Thu, 31 Aug 2023 15:40:03 +0800 Subject: [PATCH 013/164] Allow `tab_width` to be configable (#7016) --- crates/ruff_python_formatter/src/options.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/ruff_python_formatter/src/options.rs b/crates/ruff_python_formatter/src/options.rs index fe7c7a9e86..14d9fea415 100644 --- a/crates/ruff_python_formatter/src/options.rs +++ b/crates/ruff_python_formatter/src/options.rs @@ -94,6 +94,12 @@ impl PyFormatOptions { self.source_map_generation } + #[must_use] + pub fn with_tab_width(mut self, tab_width: TabWidth) -> Self { + self.tab_width = tab_width; + self + } + #[must_use] pub fn with_quote_style(mut self, style: QuoteStyle) -> Self { self.quote_style = style; From 96a9717c1a77796bc23d15625b60e8c03851e54c Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Thu, 31 Aug 2023 09:51:59 -0500 Subject: [PATCH 014/164] Add hidden `--preview` / `--no-preview` options to `ruff check` (#7009) Per discussion at https://github.com/astral-sh/ruff/discussions/6998 ## Summary Adds a `--preview` and `--no-preview` option to the CLI for `ruff check` and corresponding settings. The CLI options are hidden for now. Available in the settings as `preview = true` or `preview = false`. Does not include environment variable configuration, although we may add it in the future. ## Test Plan `cargo build` Future work will build on this setting, such as toggling the mode during a test. --- crates/ruff/src/settings/defaults.rs | 3 ++- crates/ruff/src/settings/mod.rs | 2 ++ crates/ruff/src/settings/types.rs | 17 +++++++++++++++++ crates/ruff_cli/src/args.rs | 12 +++++++++++- crates/ruff_wasm/src/lib.rs | 1 + crates/ruff_workspace/src/configuration.rs | 7 ++++++- crates/ruff_workspace/src/options.rs | 11 +++++++++++ ruff.schema.json | 7 +++++++ 8 files changed, 57 insertions(+), 3 deletions(-) diff --git a/crates/ruff/src/settings/defaults.rs b/crates/ruff/src/settings/defaults.rs index a7ef3d3b88..69dd446e3e 100644 --- a/crates/ruff/src/settings/defaults.rs +++ b/crates/ruff/src/settings/defaults.rs @@ -4,7 +4,7 @@ use regex::Regex; use rustc_hash::FxHashSet; use std::collections::HashSet; -use super::types::{FilePattern, PythonVersion}; +use super::types::{FilePattern, PreviewMode, PythonVersion}; use super::Settings; use crate::codes::{self, RuleCodePrefix}; use crate::line_width::{LineLength, TabSize}; @@ -84,6 +84,7 @@ impl Default for Settings { line_length: LineLength::default(), logger_objects: vec![], namespace_packages: vec![], + preview: PreviewMode::default(), per_file_ignores: vec![], project_root: path_dedot::CWD.clone(), respect_gitignore: true, diff --git a/crates/ruff/src/settings/mod.rs b/crates/ruff/src/settings/mod.rs index edf5aaaebd..ea5d38aa98 100644 --- a/crates/ruff/src/settings/mod.rs +++ b/crates/ruff/src/settings/mod.rs @@ -24,6 +24,7 @@ use crate::settings::types::{FilePatternSet, PerFileIgnore, PythonVersion, Seria use super::line_width::{LineLength, TabSize}; use self::rule_table::RuleTable; +use self::types::PreviewMode; pub mod defaults; pub mod flags; @@ -55,6 +56,7 @@ pub struct Settings { pub per_file_ignores: Vec<(GlobMatcher, GlobMatcher, RuleSet)>, pub target_version: PythonVersion, + pub preview: PreviewMode, // Resolver settings pub exclude: FilePatternSet, diff --git a/crates/ruff/src/settings/types.rs b/crates/ruff/src/settings/types.rs index 8461604425..bb293d3986 100644 --- a/crates/ruff/src/settings/types.rs +++ b/crates/ruff/src/settings/types.rs @@ -92,6 +92,23 @@ impl PythonVersion { } } +#[derive(Clone, Copy, Debug, PartialEq, Eq, Default, CacheKey, is_macro::Is)] +pub enum PreviewMode { + #[default] + Disabled, + Enabled, +} + +impl From for PreviewMode { + fn from(version: bool) -> Self { + if version { + PreviewMode::Enabled + } else { + PreviewMode::Disabled + } + } +} + #[derive(Debug, Clone, CacheKey, PartialEq, PartialOrd, Eq, Ord)] pub enum FilePattern { Builtin(&'static str), diff --git a/crates/ruff_cli/src/args.rs b/crates/ruff_cli/src/args.rs index 6971867dfc..50cb562c1d 100644 --- a/crates/ruff_cli/src/args.rs +++ b/crates/ruff_cli/src/args.rs @@ -9,7 +9,7 @@ use rustc_hash::FxHashMap; use ruff::logging::LogLevel; use ruff::registry::Rule; use ruff::settings::types::{ - FilePattern, PatternPrefixPair, PerFileIgnore, PythonVersion, SerializationFormat, + FilePattern, PatternPrefixPair, PerFileIgnore, PreviewMode, PythonVersion, SerializationFormat, }; use ruff::RuleSelector; use ruff_workspace::configuration::{Configuration, RuleSelection}; @@ -115,6 +115,11 @@ pub struct CheckCommand { /// The minimum Python version that should be supported. #[arg(long, value_enum)] pub target_version: Option, + /// Enable preview mode; checks will include unstable rules and fixes. + #[arg(long, overrides_with("no_preview"), hide = true)] + preview: bool, + #[clap(long, overrides_with("preview"), hide = true)] + no_preview: bool, /// Path to the `pyproject.toml` or `ruff.toml` file to use for /// configuration. #[arg(long, conflicts_with = "isolated")] @@ -458,6 +463,7 @@ impl CheckCommand { ignore: self.ignore, line_length: self.line_length, per_file_ignores: self.per_file_ignores, + preview: resolve_bool_arg(self.preview, self.no_preview).map(PreviewMode::from), respect_gitignore: resolve_bool_arg( self.respect_gitignore, self.no_respect_gitignore, @@ -569,6 +575,7 @@ pub struct Overrides { pub ignore: Option>, pub line_length: Option, pub per_file_ignores: Option>, + pub preview: Option, pub respect_gitignore: Option, pub select: Option>, pub show_source: Option, @@ -632,6 +639,9 @@ impl ConfigProcessor for Overrides { if let Some(line_length) = &self.line_length { config.line_length = Some(*line_length); } + if let Some(preview) = &self.preview { + config.preview = Some(*preview); + } if let Some(per_file_ignores) = &self.per_file_ignores { config.per_file_ignores = Some(collect_per_file_ignores(per_file_ignores.clone())); } diff --git a/crates/ruff_wasm/src/lib.rs b/crates/ruff_wasm/src/lib.rs index 07a5b749bb..799963dc4d 100644 --- a/crates/ruff_wasm/src/lib.rs +++ b/crates/ruff_wasm/src/lib.rs @@ -128,6 +128,7 @@ impl Workspace { external: Some(Vec::default()), ignore: Some(Vec::default()), line_length: Some(LineLength::default()), + preview: Some(false), select: Some(defaults::PREFIXES.to_vec()), tab_size: Some(TabSize::default()), target_version: Some(PythonVersion::default()), diff --git a/crates/ruff_workspace/src/configuration.rs b/crates/ruff_workspace/src/configuration.rs index a7ad93e686..68a505adb0 100644 --- a/crates/ruff_workspace/src/configuration.rs +++ b/crates/ruff_workspace/src/configuration.rs @@ -23,7 +23,8 @@ use ruff::registry::{Rule, RuleSet, INCOMPATIBLE_CODES}; use ruff::rule_selector::Specificity; use ruff::settings::rule_table::RuleTable; use ruff::settings::types::{ - FilePattern, FilePatternSet, PerFileIgnore, PythonVersion, SerializationFormat, Version, + FilePattern, FilePatternSet, PerFileIgnore, PreviewMode, PythonVersion, SerializationFormat, + Version, }; use ruff::settings::{defaults, resolve_per_file_ignores, AllSettings, CliSettings, Settings}; use ruff::{fs, warn_user_once_by_id, RuleSelector, RUFF_PKG_VERSION}; @@ -67,6 +68,7 @@ pub struct Configuration { pub line_length: Option, pub logger_objects: Option>, pub namespace_packages: Option>, + pub preview: Option, pub required_version: Option, pub respect_gitignore: Option, pub show_fixes: Option, @@ -174,6 +176,7 @@ impl Configuration { .collect() }), logger_objects: self.logger_objects.unwrap_or_default(), + preview: self.preview.unwrap_or_default(), typing_modules: self.typing_modules.unwrap_or_default(), // Plugins flake8_annotations: self @@ -387,6 +390,7 @@ impl Configuration { .namespace_packages .map(|namespace_package| resolve_src(&namespace_package, project_root)) .transpose()?, + preview: options.preview.map(PreviewMode::from), per_file_ignores: options.per_file_ignores.map(|per_file_ignores| { per_file_ignores .into_iter() @@ -676,6 +680,7 @@ impl Configuration { show_fixes: self.show_fixes.or(config.show_fixes), src: self.src.or(config.src), target_version: self.target_version.or(config.target_version), + preview: self.preview.or(config.preview), task_tags: self.task_tags.or(config.task_tags), typing_modules: self.typing_modules.or(config.typing_modules), // Plugins diff --git a/crates/ruff_workspace/src/options.rs b/crates/ruff_workspace/src/options.rs index 599f462639..dc71122798 100644 --- a/crates/ruff_workspace/src/options.rs +++ b/crates/ruff_workspace/src/options.rs @@ -482,6 +482,17 @@ pub struct Options { /// field (e.g., `requires-python = ">=3.8"`). If Ruff is configured via /// `ruff.toml` or `.ruff.toml`, no such inference will be performed. pub target_version: Option, + #[option( + default = "false", + value_type = "bool", + example = r#" + # Enable preview features + preview = true + "# + )] + /// Whether to enable preview mode. When preview mode is enabled, Ruff will + /// use unstable rules and fixes. + pub preview: Option, #[option( default = r#"["TODO", "FIXME", "XXX"]"#, value_type = "list[str]", diff --git a/ruff.schema.json b/ruff.schema.json index 0e09a47eb9..bce237bcb1 100644 --- a/ruff.schema.json +++ b/ruff.schema.json @@ -441,6 +441,13 @@ } } }, + "preview": { + "description": "Whether to enable preview mode. When preview mode is enabled, Ruff will use unstable rules and fixes.", + "type": [ + "boolean", + "null" + ] + }, "pycodestyle": { "description": "Options for the `pycodestyle` plugin.", "anyOf": [ From 68f605e80a4f07517a1141077e446e7645a303a1 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 31 Aug 2023 16:21:29 +0100 Subject: [PATCH 015/164] Fix `WithItem` ranges for parenthesized, non-`as` items (#6782) ## Summary This PR attempts to address a problem in the parser related to the range's of `WithItem` nodes in certain contexts -- specifically, `WithItem` nodes in parentheses that do not have an `as` token after them. For example, [here](https://play.ruff.rs/71be2d0b-2a04-4c7e-9082-e72bff152679): ```python with (a, b): pass ``` The range of the `WithItem` `a` is set to the range of `(a, b)`, as is the range of the `WithItem` `b`. In other words, when we have this kind of sequence, we use the range of the entire parenthesized context, rather than the ranges of the items themselves. Note that this also applies to cases [like](https://play.ruff.rs/c551e8e9-c3db-4b74-8cc6-7c4e3bf3713a): ```python with (a, b, c as d): pass ``` You can see the issue in the parser here: ```rust #[inline] WithItemsNoAs: Vec = { >> => { all.into_iter().map(|context_expr| ast::WithItem { context_expr, optional_vars: None, range: (location..end_location).into() }).collect() }, } ``` Fixing this issue is... very tricky. The naive approach is to use the range of the `context_expr` as the range for the `WithItem`, but that range will be incorrect when the `context_expr` is itself parenthesized. For example, _that_ solution would fail here, since the range of the first `WithItem` would be that of `a`, rather than `(a)`: ```python with ((a), b): pass ``` The `with` parsing in general is highly precarious due to ambiguities in the grammar. Changing it in _any_ way seems to lead to an ambiguous grammar that LALRPOP fails to translate. Consensus seems to be that we don't really understand _why_ the current grammar works (i.e., _how_ it avoids these ambiguities as-is). The solution implemented here is to avoid changing the grammar itself, and instead change the shape of the nodes returned by various rules in the grammar. Specifically, everywhere that we return `Expr`, we instead return `ParenthesizedExpr`, which includes a parenthesized range and the underlying `Expr` itself. (If an `Expr` isn't parenthesized, the ranges will be equivalent.) In `WithItemsNoAs`, we can then use the parenthesized range as the range for the `WithItem`. --- crates/ruff_python_ast/src/nodes.rs | 173 +- crates/ruff_python_parser/src/parser.rs | 24 + crates/ruff_python_parser/src/python.lalrpop | 767 +- crates/ruff_python_parser/src/python.rs | 21028 ++++++++-------- ...__tests__parenthesized_with_statement.snap | 681 + ...parser__parser__tests__with_statement.snap | 8 +- 6 files changed, 11829 insertions(+), 10852 deletions(-) create mode 100644 crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parenthesized_with_statement.snap diff --git a/crates/ruff_python_ast/src/nodes.rs b/crates/ruff_python_ast/src/nodes.rs index 514ed6c8ff..06dc20cab9 100644 --- a/crates/ruff_python_ast/src/nodes.rs +++ b/crates/ruff_python_ast/src/nodes.rs @@ -2716,7 +2716,7 @@ impl Ranged for crate::nodes::StmtContinue { self.range } } -impl Ranged for StmtIpyEscapeCommand { +impl Ranged for crate::nodes::StmtIpyEscapeCommand { fn range(&self) -> TextRange { self.range } @@ -2888,7 +2888,7 @@ impl Ranged for crate::nodes::ExprSlice { self.range } } -impl Ranged for ExprIpyEscapeCommand { +impl Ranged for crate::nodes::ExprIpyEscapeCommand { fn range(&self) -> TextRange { self.range } @@ -2927,7 +2927,6 @@ impl Ranged for crate::Expr { } } } - impl Ranged for crate::nodes::Comprehension { fn range(&self) -> TextRange { self.range @@ -2945,7 +2944,6 @@ impl Ranged for crate::ExceptHandler { } } } - impl Ranged for crate::nodes::Parameter { fn range(&self) -> TextRange { self.range @@ -3086,6 +3084,173 @@ impl Ranged for crate::nodes::ParameterWithDefault { } } +/// An expression that may be parenthesized. +#[derive(Clone, Debug)] +pub struct ParenthesizedExpr { + /// The range of the expression, including any parentheses. + pub range: TextRange, + /// The underlying expression. + pub expr: Expr, +} +impl Ranged for ParenthesizedExpr { + fn range(&self) -> TextRange { + self.range + } +} +impl From for ParenthesizedExpr { + fn from(expr: Expr) -> Self { + ParenthesizedExpr { + range: expr.range(), + expr, + } + } +} +impl From for Expr { + fn from(parenthesized_expr: ParenthesizedExpr) -> Self { + parenthesized_expr.expr + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprIpyEscapeCommand) -> Self { + Expr::IpyEscapeCommand(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprBoolOp) -> Self { + Expr::BoolOp(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprNamedExpr) -> Self { + Expr::NamedExpr(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprBinOp) -> Self { + Expr::BinOp(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprUnaryOp) -> Self { + Expr::UnaryOp(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprLambda) -> Self { + Expr::Lambda(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprIfExp) -> Self { + Expr::IfExp(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprDict) -> Self { + Expr::Dict(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprSet) -> Self { + Expr::Set(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprListComp) -> Self { + Expr::ListComp(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprSetComp) -> Self { + Expr::SetComp(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprDictComp) -> Self { + Expr::DictComp(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprGeneratorExp) -> Self { + Expr::GeneratorExp(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprAwait) -> Self { + Expr::Await(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprYield) -> Self { + Expr::Yield(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprYieldFrom) -> Self { + Expr::YieldFrom(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprCompare) -> Self { + Expr::Compare(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprCall) -> Self { + Expr::Call(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprFormattedValue) -> Self { + Expr::FormattedValue(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprFString) -> Self { + Expr::FString(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprConstant) -> Self { + Expr::Constant(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprAttribute) -> Self { + Expr::Attribute(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprSubscript) -> Self { + Expr::Subscript(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprStarred) -> Self { + Expr::Starred(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprName) -> Self { + Expr::Name(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprList) -> Self { + Expr::List(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprTuple) -> Self { + Expr::Tuple(payload).into() + } +} +impl From for ParenthesizedExpr { + fn from(payload: ExprSlice) -> Self { + Expr::Slice(payload).into() + } +} + #[cfg(target_pointer_width = "64")] mod size_assertions { use static_assertions::assert_eq_size; diff --git a/crates/ruff_python_parser/src/parser.rs b/crates/ruff_python_parser/src/parser.rs index 8ffc2078e1..50b9998ba9 100644 --- a/crates/ruff_python_parser/src/parser.rs +++ b/crates/ruff_python_parser/src/parser.rs @@ -643,6 +643,30 @@ with (0 as a, 1 as b,): pass insta::assert_debug_snapshot!(parse_suite(source, "").unwrap()); } + #[test] + fn test_parenthesized_with_statement() { + let source = "\ +with ((a), (b)): pass +with ((a), (b), c as d, (e)): pass +with (a, b): pass +with (a, b) as c: pass +with ((a, b) as c): pass +with (a as b): pass +with (a): pass +with (a := 0): pass +with (a := 0) as x: pass +with ((a)): pass +with ((a := 0)): pass +with (a as b, (a := 0)): pass +with (a, (a := 0)): pass +with (yield): pass +with (yield from a): pass +with ((yield)): pass +with ((yield from a)): pass +"; + insta::assert_debug_snapshot!(parse_suite(source, "").unwrap()); + } + #[test] fn test_with_statement_invalid() { for source in [ diff --git a/crates/ruff_python_parser/src/python.lalrpop b/crates/ruff_python_parser/src/python.lalrpop index 85be9d859f..eb65e6caa2 100644 --- a/crates/ruff_python_parser/src/python.lalrpop +++ b/crates/ruff_python_parser/src/python.lalrpop @@ -23,7 +23,7 @@ grammar(mode: Mode); // By having only a single pub function, we reduce this to one. pub(crate) Top: ast::Mod = { StartModule => ast::ModModule { body, range: (start..end).into() }.into(), - StartExpression ("\n")* => ast::ModExpression { body: Box::new(body), range: (start..end).into() }.into() + StartExpression ("\n")* => ast::ModExpression { body: Box::new(body.into()), range: (start..end).into() }.into() }; Program: ast::Suite = { @@ -102,7 +102,7 @@ PassStatement: ast::Stmt = { DelStatement: ast::Stmt = { "del" => { ast::Stmt::Delete( - ast::StmtDelete { targets: targets.into_iter().map(|expr| set_context(expr, ast::ExprContext::Del)).collect(), range: (location..end_location).into() } + ast::StmtDelete { targets: targets.into_iter().map(|expr| set_context(expr.into(), ast::ExprContext::Del)).collect(), range: (location..end_location).into() } ) }, }; @@ -112,16 +112,16 @@ ExpressionStatement: ast::Stmt = { // Just an expression, no assignment: if suffix.is_empty() { ast::Stmt::Expr( - ast::StmtExpr { value: Box::new(expression), range: (location..end_location).into() } + ast::StmtExpr { value: Box::new(expression.into()), range: (location..end_location).into() } ) } else { - let mut targets = vec![set_context(expression, ast::ExprContext::Store)]; + let mut targets = vec![set_context(expression.into(), ast::ExprContext::Store)]; let mut values = suffix; - let value = Box::new(values.pop().unwrap()); + let value = Box::new(values.pop().unwrap().into()); for target in values { - targets.push(set_context(target, ast::ExprContext::Store)); + targets.push(set_context(target.into(), ast::ExprContext::Store)); } ast::Stmt::Assign( @@ -132,20 +132,20 @@ ExpressionStatement: ast::Stmt = { => { ast::Stmt::AugAssign( ast::StmtAugAssign { - target: Box::new(set_context(target, ast::ExprContext::Store)), + target: Box::new(set_context(target.into(), ast::ExprContext::Store)), op, - value: Box::new(rhs), + value: Box::new(rhs.into()), range: (location..end_location).into() }, ) }, > ":" > => { - let simple = target.is_name_expr(); + let simple = target.expr.is_name_expr(); ast::Stmt::AnnAssign( ast::StmtAnnAssign { - target: Box::new(set_context(target, ast::ExprContext::Store)), - annotation: Box::new(annotation), - value: rhs.map(Box::new), + target: Box::new(set_context(target.into(), ast::ExprContext::Store)), + annotation: Box::new(annotation.into()), + value: rhs.map(ast::Expr::from).map(Box::new), simple, range: (location..end_location).into() }, @@ -153,33 +153,33 @@ ExpressionStatement: ast::Stmt = { }, }; -AssignSuffix: ast::Expr = { +AssignSuffix: ast::ParenthesizedExpr = { "=" => e, "=" => e }; -TestListOrYieldExpr: ast::Expr = { +TestListOrYieldExpr: ast::ParenthesizedExpr = { TestList, YieldExpr } #[inline] -TestOrStarExprList: ast::Expr = { +TestOrStarExprList: ast::ParenthesizedExpr = { // as far as I can tell, these were the same TestList }; -TestOrStarExpr: ast::Expr = { +TestOrStarExpr: ast::ParenthesizedExpr = { Test<"all">, StarExpr, }; -NamedOrStarExpr: ast::Expr = { +NamedOrStarExpr: ast::ParenthesizedExpr = { NamedExpression, StarExpr, }; -TestOrStarNamedExpr: ast::Expr = { +TestOrStarNamedExpr: ast::ParenthesizedExpr = { NamedExpressionTest, StarExpr, }; @@ -210,12 +210,12 @@ FlowStatement: ast::Stmt = { }, "return" => { ast::Stmt::Return( - ast::StmtReturn { value: value.map(Box::new), range: (location..end_location).into() } + ast::StmtReturn { value: value.map(ast::Expr::from).map(Box::new), range: (location..end_location).into() } ) }, => { ast::Stmt::Expr( - ast::StmtExpr { value: Box::new(expression), range: (location..end_location).into() } + ast::StmtExpr { value: Box::new(expression.into()), range: (location..end_location).into() } ) }, RaiseStatement, @@ -227,9 +227,9 @@ RaiseStatement: ast::Stmt = { ast::StmtRaise { exc: None, cause: None, range: (location..end_location).into() } ) }, - "raise" > >)?> => { + "raise" > >)?> => { ast::Stmt::Raise( - ast::StmtRaise { exc: Some(Box::new(t)), cause: c.map(Box::new), range: (location..end_location).into() } + ast::StmtRaise { exc: Some(Box::new(exc.into())), cause: cause.map(ast::Expr::from).map(Box::new), range: (location..end_location).into() } ) }, }; @@ -315,8 +315,8 @@ AssertStatement: ast::Stmt = { "assert" > >)?> => { ast::Stmt::Assert( ast::StmtAssert { - test: Box::new(test), - msg: msg.map(Box::new), + test: Box::new(test.into()), + msg: msg.map(ast::Expr::from).map(Box::new), range: (location..end_location).into() } ) @@ -342,7 +342,7 @@ IpyEscapeCommandStatement: ast::Stmt = { } } -IpyEscapeCommandExpr: ast::Expr = { +IpyEscapeCommandExpr: ast::ParenthesizedExpr = { =>? { if mode == Mode::Jupyter { // This should never occur as the lexer won't allow it. @@ -352,13 +352,11 @@ IpyEscapeCommandExpr: ast::Expr = { location, })?; } - Ok(ast::Expr::IpyEscapeCommand( - ast::ExprIpyEscapeCommand { - kind: c.0, - value: c.1, - range: (location..end_location).into() - } - )) + Ok(ast::ExprIpyEscapeCommand { + kind: c.0, + value: c.1, + range: (location..end_location).into() + }.into()) } else { Err(LexicalError { error: LexicalErrorType::OtherError("IPython escape commands are only allowed in Jupyter mode".to_string()), @@ -428,7 +426,7 @@ IpyHelpEndEscapeCommandStatement: ast::Stmt = { }; let mut value = String::new(); - unparse_expr(&e, &mut value)?; + unparse_expr(&e.into(), &mut value)?; Ok(ast::Stmt::IpyEscapeCommand( ast::StmtIpyEscapeCommand { @@ -462,7 +460,7 @@ MatchStatement: ast::Stmt = { .end(); ast::Stmt::Match( ast::StmtMatch { - subject: Box::new(subject), + subject: Box::new(subject.into()), cases, range: (location..end_location).into() } @@ -478,13 +476,13 @@ MatchStatement: ast::Stmt = { .end(); ast::Stmt::Match( ast::StmtMatch { - subject: Box::new(subject), + subject: Box::new(subject.into()), cases, range: (location..end_location).into() } ) }, - "match" > ","? ":" "\n" Indent Dedent => { + "match" > ","? ":" "\n" Indent Dedent => { let end_location = cases .last() .unwrap() @@ -492,11 +490,12 @@ MatchStatement: ast::Stmt = { .last() .unwrap() .end(); + let elts = elts.into_iter().map(ast::Expr::from).collect(); ast::Stmt::Match( ast::StmtMatch { subject: Box::new(ast::Expr::Tuple( ast::ExprTuple { - elts: subjects, + elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }, @@ -523,7 +522,7 @@ MatchCase: ast::MatchCase = { Guard: ast::Expr = { "if" => { - guard + guard.into() } } @@ -622,32 +621,30 @@ StarPattern: ast::Pattern = { }.into(), } -ConstantAtom: ast::Expr = { +ConstantAtom: ast::ParenthesizedExpr = { => ast::Expr::Constant( ast::ExprConstant { value, kind: None, range: (location..end_location).into() } - ), + ).into(), } -ConstantExpr: ast::Expr = { +ConstantExpr: ast::ParenthesizedExpr = { ConstantAtom, "-" => ast::Expr::UnaryOp( ast::ExprUnaryOp { op: ast::UnaryOp::USub, - operand: Box::new(operand), + operand: Box::new(operand.into()), range: (location..end_location).into() } - ), + ).into(), } -AddOpExpr: ast::Expr = { - => ast::Expr::BinOp( - ast::ExprBinOp { - left: Box::new(left), - op, - right: Box::new(right), - range: (location..end_location).into() - } - ), +AddOpExpr: ast::ParenthesizedExpr = { + => ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into(), } LiteralPattern: ast::Pattern = { @@ -664,11 +661,11 @@ LiteralPattern: ast::Pattern = { range: (location..end_location).into() }.into(), => ast::PatternMatchValue { - value: Box::new(value), + value: Box::new(value.into()), range: (location..end_location).into() }.into(), => ast::PatternMatchValue { - value: Box::new(value), + value: Box::new(value.into()), range: (location..end_location).into() }.into(), =>? Ok(ast::PatternMatchValue { @@ -692,22 +689,18 @@ MatchName: ast::Expr = { } MatchNameOrAttr: ast::Expr = { - "." => ast::Expr::Attribute( - ast::ExprAttribute { - value: Box::new(name), - attr, - ctx: ast::ExprContext::Load, - range: (location..end_location).into() - }, - ), - "." => ast::Expr::Attribute( - ast::ExprAttribute { - value: Box::new(e), - attr, - ctx: ast::ExprContext::Load, - range: (location..end_location).into() - }, - ) + "." => ast::ExprAttribute { + value: Box::new(name), + attr, + ctx: ast::ExprContext::Load, + range: (location..end_location).into() + }.into(), + "." => ast::ExprAttribute { + value: Box::new(e), + attr, + ctx: ast::ExprContext::Load, + range: (location..end_location).into() + }.into(), } ValuePattern: ast::Pattern = { @@ -718,30 +711,24 @@ ValuePattern: ast::Pattern = { } MappingKey: ast::Expr = { - ConstantExpr, - AddOpExpr, MatchNameOrAttr, - "None" => ast::Expr::Constant( - ast::ExprConstant { - value: ast::Constant::None, - kind: None, - range: (location..end_location).into() - }, - ), - "True" => ast::Expr::Constant( - ast::ExprConstant { - value: true.into(), - kind: None, - range: (location..end_location).into() - }, - ), - "False" => ast::Expr::Constant( - ast::ExprConstant { - value: false.into(), - kind: None, - range: (location..end_location).into() - }, - ), + => e.into(), + => e.into(), + "None" => ast::ExprConstant { + value: ast::Constant::None, + kind: None, + range: (location..end_location).into() + }.into(), + "True" => ast::ExprConstant { + value: true.into(), + kind: None, + range: (location..end_location).into() + }.into(), + "False" => ast::ExprConstant { + value: false.into(), + kind: None, + range: (location..end_location).into() + }.into(), =>? Ok(parse_strings(s)?), } @@ -850,7 +837,7 @@ IfStatement: ast::Stmt = { "if" ":" "elif" ":" )*> "else" ":" )?> => { let elif_else_clauses: Vec<_> = s2.into_iter().map(|(start, test, body)| ast::ElifElseClause { range: (start..body.last().unwrap().end()).into(), - test: Some(test), + test: Some(test.into()), body, }).chain(s3.into_iter().map(|(start, body)| ast::ElifElseClause { range: (start..body.last().unwrap().end()).into(), @@ -863,7 +850,7 @@ IfStatement: ast::Stmt = { .map_or_else(|| body.last().unwrap().end(), Ranged::end); ast::Stmt::If( - ast::StmtIf { test: Box::new(test), body, elif_else_clauses, range: (location..end_location).into() } + ast::StmtIf { test: Box::new(test.into()), body, elif_else_clauses, range: (location..end_location).into() } ) }, }; @@ -878,7 +865,7 @@ WhileStatement: ast::Stmt = { .end(); ast::Stmt::While( ast::StmtWhile { - test: Box::new(test), + test: Box::new(test.into()), body, orelse, range: (location..end_location).into() @@ -895,8 +882,8 @@ ForStatement: ast::Stmt = { .or_else(|| body.last()) .unwrap() .end(); - let target = Box::new(set_context(target, ast::ExprContext::Store)); - let iter = Box::new(iter); + let target = Box::new(set_context(target.into(), ast::ExprContext::Store)); + let iter = Box::new(iter.into()); ast::Stmt::For(ast::StmtFor { target, iter, body, orelse, is_async: is_async.is_some(), range: (location..end_location).into() }) }, }; @@ -964,7 +951,7 @@ ExceptStarClause: ast::ExceptHandler = { let end_location = body.last().unwrap().end(); ast::ExceptHandler::ExceptHandler( ast::ExceptHandlerExceptHandler { - type_: Some(Box::new(typ)), + type_: Some(Box::new(typ.into())), name: None, body, range: (location..end_location).into() @@ -975,7 +962,7 @@ ExceptStarClause: ast::ExceptHandler = { let end_location = body.last().unwrap().end(); ast::ExceptHandler::ExceptHandler( ast::ExceptHandlerExceptHandler { - type_: Some(Box::new(x.0)), + type_: Some(Box::new(x.0.into())), name: Some(x.1), body, range: (location..end_location).into() @@ -990,7 +977,7 @@ ExceptClause: ast::ExceptHandler = { let end_location = body.last().unwrap().end(); ast::ExceptHandler::ExceptHandler( ast::ExceptHandlerExceptHandler { - type_: typ.map(Box::new), + type_: typ.map(ast::Expr::from).map(Box::new), name: None, body, range: (location..end_location).into() @@ -1001,7 +988,7 @@ ExceptClause: ast::ExceptHandler = { let end_location = body.last().unwrap().end(); ast::ExceptHandler::ExceptHandler( ast::ExceptHandlerExceptHandler { - type_: Some(Box::new(x.0)), + type_: Some(Box::new(x.0.into())), name: Some(x.1), body, range: (location..end_location).into() @@ -1022,7 +1009,25 @@ WithItems: Vec = { "(" ",")?> >)*> ","? ")" => { left.into_iter().flatten().chain([mid]).chain(right).collect() }, - > => vec![<>], + > => { + // Special-case: if the `WithItem` is a parenthesized named expression, then the item + // should _exclude_ the outer parentheses in its range. For example: + // ```python + // with (a := 0): pass + // ``` + // In this case, the `(` and `)` are part of the `with` statement. + // The same applies to `yield` and `yield from`. + let item = if matches!(item.context_expr, ast::Expr::NamedExpr(_) | ast::Expr::Yield(_) | ast::Expr::YieldFrom(_)) { + ast::WithItem { + range: item.range().add_start(TextSize::new(1)).sub_end(TextSize::new(1)), + context_expr: item.context_expr, + optional_vars: item.optional_vars, + } + } else { + item + }; + vec![item] + }, > >)+> => { [item].into_iter().chain(items).collect() } @@ -1030,36 +1035,61 @@ WithItems: Vec = { #[inline] WithItemsNoAs: Vec = { - >> => { - all.into_iter().map(|context_expr| ast::WithItem { context_expr, optional_vars: None, range: (location..end_location).into() }).collect() + >> => { + all.into_iter().map(|context_expr| ast::WithItem { + range: context_expr.range(), + context_expr: context_expr.into(), + optional_vars: None, + }).collect() }, } WithItem: ast::WithItem = { - > => ast::WithItem { context_expr, optional_vars: None, range: (location..end_location).into() }, + > => { + ast::WithItem { + range: context_expr.range(), + context_expr: context_expr.into(), + optional_vars: None, + } + }, , }; WithItemAs: ast::WithItem = { - > "as" > => { - let optional_vars = Some(Box::new(set_context(vars, ast::ExprContext::Store))); - ast::WithItem { context_expr, optional_vars, range: (location..end_location).into() } + > "as" > => { + let optional_vars = Some(Box::new(set_context(optional_vars.into(), ast::ExprContext::Store))); + ast::WithItem { + context_expr: context_expr.into(), + optional_vars, + range: (location..end_location).into(), + } }, } FuncDef: ast::Stmt = { - "def" " >)?> ":" => { - let args = Box::new(args); - let returns = r.map(Box::new); + "def" " >)?> ":" => { + let parameters = Box::new(parameters); + let returns = returns.map(ast::Expr::from).map(Box::new); let end_location = body.last().unwrap().end(); - ast::StmtFunctionDef { name, parameters:args, body, decorator_list, returns, type_params, is_async: is_async.is_some(), range: (location..end_location).into() }.into() + ast::StmtFunctionDef { + name, + parameters, + body, + decorator_list, + returns, + type_params, + is_async: is_async.is_some(), + range: (location..end_location).into(), + }.into() }, }; TypeAliasName: ast::Expr = { - => ast::Expr::Name( - ast::ExprName { id: name.into(), ctx: ast::ExprContext::Store, range: (location..end_location).into() }, - ), + => ast::ExprName { + id: name.into(), + ctx: ast::ExprContext::Store, + range: (location..end_location).into(), + }.into(), } TypeAliasStatement: ast::Stmt = { @@ -1067,7 +1097,7 @@ TypeAliasStatement: ast::Stmt = { ast::Stmt::TypeAlias( ast::StmtTypeAlias { name: Box::new(name), - value: Box::new(value), + value: Box::new(value.into()), type_params, range: (location..end_location).into() }, @@ -1163,17 +1193,17 @@ ParameterDefs: (Vec, Vec: ast::ParameterWithDefault = { => i, - "=" > => { - i.default = Some(Box::new(e)); + "=" > => { + i.default = Some(Box::new(default.into())); i.range = (i.range.start()..end_location).into(); i }, }; UntypedParameter: ast::ParameterWithDefault = { - => { - let def = ast::Parameter { name:arg, annotation: None, range: (location..end_location).into() }; - ast::ParameterWithDefault { parameter:def, default: None, range: (location..end_location).into() } + => { + let parameter = ast::Parameter { name, annotation: None, range: (location..end_location).into() }; + ast::ParameterWithDefault { parameter, default: None, range: (location..end_location).into() } }, }; StarUntypedParameter: ast::Parameter = { @@ -1181,24 +1211,24 @@ StarUntypedParameter: ast::Parameter = { }; TypedParameter: ast::ParameterWithDefault = { - >)?> => { - let annotation = a.map(Box::new); - let def = ast::Parameter { name:arg, annotation, range: (location..end_location).into() }; - ast::ParameterWithDefault { parameter:def, default: None, range: (location..end_location).into() } + >)?> => { + let annotation = annotation.map(ast::Expr::from).map(Box::new); + let parameter = ast::Parameter { name, annotation, range: (location..end_location).into() }; + ast::ParameterWithDefault { parameter, default: None, range: (location..end_location).into() } }, }; StarTypedParameter: ast::Parameter = { - )?> => { - let annotation = a.map(Box::new); - ast::Parameter { name:arg, annotation, range: (location..end_location).into() } + )?> => { + let annotation = annotation.map(ast::Expr::from).map(Box::new); + ast::Parameter { name, annotation, range: (location..end_location).into() } }, }; DoubleStarTypedParameter: ast::Parameter = { - >)?> => { - let annotation = a.map(Box::new); - ast::Parameter { name:arg, annotation, range: (location..end_location).into() } + >)?> => { + let annotation = annotation.map(ast::Expr::from).map(Box::new); + ast::Parameter { name, annotation, range: (location..end_location).into() } }, }; @@ -1255,7 +1285,7 @@ TypeParams: ast::TypeParams = { TypeParam: ast::TypeParam = { >)?> => { ast::TypeParam::TypeVar( - ast::TypeParamTypeVar { name, bound: bound.map(Box::new), range: (location..end_location).into() } + ast::TypeParamTypeVar { name, bound: bound.map(ast::Expr::from).map(Box::new), range: (location..end_location).into() } ) }, "*" => { @@ -1272,103 +1302,97 @@ TypeParam: ast::TypeParam = { // Decorators: Decorator: ast::Decorator = { - "@" "\n" => { - ast::Decorator { range: (location..end_location).into(), expression: p } + "@" "\n" => { + ast::Decorator { range: (location..end_location).into(), expression: expression.into() } }, }; -YieldExpr: ast::Expr = { - "yield" => ast::Expr::Yield( - ast::ExprYield { value: value.map(Box::new), range: (location..end_location).into() } - ), - "yield" "from" > => ast::Expr::YieldFrom( - ast::ExprYieldFrom { value: Box::new(e), range: (location..end_location).into() } - ), +YieldExpr: ast::ParenthesizedExpr = { + "yield" => ast::ExprYield { + value: value.map(ast::Expr::from).map(Box::new), + range: (location..end_location).into(), + }.into(), + "yield" "from" > => ast::ExprYieldFrom { + value: Box::new(value.into()), + range: (location..end_location).into(), + }.into(), }; -Test: ast::Expr = { - > "if" > "else" > => ast::Expr::IfExp( - ast::ExprIfExp { - test: Box::new(test), - body: Box::new(body), - orelse: Box::new(orelse), - range: (location..end_location).into() - } - ), +Test: ast::ParenthesizedExpr = { + > "if" > "else" > => ast::ExprIfExp { + test: Box::new(test.into()), + body: Box::new(body.into()), + orelse: Box::new(orelse.into()), + range: (location..end_location).into() + }.into(), OrTest, LambdaDef, }; -NamedExpressionTest: ast::Expr = { +NamedExpressionTest: ast::ParenthesizedExpr = { NamedExpression, Test<"all">, } -NamedExpressionName: ast::Expr = { - => ast::Expr::Name( - ast::ExprName { id: id.into(), ctx: ast::ExprContext::Store, range: (location..end_location).into() }, - ), +NamedExpressionName: ast::ParenthesizedExpr = { + => ast::ExprName { + id: id.into(), + ctx: ast::ExprContext::Store, + range: (location..end_location).into(), + }.into(), } -NamedExpression: ast::Expr = { +NamedExpression: ast::ParenthesizedExpr = { ":=" > => { - ast::Expr::NamedExpr( - ast::ExprNamedExpr { - target: Box::new(target), - value: Box::new(value), - range: (location..end_location).into(), - } - ) + ast::ExprNamedExpr { + target: Box::new(target.into()), + value: Box::new(value.into()), + range: (location..end_location).into(), + }.into() }, }; -LambdaDef: ast::Expr = { +LambdaDef: ast::ParenthesizedExpr = { "lambda" ?> ":" > =>? { parameters.as_ref().map(validate_arguments).transpose()?; - Ok(ast::Expr::Lambda( - ast::ExprLambda { - parameters: parameters.map(Box::new), - body: Box::new(body), - range: (location..end_location).into() - } - )) + Ok(ast::ExprLambda { + parameters: parameters.map(Box::new), + body: Box::new(body.into()), + range: (location..end_location).into() + }.into()) } } -OrTest: ast::Expr = { - > "or")+> > => { - values.push(last); - ast::Expr::BoolOp( - ast::ExprBoolOp { op: ast::BoolOp::Or, values, range: (location..end_location).into() } - ) +OrTest: ast::ParenthesizedExpr = { + > "or")+> > => { + let values = values.into_iter().chain(std::iter::once(last)).map(ast::Expr::from).collect(); + ast::ExprBoolOp { op: ast::BoolOp::Or, values, range: (location..end_location).into() }.into() }, AndTest, }; -AndTest: ast::Expr = { - > "and")+> > => { - values.push(last); - ast::Expr::BoolOp( - ast::ExprBoolOp { op: ast::BoolOp::And, values, range: (location..end_location).into() } - ) +AndTest: ast::ParenthesizedExpr = { + > "and")+> > => { + let values = values.into_iter().chain(std::iter::once(last)).map(ast::Expr::from).collect(); + ast::ExprBoolOp { op: ast::BoolOp::And, values, range: (location..end_location).into() }.into() }, NotTest, }; -NotTest: ast::Expr = { - "not" > => ast::Expr::UnaryOp( - ast::ExprUnaryOp { operand: Box::new(e), op: ast::UnaryOp::Not, range: (location..end_location).into() } - ), +NotTest: ast::ParenthesizedExpr = { + "not" > => ast::ExprUnaryOp { + operand: Box::new(operand.into()), + op: ast::UnaryOp::Not, + range: (location..end_location).into(), + }.into(), Comparison, }; -Comparison: ast::Expr = { +Comparison: ast::ParenthesizedExpr = { > )+> => { - let (ops, comparators) = comparisons.into_iter().unzip(); - ast::Expr::Compare( - ast::ExprCompare { left: Box::new(left), ops, comparators, range: (location..end_location).into() } - ) + let (ops, comparators) = comparisons.into_iter().map(|(op, comparator)| (op, ast::Expr::from(comparator))).unzip(); + ast::ExprCompare { left: Box::new(left.into()), ops, comparators, range: (location..end_location).into() }.into() }, Expression, }; @@ -1386,31 +1410,43 @@ CompOp: ast::CmpOp = { "is" "not" => ast::CmpOp::IsNot, }; -Expression: ast::Expr = { - > "|" > => ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op: ast::Operator::BitOr, right: Box::new(e2), range: (location..end_location).into() } - ), +Expression: ast::ParenthesizedExpr = { + > "|" > => ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::BitOr, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into(), XorExpression, }; -XorExpression: ast::Expr = { - > "^" > => ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op: ast::Operator::BitXor, right: Box::new(e2), range: (location..end_location).into() } - ), +XorExpression: ast::ParenthesizedExpr = { + > "^" > => ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::BitXor, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into(), AndExpression, }; -AndExpression: ast::Expr = { - > "&" > => ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op: ast::Operator::BitAnd, right: Box::new(e2), range: (location..end_location).into() } - ), +AndExpression: ast::ParenthesizedExpr = { + > "&" > => ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::BitAnd, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into(), ShiftExpression, }; -ShiftExpression: ast::Expr = { - > > => ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op, right: Box::new(e2), range: (location..end_location).into() } - ), +ShiftExpression: ast::ParenthesizedExpr = { + > > => ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into(), ArithmeticExpression, }; @@ -1419,10 +1455,13 @@ ShiftOp: ast::Operator = { ">>" => ast::Operator::RShift, }; -ArithmeticExpression: ast::Expr = { - > > => ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(a), op, right: Box::new(b), range: (location..end_location).into() } - ), +ArithmeticExpression: ast::ParenthesizedExpr = { + > > => ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into(), + }.into(), Term, }; @@ -1431,10 +1470,13 @@ AddOp: ast::Operator = { "-" => ast::Operator::Sub, }; -Term: ast::Expr = { - > > => ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(a), op, right: Box::new(b), range: (location..end_location).into() } - ), +Term: ast::ParenthesizedExpr = { + > > => ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into(), + }.into(), Factor, }; @@ -1446,10 +1488,12 @@ MulOp: ast::Operator = { "@" => ast::Operator::MatMult, }; -Factor: ast::Expr = { - > => ast::Expr::UnaryOp( - ast::ExprUnaryOp { operand: Box::new(e), op, range: (location..end_location).into() } - ), +Factor: ast::ParenthesizedExpr = { + > => ast::ExprUnaryOp { + operand: Box::new(operand.into()), + op, + range: (location..end_location).into(), + }.into(), Power, }; @@ -1459,122 +1503,140 @@ UnaryOp: ast::UnaryOp = { "~" => ast::UnaryOp::Invert, }; -Power: ast::Expr = { - > "**" > => ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e), op: ast::Operator::Pow, right: Box::new(b), range: (location..end_location).into() } - ), +Power: ast::ParenthesizedExpr = { + > "**" > => ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::Pow, + right: Box::new(right.into()), + range: (location..end_location).into(), + }.into(), AtomExpr, }; -AtomExpr: ast::Expr = { - "await" > => { - ast::Expr::Await( - ast::ExprAwait { value: Box::new(atom), range: (location..end_location).into() } - ) +AtomExpr: ast::ParenthesizedExpr = { + "await" > => { + ast::ExprAwait { value: Box::new(value.into()), range: (location..end_location).into() }.into() }, AtomExpr2, } -AtomExpr2: ast::Expr = { +AtomExpr2: ast::ParenthesizedExpr = { Atom, - > => { - ast::Expr::Call( - ast::ExprCall { func: Box::new(f), arguments, range: (location..end_location).into() } - ) - }, - > "[" "]" => ast::Expr::Subscript( - ast::ExprSubscript { value: Box::new(e), slice: Box::new(s), ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ), - > "." => ast::Expr::Attribute( - ast::ExprAttribute { value: Box::new(e), attr, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ), + > => ast::ExprCall { + func: Box::new(func.into()), + arguments, + range: (location..end_location).into(), + }.into(), + > "[" "]" => ast::ExprSubscript { + value: Box::new(value.into()), + slice: Box::new(slice.into()), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into(), + > "." => ast::ExprAttribute { + value: Box::new(value.into()), + attr, + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into(), }; -SubscriptList: ast::Expr = { - => { - s1 - }, +SubscriptList: ast::ParenthesizedExpr = { + Subscript, "," => { - ast::Expr::Tuple( - ast::ExprTuple { elts: vec![s1], ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - ) + ast::ExprTuple { + elts: vec![s1.into()], + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() }, > ","? => { - ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - ) + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprTuple { + elts, + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } }; -Subscript: ast::Expr = { +Subscript: ast::ParenthesizedExpr = { TestOrStarNamedExpr, - ?> ":" ?> => { - let lower = e1.map(Box::new); - let upper = e2.map(Box::new); - let step = e3.flatten().map(Box::new); + ?> ":" ?> => { + let lower = lower.map(ast::Expr::from).map(Box::new); + let upper = upper.map(ast::Expr::from).map(Box::new); + let step = step.flatten().map(ast::Expr::from).map(Box::new); ast::Expr::Slice( ast::ExprSlice { lower, upper, step, range: (location..end_location).into() } - ) + ).into() } }; -SliceOp: Option = { +SliceOp: Option = { ":" ?> => e, } -Atom: ast::Expr = { - =>? Ok(parse_strings(s)?), - => ast::Expr::Constant( - ast::ExprConstant { value, kind: None, range: (location..end_location).into() } - ), - => ast::Expr::Name( - ast::ExprName { id: id.into(), ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ), - "[" "]" => { - let elts = e.unwrap_or_default(); - ast::Expr::List( - ast::ExprList { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) +Atom: ast::ParenthesizedExpr = { + =>? Ok(parse_strings(s)?.into()), + => ast::ExprConstant { + value, + kind: None, + range: (location..end_location).into(), + }.into(), + => ast::ExprName { + id: id.into(), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into(), + "[" "]" => { + let elts = elts.into_iter().flatten().map(ast::Expr::from).collect(); + ast::ExprList { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into() }, "[" "]" => { - ast::Expr::ListComp( - ast::ExprListComp { elt: Box::new(elt), generators, range: (location..end_location).into() } - ) + ast::ExprListComp { elt: Box::new(elt.into()), generators, range: (location..end_location).into() }.into() }, "(" >> ")" if Goal != "no-withitems" => { if elts.len() == 1 && trailing_comma.is_none() { - elts.into_iter().next().unwrap() + ast::ParenthesizedExpr { + expr: elts.into_iter().next().unwrap().into(), + range: (location..end_location).into(), + } } else { - ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into() } }, "(" >> ",")?> )*> ")" =>? { if left.is_none() && right.is_empty() && trailing_comma.is_none() { - if mid.is_starred_expr() { + if mid.expr.is_starred_expr() { return Err(LexicalError{ error: LexicalErrorType::OtherError("cannot use starred expression here".to_string()), location: mid.start(), })?; } - Ok(mid) + Ok(ast::ParenthesizedExpr { + expr: mid.into(), + range: (location..end_location).into(), + }) } else { - let elts = left.into_iter().flatten().chain([mid]).chain(right).collect(); - Ok(ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - )) + let elts = left.into_iter().flatten().chain([mid]).chain(right).map(ast::Expr::from).collect(); + Ok(ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into()) } }, - "(" ")" => ast::Expr::Tuple( - ast::ExprTuple { elts: Vec::new(), ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ), - "(" ")" => e, - "(" ")" => { - ast::Expr::GeneratorExp( - ast::ExprGeneratorExp { elt: Box::new(elt), generators, range: (location..end_location).into() } - ) + "(" ")" => ast::ExprTuple { + elts: Vec::new(), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into(), + "(" ")" => ast::ParenthesizedExpr { + expr: e.into(), + range: (location..end_location).into(), }, + "(" ")" => ast::ExprGeneratorExp { + elt: Box::new(elt.into()), + generators, + range: (location..end_location).into(), + }.into(), "(" "**" > ")" =>? { Err(LexicalError{ error : LexicalErrorType::OtherError("cannot use double starred expression here".to_string()), @@ -1585,67 +1647,67 @@ Atom: ast::Expr = { let (keys, values) = e .unwrap_or_default() .into_iter() - .map(|(k, v)| (k.map(|x| *x), v)) + .map(|(k, v)| (k.map(|x| ast::Expr::from(*x)), ast::Expr::from(v))) .unzip(); - ast::Expr::Dict( - ast::ExprDict { keys, values, range: (location..end_location).into() } - ) + ast::ExprDict { keys, values, range: (location..end_location).into() }.into() }, "{" "}" => { - ast::Expr::DictComp( - ast::ExprDictComp { - key: Box::new(e1.0), - value: Box::new(e1.1), - generators, - range: (location..end_location).into() - } - ) + ast::ExprDictComp { + key: Box::new(e1.0.into()), + value: Box::new(e1.1.into()), + generators, + range: (location..end_location).into() + }.into() }, - "{" "}" => ast::Expr::Set( - ast::ExprSet { elts, range: (location..end_location).into() } - ), - "{" "}" => { - ast::Expr::SetComp( - ast::ExprSetComp { elt: Box::new(elt), generators, range: (location..end_location).into() } - ) + "{" "}" => { + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprSet { + elts, + range: (location..end_location).into(), + }.into() }, - "True" => ast::Expr::Constant(ast::ExprConstant { value: true.into(), kind: None, range: (location..end_location).into() }), - "False" => ast::Expr::Constant(ast::ExprConstant { value: false.into(), kind: None, range: (location..end_location).into() }), - "None" => ast::Expr::Constant(ast::ExprConstant { value: ast::Constant::None, kind: None, range: (location..end_location).into() }), - "..." => ast::Expr::Constant(ast::ExprConstant { value: ast::Constant::Ellipsis, kind: None, range: (location..end_location).into() }), + "{" "}" => ast::ExprSetComp { + elt: Box::new(elt.into()), + generators, + range: (location..end_location).into(), + }.into(), + "True" => ast::ExprConstant { value: true.into(), kind: None, range: (location..end_location).into() }.into(), + "False" => ast::ExprConstant { value: false.into(), kind: None, range: (location..end_location).into() }.into(), + "None" => ast::ExprConstant { value: ast::Constant::None, kind: None, range: (location..end_location).into() }.into(), + "..." => ast::ExprConstant { value: ast::Constant::Ellipsis, kind: None, range: (location..end_location).into() }.into(), }; -ListLiteralValues: Vec = { +ListLiteralValues: Vec = { > ","? => e, }; -DictLiteralValues: Vec<(Option>, ast::Expr)> = { +DictLiteralValues: Vec<(Option>, ast::ParenthesizedExpr)> = { > ","? => elements, }; -DictEntry: (ast::Expr, ast::Expr) = { +DictEntry: (ast::ParenthesizedExpr, ast::ParenthesizedExpr) = { > ":" > => (e1, e2), }; -DictElement: (Option>, ast::Expr) = { +DictElement: (Option>, ast::ParenthesizedExpr) = { => (Some(Box::new(e.0)), e.1), "**" > => (None, e), }; -SetLiteralValues: Vec = { +SetLiteralValues: Vec = { > ","? => e1 }; -ExpressionOrStarExpression = { +ExpressionOrStarExpression: ast::ParenthesizedExpr = { Expression<"all">, StarExpr }; -ExpressionList: ast::Expr = { +ExpressionList: ast::ParenthesizedExpr = { GenericList }; -ExpressionList2: Vec = { +ExpressionList2: Vec = { > ","? => elements, }; @@ -1654,27 +1716,31 @@ ExpressionList2: Vec = { // - a single expression // - a single expression followed by a trailing comma #[inline] -TestList: ast::Expr = { +TestList: ast::ParenthesizedExpr = { GenericList }; -GenericList: ast::Expr = { +GenericList: ast::ParenthesizedExpr = { > => { if elts.len() == 1 && trailing_comma.is_none() { - elts.into_iter().next().unwrap() + ast::ParenthesizedExpr { + expr: elts.into_iter().next().unwrap().into(), + range: (location..end_location).into(), + } } else { - ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into() } } } // Test -StarExpr: ast::Expr = { - "*" > => ast::Expr::Starred( - ast::ExprStarred { value: Box::new(e), ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - ) +StarExpr: ast::ParenthesizedExpr = { + "*" > => ast::ExprStarred { + value: Box::new(value.into()), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into(), }; // Comprehensions: @@ -1683,9 +1749,10 @@ CompFor: Vec = => c; SingleForComprehension: ast::Comprehension = { "for" "in" > => { let is_async = is_async.is_some(); + let ifs = ifs.into_iter().map(ast::Expr::from).collect(); ast::Comprehension { - target: set_context(target, ast::ExprContext::Store), - iter, + target: set_context(target.into(), ast::ExprContext::Store), + iter: iter.into(), ifs, is_async, range: (location..end_location).into() @@ -1693,8 +1760,8 @@ SingleForComprehension: ast::Comprehension = { } }; -ExpressionNoCond: ast::Expr = OrTest<"all">; -ComprehensionIf: ast::Expr = "if" => c; +ExpressionNoCond: ast::ParenthesizedExpr = OrTest<"all">; +ComprehensionIf: ast::ParenthesizedExpr = "if" => c; Arguments: ast::Arguments = { "(" > ")" =>? { @@ -1708,27 +1775,27 @@ Arguments: ast::Arguments = { }; FunctionArgument: (Option<(TextSize, TextSize, Option)>, ast::Expr) = { - => { - let expr = match c { - Some(c) => ast::Expr::GeneratorExp( + => { + let expr = match generators { + Some(generators) => ast::Expr::GeneratorExp( ast::ExprGeneratorExp { - elt: Box::new(e), - generators: c, + elt: Box::new(elt.into()), + generators, range: (location..end_location).into() } ), - None => e, + None => elt.into(), }; (None, expr) }, - "=" > => (Some((location, end_location, Some(i))), e), - "*" > => { - let expr = ast::Expr::Starred( - ast::ExprStarred { value: Box::new(e), ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - ); + "=" > => (Some((location, end_location, Some(i))), e.into()), + "*" > => { + let expr = ast::Expr::Starred(ast::ExprStarred { + value: Box::new(value.into()), ctx: ast::ExprContext::Load, range: (location..end_location).into(), + }); (None, expr) }, - "**" > => (Some((location, end_location, None)), e), + "**" > => (Some((location, end_location, None)), e.into()), }; /// Comma separated sequence that allows an optional trailing comma. diff --git a/crates/ruff_python_parser/src/python.rs b/crates/ruff_python_parser/src/python.rs index 1e0d84f9fe..839a7f4bf5 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: 775b210bb49d67488594b3367cf46ced8b5d43213ea80fa21d2d4b96b5bece3d +// sha3: 881894e86e83fb2796a9e4c17985d838c69f27db7808ddcdc24f35fd9aa742a2 use num_bigint::BigInt; use ruff_text_size::{Ranged, TextSize}; use ruff_python_ast::{self as ast, IpyEscapeKind}; @@ -59,9 +59,9 @@ mod __parse__Top { Variant11(alloc::vec::Vec), Variant12((Option>, Vec, Option>)), Variant13(core::option::Option<(Option>, Vec, Option>)>), - Variant14(ast::Expr), - Variant15(core::option::Option), - Variant16(alloc::vec::Vec), + Variant14(ast::ParenthesizedExpr), + Variant15(core::option::Option), + Variant16(alloc::vec::Vec), Variant17(ast::WithItem), Variant18(alloc::vec::Vec), Variant19((token::Tok, ast::Identifier)), @@ -71,75 +71,77 @@ mod __parse__Top { Variant23(core::option::Option), Variant24(ast::Suite), Variant25(core::option::Option), - Variant26((TextSize, ast::Expr, ast::Suite)), - Variant27(alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>), + Variant26((TextSize, ast::ParenthesizedExpr, ast::Suite)), + Variant27(alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>), Variant28((TextSize, ast::Suite)), Variant29(core::option::Option<(TextSize, ast::Suite)>), Variant30((Option<(TextSize, TextSize, Option)>, ast::Expr)), Variant31(alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>), - Variant32(Vec), - Variant33(core::option::Option>), + Variant32(Vec), + Variant33(core::option::Option>), Variant34(ast::Pattern), Variant35(alloc::vec::Vec), Variant36(ast::Stmt), Variant37(alloc::vec::Vec), - Variant38((ast::Expr, ast::Identifier)), + Variant38((ast::ParenthesizedExpr, ast::Identifier)), Variant39(Vec), Variant40(core::option::Option>), Variant41((TextSize, (String, StringKind, bool), TextSize)), Variant42(alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>), - Variant43((ast::CmpOp, ast::Expr)), - Variant44(alloc::vec::Vec<(ast::CmpOp, ast::Expr)>), - Variant45(ast::Parameters), - Variant46(core::option::Option), - Variant47(TextSize), - Variant48(ast::Operator), - Variant49(ast::Arguments), - Variant50(core::option::Option), - Variant51(Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>), - Variant52(Vec), - Variant53(Vec), - Variant54(core::option::Option>), - Variant55(ast::CmpOp), - Variant56(ast::Constant), - Variant57(ast::Decorator), - Variant58(alloc::vec::Vec), - Variant59((Option>, ast::Expr)), - Variant60((ast::Expr, ast::Expr)), - Variant61(Vec<(Option>, ast::Expr)>), - Variant62(core::option::Option>, ast::Expr)>>), - Variant63(ast::Parameter), - Variant64(core::option::Option), - Variant65(ast::ExceptHandler), - Variant66(alloc::vec::Vec), - Variant67(core::option::Option<(Option<(TextSize, TextSize, Option)>, ast::Expr)>), - Variant68(ast::Alias), - Variant69(Vec), - Variant70(ast::Int), - Variant71(alloc::vec::Vec), - Variant72((Option, Option)), - Variant73(ast::MatchCase), - Variant74(alloc::vec::Vec), - Variant75(ast::PatternKeyword), - Variant76((ast::Expr, ast::Pattern)), - Variant77(Vec), - Variant78(Vec), - Variant79(Vec<(ast::Expr, ast::Pattern)>), - Variant80(Vec), - Variant81(Vec), - Variant82((Vec, Vec)), - Variant83(core::option::Option), - Variant84(ast::PatternArguments), - Variant85(ast::Comprehension), - Variant86(alloc::vec::Vec), - Variant87(Option), - Variant88(core::option::Option>), - Variant89(Vec), - Variant90(ast::Mod), - Variant91(ast::TypeParam), - Variant92(ast::TypeParams), - Variant93(core::option::Option), - Variant94(ast::UnaryOp), + Variant43((ast::CmpOp, ast::ParenthesizedExpr)), + Variant44(alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>), + Variant45(ast::Expr), + Variant46(core::option::Option), + Variant47(ast::Parameters), + Variant48(core::option::Option), + Variant49(TextSize), + Variant50(ast::Operator), + Variant51(ast::Arguments), + Variant52(core::option::Option), + Variant53(Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>), + Variant54(Vec), + Variant55(Vec), + Variant56(core::option::Option>), + Variant57(ast::CmpOp), + Variant58(ast::Constant), + Variant59(ast::Decorator), + Variant60(alloc::vec::Vec), + Variant61((Option>, ast::ParenthesizedExpr)), + Variant62((ast::ParenthesizedExpr, ast::ParenthesizedExpr)), + Variant63(Vec<(Option>, ast::ParenthesizedExpr)>), + Variant64(core::option::Option>, ast::ParenthesizedExpr)>>), + Variant65(ast::Parameter), + Variant66(core::option::Option), + Variant67(ast::ExceptHandler), + Variant68(alloc::vec::Vec), + Variant69(core::option::Option<(Option<(TextSize, TextSize, Option)>, ast::Expr)>), + Variant70(ast::Alias), + Variant71(Vec), + Variant72(ast::Int), + Variant73(alloc::vec::Vec), + Variant74((Option, Option)), + Variant75(ast::MatchCase), + Variant76(alloc::vec::Vec), + Variant77(ast::PatternKeyword), + Variant78((ast::Expr, ast::Pattern)), + Variant79(Vec), + Variant80(Vec), + Variant81(Vec<(ast::Expr, ast::Pattern)>), + Variant82(Vec), + Variant83(Vec), + Variant84((Vec, Vec)), + Variant85(core::option::Option), + Variant86(ast::PatternArguments), + Variant87(ast::Comprehension), + Variant88(alloc::vec::Vec), + Variant89(Option), + Variant90(core::option::Option>), + Variant91(Vec), + Variant92(ast::Mod), + Variant93(ast::TypeParam), + Variant94(ast::TypeParams), + Variant95(core::option::Option), + Variant96(ast::UnaryOp), } const __ACTION: &[i16] = &[ // State 0 @@ -861,7 +863,7 @@ mod __parse__Top { // State 358 0, 0, 0, 0, 0, 0, 325, 0, 326, 0, 0, 0, 0, 0, 0, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 967, 968, 969, 328, 1080, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 329, 0, 0, 0, 0, 0, 0, 0, 0, 415, 416, 417, 0, 418, 419, // State 359 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 424, 0, 0, 425, 0, 0, 0, 0, 0, 0, 0, 0, -456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 424, 0, 0, 425, 0, 0, 0, 0, 0, 0, 0, 0, -457, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 360 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 418, 0, // State 361 @@ -2181,7 +2183,7 @@ mod __parse__Top { // State 1018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 422, // State 1019 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -457, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 1020 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 1021 @@ -2191,7 +2193,7 @@ mod __parse__Top { // State 1023 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 1024 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, 0, 0, -458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, 0, 0, -456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 1025 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1083, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 1026 @@ -11556,16 +11558,16 @@ mod __parse__Top { __reduce21(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 22 => { - // ("," >) = ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(937); + // ("," >) = ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(935); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action937::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action935::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11573,7 +11575,7 @@ mod __parse__Top { (5, 13) } 23 => { - // ("," >) = ",", "*", ",", KwargParameter => ActionFn(938); + // ("," >) = ",", "*", ",", KwargParameter => ActionFn(936); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -11581,7 +11583,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action938::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action936::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11589,17 +11591,17 @@ mod __parse__Top { (4, 13) } 24 => { - // ("," >) = ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(939); + // ("," >) = ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(937); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant8(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action939::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action937::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11607,7 +11609,7 @@ mod __parse__Top { (6, 13) } 25 => { - // ("," >) = ",", "*", ("," >)+, ",", KwargParameter => ActionFn(940); + // ("," >) = ",", "*", ("," >)+, ",", KwargParameter => ActionFn(938); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -11616,7 +11618,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action940::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action938::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11624,14 +11626,14 @@ mod __parse__Top { (5, 13) } 26 => { - // ("," >) = ",", "*", StarTypedParameter => ActionFn(941); + // ("," >) = ",", "*", StarTypedParameter => ActionFn(939); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action941::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action939::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11639,13 +11641,13 @@ mod __parse__Top { (3, 13) } 27 => { - // ("," >) = ",", "*" => ActionFn(942); + // ("," >) = ",", "*" => ActionFn(940); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action942::<>(mode, __sym0, __sym1) { + let __nt = match super::__action940::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11653,15 +11655,15 @@ mod __parse__Top { (2, 13) } 28 => { - // ("," >) = ",", "*", StarTypedParameter, ("," >)+ => ActionFn(943); + // ("," >) = ",", "*", StarTypedParameter, ("," >)+ => ActionFn(941); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action943::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action941::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11669,14 +11671,14 @@ mod __parse__Top { (4, 13) } 29 => { - // ("," >) = ",", "*", ("," >)+ => ActionFn(944); + // ("," >) = ",", "*", ("," >)+ => ActionFn(942); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant11(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action944::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action942::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11684,16 +11686,16 @@ mod __parse__Top { (3, 13) } 30 => { - // ("," >)? = ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(961); + // ("," >)? = ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(959); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action961::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action959::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11701,7 +11703,7 @@ mod __parse__Top { (5, 14) } 31 => { - // ("," >)? = ",", "*", ",", KwargParameter => ActionFn(962); + // ("," >)? = ",", "*", ",", KwargParameter => ActionFn(960); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -11709,7 +11711,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action962::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action960::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11717,17 +11719,17 @@ mod __parse__Top { (4, 14) } 32 => { - // ("," >)? = ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(963); + // ("," >)? = ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(961); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant8(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action963::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action961::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11735,7 +11737,7 @@ mod __parse__Top { (6, 14) } 33 => { - // ("," >)? = ",", "*", ("," >)+, ",", KwargParameter => ActionFn(964); + // ("," >)? = ",", "*", ("," >)+, ",", KwargParameter => ActionFn(962); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -11744,7 +11746,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action964::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action962::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11752,14 +11754,14 @@ mod __parse__Top { (5, 14) } 34 => { - // ("," >)? = ",", "*", StarTypedParameter => ActionFn(965); + // ("," >)? = ",", "*", StarTypedParameter => ActionFn(963); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action965::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action963::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11767,13 +11769,13 @@ mod __parse__Top { (3, 14) } 35 => { - // ("," >)? = ",", "*" => ActionFn(966); + // ("," >)? = ",", "*" => ActionFn(964); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action966::<>(mode, __sym0, __sym1) { + let __nt = match super::__action964::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11781,15 +11783,15 @@ mod __parse__Top { (2, 14) } 36 => { - // ("," >)? = ",", "*", StarTypedParameter, ("," >)+ => ActionFn(967); + // ("," >)? = ",", "*", StarTypedParameter, ("," >)+ => ActionFn(965); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action967::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action965::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11797,14 +11799,14 @@ mod __parse__Top { (4, 14) } 37 => { - // ("," >)? = ",", "*", ("," >)+ => ActionFn(968); + // ("," >)? = ",", "*", ("," >)+ => ActionFn(966); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant11(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action968::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action966::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11815,16 +11817,16 @@ mod __parse__Top { __reduce38(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 39 => { - // ("," >) = ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(997); + // ("," >) = ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(995); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action997::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action995::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11832,7 +11834,7 @@ mod __parse__Top { (5, 15) } 40 => { - // ("," >) = ",", "*", ",", KwargParameter => ActionFn(998); + // ("," >) = ",", "*", ",", KwargParameter => ActionFn(996); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -11840,7 +11842,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action998::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action996::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11848,17 +11850,17 @@ mod __parse__Top { (4, 15) } 41 => { - // ("," >) = ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(999); + // ("," >) = ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(997); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant8(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action999::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action997::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11866,7 +11868,7 @@ mod __parse__Top { (6, 15) } 42 => { - // ("," >) = ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1000); + // ("," >) = ",", "*", ("," >)+, ",", KwargParameter => ActionFn(998); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -11875,7 +11877,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1000::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action998::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11883,14 +11885,14 @@ mod __parse__Top { (5, 15) } 43 => { - // ("," >) = ",", "*", StarUntypedParameter => ActionFn(1001); + // ("," >) = ",", "*", StarUntypedParameter => ActionFn(999); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1001::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action999::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11898,13 +11900,13 @@ mod __parse__Top { (3, 15) } 44 => { - // ("," >) = ",", "*" => ActionFn(1002); + // ("," >) = ",", "*" => ActionFn(1000); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1002::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1000::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11912,15 +11914,15 @@ mod __parse__Top { (2, 15) } 45 => { - // ("," >) = ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1003); + // ("," >) = ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1001); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1003::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1001::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11928,14 +11930,14 @@ mod __parse__Top { (4, 15) } 46 => { - // ("," >) = ",", "*", ("," >)+ => ActionFn(1004); + // ("," >) = ",", "*", ("," >)+ => ActionFn(1002); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant11(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1004::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1002::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11943,16 +11945,16 @@ mod __parse__Top { (3, 15) } 47 => { - // ("," >)? = ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1021); + // ("," >)? = ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1019); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1021::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1019::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11960,7 +11962,7 @@ mod __parse__Top { (5, 16) } 48 => { - // ("," >)? = ",", "*", ",", KwargParameter => ActionFn(1022); + // ("," >)? = ",", "*", ",", KwargParameter => ActionFn(1020); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -11968,7 +11970,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1022::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1020::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11976,17 +11978,17 @@ mod __parse__Top { (4, 16) } 49 => { - // ("," >)? = ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1023); + // ("," >)? = ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1021); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant8(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1023::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1021::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11994,7 +11996,7 @@ mod __parse__Top { (6, 16) } 50 => { - // ("," >)? = ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1024); + // ("," >)? = ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1022); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -12003,7 +12005,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1024::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1022::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12011,14 +12013,14 @@ mod __parse__Top { (5, 16) } 51 => { - // ("," >)? = ",", "*", StarUntypedParameter => ActionFn(1025); + // ("," >)? = ",", "*", StarUntypedParameter => ActionFn(1023); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1025::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1023::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12026,13 +12028,13 @@ mod __parse__Top { (3, 16) } 52 => { - // ("," >)? = ",", "*" => ActionFn(1026); + // ("," >)? = ",", "*" => ActionFn(1024); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1026::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1024::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12040,15 +12042,15 @@ mod __parse__Top { (2, 16) } 53 => { - // ("," >)? = ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1027); + // ("," >)? = ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1025); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant63(__symbols); + let __sym2 = __pop_Variant65(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1027::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1025::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12056,14 +12058,14 @@ mod __parse__Top { (4, 16) } 54 => { - // ("," >)? = ",", "*", ("," >)+ => ActionFn(1028); + // ("," >)? = ",", "*", ("," >)+ => ActionFn(1026); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant11(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1028::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1026::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12392,36 +12394,36 @@ mod __parse__Top { __reduce161(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 162 => { - // Arguments = "(", FunctionArgument, ")" => ActionFn(1502); + // Arguments = "(", FunctionArgument, ")" => ActionFn(1498); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant30(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1502::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1498::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant49(__nt), __end)); + __symbols.push((__start, __Symbol::Variant51(__nt), __end)); (3, 85) } 163 => { - // Arguments = "(", ")" => ActionFn(1503); + // Arguments = "(", ")" => ActionFn(1499); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1503::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1499::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant49(__nt), __end)); + __symbols.push((__start, __Symbol::Variant51(__nt), __end)); (2, 85) } 164 => { - // Arguments = "(", ( ",")+, FunctionArgument, ")" => ActionFn(1504); + // Arguments = "(", ( ",")+, FunctionArgument, ")" => ActionFn(1500); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant30(__symbols); @@ -12429,26 +12431,26 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1504::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1500::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant49(__nt), __end)); + __symbols.push((__start, __Symbol::Variant51(__nt), __end)); (4, 85) } 165 => { - // Arguments = "(", ( ",")+, ")" => ActionFn(1505); + // Arguments = "(", ( ",")+, ")" => ActionFn(1501); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant31(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1505::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1501::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant49(__nt), __end)); + __symbols.push((__start, __Symbol::Variant51(__nt), __end)); (3, 85) } 166 => { @@ -12470,14 +12472,14 @@ mod __parse__Top { __reduce171(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 172 => { - // AsPattern = OrPattern, "as", Identifier => ActionFn(1185); + // AsPattern = OrPattern, "as", Identifier => ActionFn(1195); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant34(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1185::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1195::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12548,7 +12550,7 @@ mod __parse__Top { __reduce190(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 191 => { - // Atom<"all"> = "(", OneOrMore>, ",", NamedOrStarExpr, ",", ")" => ActionFn(1194); + // Atom<"all"> = "(", OneOrMore>, ",", NamedOrStarExpr, ",", ")" => ActionFn(1204); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -12558,7 +12560,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1194::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1204::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12566,7 +12568,7 @@ mod __parse__Top { (6, 95) } 192 => { - // Atom<"all"> = "(", NamedOrStarExpr, ",", ")" => ActionFn(1195); + // Atom<"all"> = "(", NamedOrStarExpr, ",", ")" => ActionFn(1205); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -12574,7 +12576,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1195::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1205::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12582,7 +12584,7 @@ mod __parse__Top { (4, 95) } 193 => { - // Atom<"all"> = "(", OneOrMore>, ",", NamedOrStarExpr, ("," )+, ",", ")" => ActionFn(1196); + // Atom<"all"> = "(", OneOrMore>, ",", NamedOrStarExpr, ("," )+, ",", ")" => ActionFn(1206); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -12593,7 +12595,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1196::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1206::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12601,7 +12603,7 @@ mod __parse__Top { (7, 95) } 194 => { - // Atom<"all"> = "(", NamedOrStarExpr, ("," )+, ",", ")" => ActionFn(1197); + // Atom<"all"> = "(", NamedOrStarExpr, ("," )+, ",", ")" => ActionFn(1207); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -12610,7 +12612,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1197::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1207::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12618,7 +12620,7 @@ mod __parse__Top { (5, 95) } 195 => { - // Atom<"all"> = "(", OneOrMore>, ",", NamedOrStarExpr, ")" => ActionFn(1198); + // Atom<"all"> = "(", OneOrMore>, ",", NamedOrStarExpr, ")" => ActionFn(1208); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant14(__symbols); @@ -12627,7 +12629,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1198::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1208::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12635,14 +12637,14 @@ mod __parse__Top { (5, 95) } 196 => { - // Atom<"all"> = "(", NamedOrStarExpr, ")" => ActionFn(1199); + // Atom<"all"> = "(", NamedOrStarExpr, ")" => ActionFn(1209); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1199::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1209::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12650,7 +12652,7 @@ mod __parse__Top { (3, 95) } 197 => { - // Atom<"all"> = "(", OneOrMore>, ",", NamedOrStarExpr, ("," )+, ")" => ActionFn(1200); + // Atom<"all"> = "(", OneOrMore>, ",", NamedOrStarExpr, ("," )+, ")" => ActionFn(1210); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant16(__symbols); @@ -12660,7 +12662,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1200::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1210::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12668,7 +12670,7 @@ mod __parse__Top { (6, 95) } 198 => { - // Atom<"all"> = "(", NamedOrStarExpr, ("," )+, ")" => ActionFn(1201); + // Atom<"all"> = "(", NamedOrStarExpr, ("," )+, ")" => ActionFn(1211); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant16(__symbols); @@ -12676,7 +12678,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1201::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1211::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12693,7 +12695,7 @@ mod __parse__Top { __reduce201(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 202 => { - // Atom<"all"> = "(", "**", Expression<"all">, ")" => ActionFn(1204); + // Atom<"all"> = "(", "**", Expression<"all">, ")" => ActionFn(1215); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant14(__symbols); @@ -12701,7 +12703,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1204::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1215::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12736,11 +12738,11 @@ mod __parse__Top { __reduce211(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 212 => { - // Atom<"no-withitems"> = (@L string @R)+ => ActionFn(728); + // Atom<"no-withitems"> = (@L string @R)+ => ActionFn(729); let __sym0 = __pop_Variant42(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action728::<>(mode, __sym0) { + let __nt = match super::__action729::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12763,7 +12765,7 @@ mod __parse__Top { __reduce217(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 218 => { - // Atom<"no-withitems"> = "(", OneOrMore>, ",", NamedOrStarExpr, ",", ")" => ActionFn(1217); + // Atom<"no-withitems"> = "(", OneOrMore>, ",", NamedOrStarExpr, ",", ")" => ActionFn(1228); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -12773,7 +12775,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1217::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1228::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12781,7 +12783,7 @@ mod __parse__Top { (6, 96) } 219 => { - // Atom<"no-withitems"> = "(", NamedOrStarExpr, ",", ")" => ActionFn(1218); + // Atom<"no-withitems"> = "(", NamedOrStarExpr, ",", ")" => ActionFn(1229); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -12789,7 +12791,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1218::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1229::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12797,7 +12799,7 @@ mod __parse__Top { (4, 96) } 220 => { - // Atom<"no-withitems"> = "(", OneOrMore>, ",", NamedOrStarExpr, ("," )+, ",", ")" => ActionFn(1219); + // Atom<"no-withitems"> = "(", OneOrMore>, ",", NamedOrStarExpr, ("," )+, ",", ")" => ActionFn(1230); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -12808,7 +12810,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1219::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1230::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12816,7 +12818,7 @@ mod __parse__Top { (7, 96) } 221 => { - // Atom<"no-withitems"> = "(", NamedOrStarExpr, ("," )+, ",", ")" => ActionFn(1220); + // Atom<"no-withitems"> = "(", NamedOrStarExpr, ("," )+, ",", ")" => ActionFn(1231); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -12825,7 +12827,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1220::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1231::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12833,7 +12835,7 @@ mod __parse__Top { (5, 96) } 222 => { - // Atom<"no-withitems"> = "(", OneOrMore>, ",", NamedOrStarExpr, ")" => ActionFn(1221); + // Atom<"no-withitems"> = "(", OneOrMore>, ",", NamedOrStarExpr, ")" => ActionFn(1232); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant14(__symbols); @@ -12842,7 +12844,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1221::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1232::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12850,14 +12852,14 @@ mod __parse__Top { (5, 96) } 223 => { - // Atom<"no-withitems"> = "(", NamedOrStarExpr, ")" => ActionFn(1222); + // Atom<"no-withitems"> = "(", NamedOrStarExpr, ")" => ActionFn(1233); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1222::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1233::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12865,7 +12867,7 @@ mod __parse__Top { (3, 96) } 224 => { - // Atom<"no-withitems"> = "(", OneOrMore>, ",", NamedOrStarExpr, ("," )+, ")" => ActionFn(1223); + // Atom<"no-withitems"> = "(", OneOrMore>, ",", NamedOrStarExpr, ("," )+, ")" => ActionFn(1234); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant16(__symbols); @@ -12875,7 +12877,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1223::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1234::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12883,7 +12885,7 @@ mod __parse__Top { (6, 96) } 225 => { - // Atom<"no-withitems"> = "(", NamedOrStarExpr, ("," )+, ")" => ActionFn(1224); + // Atom<"no-withitems"> = "(", NamedOrStarExpr, ("," )+, ")" => ActionFn(1235); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant16(__symbols); @@ -12891,7 +12893,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1224::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1235::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12908,7 +12910,7 @@ mod __parse__Top { __reduce228(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 229 => { - // Atom<"no-withitems"> = "(", "**", Expression<"all">, ")" => ActionFn(1227); + // Atom<"no-withitems"> = "(", "**", Expression<"all">, ")" => ActionFn(1239); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant14(__symbols); @@ -12916,7 +12918,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1227::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1239::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13542,11 +13544,11 @@ mod __parse__Top { __reduce435(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 436 => { - // IpyEscapeCommandExpr = ipy_escape_command => ActionFn(1288); + // IpyEscapeCommandExpr = ipy_escape_command => ActionFn(1300); let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1288::<>(mode, __sym0) { + let __nt = match super::__action1300::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13554,11 +13556,11 @@ mod __parse__Top { (1, 163) } 437 => { - // IpyEscapeCommandStatement = ipy_escape_command => ActionFn(1289); + // IpyEscapeCommandStatement = ipy_escape_command => ActionFn(1301); let __sym0 = __pop_Variant4(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1289::<>(mode, __sym0) { + let __nt = match super::__action1301::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13566,13 +13568,13 @@ mod __parse__Top { (1, 164) } 438 => { - // IpyHelpEndEscapeCommandStatement = Expression<"all">, ("?")+ => ActionFn(1290); + // IpyHelpEndEscapeCommandStatement = Expression<"all">, ("?")+ => ActionFn(1302); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant21(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1290::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1302::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13592,15 +13594,15 @@ mod __parse__Top { __reduce442(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 443 => { - // LambdaDef = "lambda", ParameterList, ":", Test<"all"> => ActionFn(1672); + // LambdaDef = "lambda", ParameterList, ":", Test<"all"> => ActionFn(1668); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant14(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant45(__symbols); + let __sym1 = __pop_Variant47(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1672::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1668::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13608,14 +13610,14 @@ mod __parse__Top { (4, 168) } 444 => { - // LambdaDef = "lambda", ":", Test<"all"> => ActionFn(1673); + // LambdaDef = "lambda", ":", Test<"all"> => ActionFn(1669); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1673::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1669::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13650,11 +13652,11 @@ mod __parse__Top { __reduce453(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 454 => { - // LiteralPattern = (@L string @R)+ => ActionFn(1297); + // LiteralPattern = (@L string @R)+ => ActionFn(1309); let __sym0 = __pop_Variant42(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1297::<>(mode, __sym0) { + let __nt = match super::__action1309::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13680,15 +13682,15 @@ mod __parse__Top { __reduce460(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 461 => { - // MappingKey = (@L string @R)+ => ActionFn(818); + // MappingKey = (@L string @R)+ => ActionFn(820); let __sym0 = __pop_Variant42(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action818::<>(mode, __sym0) { + let __nt = match super::__action820::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 172) } 462 => { @@ -13944,955 +13946,955 @@ mod __parse__Top { __reduce545(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 546 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1552); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1548); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant8(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1552::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1548::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 210) } 547 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1553); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1549); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant8(__symbols); let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1549::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 210) + } + 548 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1550); + assert!(__symbols.len() >= 10); + let __sym9 = __pop_Variant0(__symbols); + let __sym8 = __pop_Variant8(__symbols); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym9.2; + let __nt = match super::__action1550::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (10, 210) + } + 549 => { + // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter, "," => ActionFn(1551); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant8(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym5.2; + let __nt = match super::__action1551::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (6, 210) + } + 550 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter, "," => ActionFn(1552); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant8(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym7.2; + let __nt = match super::__action1552::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 210) + } + 551 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter, "," => ActionFn(1553); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym8.2; let __nt = match super::__action1553::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 210) - } - 548 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1554); - assert!(__symbols.len() >= 10); - let __sym9 = __pop_Variant0(__symbols); - let __sym8 = __pop_Variant8(__symbols); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym9.2; - let __nt = match super::__action1554::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (10, 210) - } - 549 => { - // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter, "," => ActionFn(1555); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant8(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym5.2; - let __nt = match super::__action1555::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (6, 210) - } - 550 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter, "," => ActionFn(1556); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant8(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1556::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 210) - } - 551 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter, "," => ActionFn(1557); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1557::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (9, 210) } 552 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1558); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1554); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant8(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant11(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1558::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1554::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (8, 210) } 553 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1559); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1555); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant0(__symbols); let __sym8 = __pop_Variant8(__symbols); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym9.2; + let __nt = match super::__action1555::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (10, 210) + } + 554 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1556); + assert!(__symbols.len() >= 11); + let __sym10 = __pop_Variant0(__symbols); + let __sym9 = __pop_Variant8(__symbols); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant11(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym10.2; + let __nt = match super::__action1556::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9, __sym10) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (11, 210) + } + 555 => { + // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1557); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant8(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym6.2; + let __nt = match super::__action1557::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (7, 210) + } + 556 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1558); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant11(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1558::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 210) + } + 557 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1559); + assert!(__symbols.len() >= 10); + let __sym9 = __pop_Variant0(__symbols); + let __sym8 = __pop_Variant8(__symbols); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant11(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym9.2; let __nt = match super::__action1559::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (10, 210) } - 554 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1560); - assert!(__symbols.len() >= 11); - let __sym10 = __pop_Variant0(__symbols); - let __sym9 = __pop_Variant8(__symbols); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant11(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); + 558 => { + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, "," => ActionFn(1560); + assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym10.2; - let __nt = match super::__action1560::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9, __sym10) { + let __end = __sym4.2; + let __nt = match super::__action1560::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (11, 210) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (5, 210) } - 555 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1561); + 559 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, "," => ActionFn(1561); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant8(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); + let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; let __nt = match super::__action1561::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 210) } - 556 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1562); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant11(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1562::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 210) - } - 557 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1563); - assert!(__symbols.len() >= 10); - let __sym9 = __pop_Variant0(__symbols); - let __sym8 = __pop_Variant8(__symbols); + 560 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, "," => ActionFn(1562); + assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant11(__symbols); + let __sym6 = __pop_Variant65(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym9.2; - let __nt = match super::__action1563::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __end = __sym7.2; + let __nt = match super::__action1562::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (10, 210) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 210) } - 558 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, "," => ActionFn(1564); - assert!(__symbols.len() >= 5); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant63(__symbols); + 561 => { + // ParameterList = OneOrMore>, ",", "*", "," => ActionFn(1563); + assert!(__symbols.len() >= 4); + let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym4.2; - let __nt = match super::__action1564::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __end = __sym3.2; + let __nt = match super::__action1563::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (5, 210) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (4, 210) } - 559 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, "," => ActionFn(1565); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant63(__symbols); + 562 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", "," => ActionFn(1564); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym5.2; + let __nt = match super::__action1564::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (6, 210) + } + 563 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", "," => ActionFn(1565); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; let __nt = match super::__action1565::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (7, 210) - } - 560 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, "," => ActionFn(1566); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1566::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 210) - } - 561 => { - // ParameterList = OneOrMore>, ",", "*", "," => ActionFn(1567); - assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym3.2; - let __nt = match super::__action1567::<>(mode, __sym0, __sym1, __sym2, __sym3) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (4, 210) - } - 562 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", "," => ActionFn(1568); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym5.2; - let __nt = match super::__action1568::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (6, 210) - } - 563 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", "," => ActionFn(1569); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = match super::__action1569::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 210) } 564 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1570); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1566); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant11(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1570::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1566::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 210) } 565 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1571); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1567); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym7.2; + let __nt = match super::__action1567::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 210) + } + 566 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1568); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant11(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1568::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 210) + } + 567 => { + // ParameterList = OneOrMore>, ",", "*", ("," >)+, "," => ActionFn(1569); + assert!(__symbols.len() >= 5); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym4.2; + let __nt = match super::__action1569::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (5, 210) + } + 568 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, "," => ActionFn(1570); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant11(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym6.2; + let __nt = match super::__action1570::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (7, 210) + } + 569 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, "," => ActionFn(1571); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant11(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym7.2; let __nt = match super::__action1571::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 210) - } - 566 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1572); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant11(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1572::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 210) - } - 567 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, "," => ActionFn(1573); - assert!(__symbols.len() >= 5); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym4.2; - let __nt = match super::__action1573::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (5, 210) - } - 568 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, "," => ActionFn(1574); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant11(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = match super::__action1574::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (7, 210) - } - 569 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, "," => ActionFn(1575); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1575::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (8, 210) } 570 => { - // ParameterList = OneOrMore>, "," => ActionFn(1576); + // ParameterList = OneOrMore>, "," => ActionFn(1572); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1576::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1572::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 210) } 571 => { - // ParameterList = OneOrMore>, ",", "/", "," => ActionFn(1577); + // ParameterList = OneOrMore>, ",", "/", "," => ActionFn(1573); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1577::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1573::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 210) } 572 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, "," => ActionFn(1578); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, "," => ActionFn(1574); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym4.2; + let __nt = match super::__action1574::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (5, 210) + } + 573 => { + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1575); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant8(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant65(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym5.2; + let __nt = match super::__action1575::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (6, 210) + } + 574 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1576); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant65(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym7.2; + let __nt = match super::__action1576::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 210) + } + 575 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1577); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant8(__symbols); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1577::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 210) + } + 576 => { + // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter => ActionFn(1578); + assert!(__symbols.len() >= 5); + let __sym4 = __pop_Variant8(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym4.2; let __nt = match super::__action1578::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 210) } - 573 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1579); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant8(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant63(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym5.2; - let __nt = match super::__action1579::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (6, 210) - } - 574 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1580); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant63(__symbols); + 577 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter => ActionFn(1579); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant8(__symbols); + let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym6.2; + let __nt = match super::__action1579::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (7, 210) + } + 578 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter => ActionFn(1580); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym7.2; let __nt = match super::__action1580::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 210) - } - 575 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1581); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant8(__symbols); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1581::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 210) - } - 576 => { - // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter => ActionFn(1582); - assert!(__symbols.len() >= 5); - let __sym4 = __pop_Variant8(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym4.2; - let __nt = match super::__action1582::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (5, 210) - } - 577 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter => ActionFn(1583); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant8(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = match super::__action1583::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (7, 210) - } - 578 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter => ActionFn(1584); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1584::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (8, 210) } 579 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1585); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1581); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant8(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant11(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1585::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1581::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 210) } 580 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1586); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1582); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant8(__symbols); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1582::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 210) + } + 581 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1583); + assert!(__symbols.len() >= 10); + let __sym9 = __pop_Variant8(__symbols); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant11(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym9.2; + let __nt = match super::__action1583::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (10, 210) + } + 582 => { + // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1584); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant8(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym5.2; + let __nt = match super::__action1584::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (6, 210) + } + 583 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1585); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant11(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym7.2; + let __nt = match super::__action1585::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 210) + } + 584 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1586); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant8(__symbols); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant11(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym8.2; let __nt = match super::__action1586::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (9, 210) } - 581 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1587); - assert!(__symbols.len() >= 10); - let __sym9 = __pop_Variant8(__symbols); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant11(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); + 585 => { + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter => ActionFn(1587); + assert!(__symbols.len() >= 4); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym9.2; - let __nt = match super::__action1587::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __end = __sym3.2; + let __nt = match super::__action1587::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (10, 210) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (4, 210) } - 582 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1588); + 586 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter => ActionFn(1588); assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant8(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); + let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; let __nt = match super::__action1588::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 210) } - 583 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1589); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant11(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1589::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 210) - } - 584 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1590); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant8(__symbols); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant11(__symbols); + 587 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter => ActionFn(1589); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant65(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1590::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __end = __sym6.2; + let __nt = match super::__action1589::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 210) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (7, 210) } - 585 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter => ActionFn(1591); - assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant63(__symbols); + 588 => { + // ParameterList = OneOrMore>, ",", "*" => ActionFn(1590); + assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym3.2; - let __nt = match super::__action1591::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __end = __sym2.2; + let __nt = match super::__action1590::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (4, 210) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (3, 210) } - 586 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter => ActionFn(1592); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant63(__symbols); + 589 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*" => ActionFn(1591); + assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym4.2; + let __nt = match super::__action1591::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (5, 210) + } + 590 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*" => ActionFn(1592); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; let __nt = match super::__action1592::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (6, 210) - } - 587 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter => ActionFn(1593); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = match super::__action1593::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (7, 210) - } - 588 => { - // ParameterList = OneOrMore>, ",", "*" => ActionFn(1594); - assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym2.2; - let __nt = match super::__action1594::<>(mode, __sym0, __sym1, __sym2) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (3, 210) - } - 589 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*" => ActionFn(1595); - assert!(__symbols.len() >= 5); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym4.2; - let __nt = match super::__action1595::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (5, 210) - } - 590 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*" => ActionFn(1596); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym5.2; - let __nt = match super::__action1596::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 210) } 591 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1597); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1593); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant11(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1597::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1593::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 210) } 592 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1598); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1594); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1598::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1594::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 210) } 593 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1599); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1595); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant11(__symbols); - let __sym6 = __pop_Variant63(__symbols); + let __sym6 = __pop_Variant65(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1599::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1595::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (8, 210) } 594 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+ => ActionFn(1600); + // ParameterList = OneOrMore>, ",", "*", ("," >)+ => ActionFn(1596); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1600::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1596::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 210) } 595 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+ => ActionFn(1601); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+ => ActionFn(1597); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant11(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1601::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1597::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 210) } 596 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+ => ActionFn(1602); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+ => ActionFn(1598); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant11(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -14900,95 +14902,95 @@ mod __parse__Top { let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1602::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1598::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 210) } 597 => { - // ParameterList = OneOrMore> => ActionFn(1603); - let __sym0 = __pop_Variant80(__symbols); + // ParameterList = OneOrMore> => ActionFn(1599); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1603::<>(mode, __sym0) { + let __nt = match super::__action1599::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (1, 210) } 598 => { - // ParameterList = OneOrMore>, ",", "/" => ActionFn(1604); + // ParameterList = OneOrMore>, ",", "/" => ActionFn(1600); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1604::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1600::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 210) } 599 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+ => ActionFn(1605); + // ParameterList = OneOrMore>, ",", "/", ("," >)+ => ActionFn(1601); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1605::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1601::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 210) } 600 => { - // ParameterList = OneOrMore>, ",", KwargParameter, "," => ActionFn(1606); + // ParameterList = OneOrMore>, ",", KwargParameter, "," => ActionFn(1602); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant8(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1606::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1602::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 210) } 601 => { - // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter, "," => ActionFn(1607); + // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter, "," => ActionFn(1603); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1607::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1603::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 210) } 602 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter, "," => ActionFn(1608); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter, "," => ActionFn(1604); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant8(__symbols); @@ -14996,85 +14998,85 @@ mod __parse__Top { let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1608::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1604::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 210) } 603 => { - // ParameterList = OneOrMore>, ",", KwargParameter => ActionFn(1609); + // ParameterList = OneOrMore>, ",", KwargParameter => ActionFn(1605); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant8(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1609::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1605::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 210) } 604 => { - // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter => ActionFn(1610); + // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter => ActionFn(1606); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1610::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1606::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 210) } 605 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter => ActionFn(1611); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter => ActionFn(1607); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant8(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1611::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1607::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 210) } 606 => { - // ParameterList = "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1342); + // ParameterList = "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1354); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1342::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1354::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 210) } 607 => { - // ParameterList = "*", ",", KwargParameter, "," => ActionFn(1343); + // ParameterList = "*", ",", KwargParameter, "," => ActionFn(1355); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant8(__symbols); @@ -15082,33 +15084,33 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1343::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1355::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 210) } 608 => { - // ParameterList = "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1344); + // ParameterList = "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1356); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1344::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1356::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 210) } 609 => { - // ParameterList = "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1345); + // ParameterList = "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1357); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant8(__symbols); @@ -15117,123 +15119,123 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1345::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1357::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 210) } 610 => { - // ParameterList = "*", StarTypedParameter, "," => ActionFn(1346); + // ParameterList = "*", StarTypedParameter, "," => ActionFn(1358); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1346::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1358::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 210) } 611 => { - // ParameterList = "*", "," => ActionFn(1347); + // ParameterList = "*", "," => ActionFn(1359); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1347::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1359::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 210) } 612 => { - // ParameterList = "*", StarTypedParameter, ("," >)+, "," => ActionFn(1348); + // ParameterList = "*", StarTypedParameter, ("," >)+, "," => ActionFn(1360); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1348::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1360::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 210) } 613 => { - // ParameterList = "*", ("," >)+, "," => ActionFn(1349); + // ParameterList = "*", ("," >)+, "," => ActionFn(1361); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant11(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1349::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1361::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 210) } 614 => { - // ParameterList = "*", StarTypedParameter, ",", KwargParameter => ActionFn(1350); + // ParameterList = "*", StarTypedParameter, ",", KwargParameter => ActionFn(1362); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1350::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1362::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 210) } 615 => { - // ParameterList = "*", ",", KwargParameter => ActionFn(1351); + // ParameterList = "*", ",", KwargParameter => ActionFn(1363); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant8(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1351::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1363::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 210) } 616 => { - // ParameterList = "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1352); + // ParameterList = "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1364); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1352::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1364::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 210) } 617 => { - // ParameterList = "*", ("," >)+, ",", KwargParameter => ActionFn(1353); + // ParameterList = "*", ("," >)+, ",", KwargParameter => ActionFn(1365); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -15241,66 +15243,66 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1353::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1365::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 210) } 618 => { - // ParameterList = "*", StarTypedParameter => ActionFn(1354); + // ParameterList = "*", StarTypedParameter => ActionFn(1366); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1354::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1366::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 210) } 619 => { - // ParameterList = "*" => ActionFn(1355); + // ParameterList = "*" => ActionFn(1367); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1355::<>(mode, __sym0) { + let __nt = match super::__action1367::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (1, 210) } 620 => { - // ParameterList = "*", StarTypedParameter, ("," >)+ => ActionFn(1356); + // ParameterList = "*", StarTypedParameter, ("," >)+ => ActionFn(1368); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1356::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1368::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 210) } 621 => { - // ParameterList = "*", ("," >)+ => ActionFn(1357); + // ParameterList = "*", ("," >)+ => ActionFn(1369); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant11(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1357::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1369::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 210) } 622 => { @@ -15310,955 +15312,955 @@ mod __parse__Top { __reduce623(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 624 => { - // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ",", KwargParameter, "," => ActionFn(1612); + // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ",", KwargParameter, "," => ActionFn(1608); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant8(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1612::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1608::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 211) } 625 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ",", KwargParameter, "," => ActionFn(1613); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ",", KwargParameter, "," => ActionFn(1609); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant8(__symbols); let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1609::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 211) + } + 626 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ",", KwargParameter, "," => ActionFn(1610); + assert!(__symbols.len() >= 10); + let __sym9 = __pop_Variant0(__symbols); + let __sym8 = __pop_Variant8(__symbols); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym9.2; + let __nt = match super::__action1610::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (10, 211) + } + 627 => { + // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter, "," => ActionFn(1611); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant8(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym5.2; + let __nt = match super::__action1611::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (6, 211) + } + 628 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter, "," => ActionFn(1612); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant8(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym7.2; + let __nt = match super::__action1612::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 211) + } + 629 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter, "," => ActionFn(1613); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym8.2; let __nt = match super::__action1613::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 211) - } - 626 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ",", KwargParameter, "," => ActionFn(1614); - assert!(__symbols.len() >= 10); - let __sym9 = __pop_Variant0(__symbols); - let __sym8 = __pop_Variant8(__symbols); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym9.2; - let __nt = match super::__action1614::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (10, 211) - } - 627 => { - // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter, "," => ActionFn(1615); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant8(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym5.2; - let __nt = match super::__action1615::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (6, 211) - } - 628 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter, "," => ActionFn(1616); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant8(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1616::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 211) - } - 629 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter, "," => ActionFn(1617); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1617::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (9, 211) } 630 => { - // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1618); + // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1614); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant8(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant11(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1618::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1614::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (8, 211) } 631 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1619); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1615); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant0(__symbols); let __sym8 = __pop_Variant8(__symbols); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym9.2; + let __nt = match super::__action1615::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (10, 211) + } + 632 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1616); + assert!(__symbols.len() >= 11); + let __sym10 = __pop_Variant0(__symbols); + let __sym9 = __pop_Variant8(__symbols); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant11(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym10.2; + let __nt = match super::__action1616::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9, __sym10) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (11, 211) + } + 633 => { + // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1617); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant8(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym6.2; + let __nt = match super::__action1617::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (7, 211) + } + 634 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1618); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant11(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1618::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 211) + } + 635 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1619); + assert!(__symbols.len() >= 10); + let __sym9 = __pop_Variant0(__symbols); + let __sym8 = __pop_Variant8(__symbols); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant11(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym9.2; let __nt = match super::__action1619::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (10, 211) } - 632 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1620); - assert!(__symbols.len() >= 11); - let __sym10 = __pop_Variant0(__symbols); - let __sym9 = __pop_Variant8(__symbols); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant11(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); + 636 => { + // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, "," => ActionFn(1620); + assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym10.2; - let __nt = match super::__action1620::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9, __sym10) { + let __end = __sym4.2; + let __nt = match super::__action1620::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (11, 211) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (5, 211) } - 633 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1621); + 637 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, "," => ActionFn(1621); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant8(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); + let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; let __nt = match super::__action1621::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 211) } - 634 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1622); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant11(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1622::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 211) - } - 635 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1623); - assert!(__symbols.len() >= 10); - let __sym9 = __pop_Variant0(__symbols); - let __sym8 = __pop_Variant8(__symbols); + 638 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, "," => ActionFn(1622); + assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant11(__symbols); + let __sym6 = __pop_Variant65(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym9.2; - let __nt = match super::__action1623::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __end = __sym7.2; + let __nt = match super::__action1622::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (10, 211) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 211) } - 636 => { - // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, "," => ActionFn(1624); - assert!(__symbols.len() >= 5); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant63(__symbols); + 639 => { + // ParameterList = OneOrMore>, ",", "*", "," => ActionFn(1623); + assert!(__symbols.len() >= 4); + let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym4.2; - let __nt = match super::__action1624::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __end = __sym3.2; + let __nt = match super::__action1623::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (5, 211) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (4, 211) } - 637 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, "," => ActionFn(1625); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant63(__symbols); + 640 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", "," => ActionFn(1624); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym5.2; + let __nt = match super::__action1624::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (6, 211) + } + 641 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", "," => ActionFn(1625); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; let __nt = match super::__action1625::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (7, 211) - } - 638 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, "," => ActionFn(1626); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1626::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 211) - } - 639 => { - // ParameterList = OneOrMore>, ",", "*", "," => ActionFn(1627); - assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym3.2; - let __nt = match super::__action1627::<>(mode, __sym0, __sym1, __sym2, __sym3) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (4, 211) - } - 640 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", "," => ActionFn(1628); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym5.2; - let __nt = match super::__action1628::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (6, 211) - } - 641 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", "," => ActionFn(1629); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = match super::__action1629::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 211) } 642 => { - // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ("," >)+, "," => ActionFn(1630); + // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ("," >)+, "," => ActionFn(1626); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant11(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1630::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1626::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 211) } 643 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ("," >)+, "," => ActionFn(1631); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ("," >)+, "," => ActionFn(1627); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym7.2; + let __nt = match super::__action1627::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 211) + } + 644 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ("," >)+, "," => ActionFn(1628); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant11(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1628::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 211) + } + 645 => { + // ParameterList = OneOrMore>, ",", "*", ("," >)+, "," => ActionFn(1629); + assert!(__symbols.len() >= 5); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym4.2; + let __nt = match super::__action1629::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (5, 211) + } + 646 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, "," => ActionFn(1630); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant11(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym6.2; + let __nt = match super::__action1630::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (7, 211) + } + 647 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, "," => ActionFn(1631); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant11(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym7.2; let __nt = match super::__action1631::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 211) - } - 644 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ("," >)+, "," => ActionFn(1632); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant11(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1632::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 211) - } - 645 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, "," => ActionFn(1633); - assert!(__symbols.len() >= 5); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym4.2; - let __nt = match super::__action1633::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (5, 211) - } - 646 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, "," => ActionFn(1634); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant11(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = match super::__action1634::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (7, 211) - } - 647 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, "," => ActionFn(1635); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1635::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (8, 211) } 648 => { - // ParameterList = OneOrMore>, "," => ActionFn(1636); + // ParameterList = OneOrMore>, "," => ActionFn(1632); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1636::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1632::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 211) } 649 => { - // ParameterList = OneOrMore>, ",", "/", "," => ActionFn(1637); + // ParameterList = OneOrMore>, ",", "/", "," => ActionFn(1633); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1637::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1633::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 211) } 650 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, "," => ActionFn(1638); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, "," => ActionFn(1634); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym4.2; + let __nt = match super::__action1634::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (5, 211) + } + 651 => { + // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1635); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant8(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant65(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym5.2; + let __nt = match super::__action1635::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (6, 211) + } + 652 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1636); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant65(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym7.2; + let __nt = match super::__action1636::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 211) + } + 653 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1637); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant8(__symbols); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1637::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 211) + } + 654 => { + // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter => ActionFn(1638); + assert!(__symbols.len() >= 5); + let __sym4 = __pop_Variant8(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym4.2; let __nt = match super::__action1638::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 211) } - 651 => { - // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1639); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant8(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant63(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym5.2; - let __nt = match super::__action1639::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (6, 211) - } - 652 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1640); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant63(__symbols); + 655 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter => ActionFn(1639); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant8(__symbols); + let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym6.2; + let __nt = match super::__action1639::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (7, 211) + } + 656 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter => ActionFn(1640); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym7.2; let __nt = match super::__action1640::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 211) - } - 653 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1641); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant8(__symbols); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1641::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 211) - } - 654 => { - // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter => ActionFn(1642); - assert!(__symbols.len() >= 5); - let __sym4 = __pop_Variant8(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym4.2; - let __nt = match super::__action1642::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (5, 211) - } - 655 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter => ActionFn(1643); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant8(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = match super::__action1643::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (7, 211) - } - 656 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter => ActionFn(1644); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1644::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (8, 211) } 657 => { - // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1645); + // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1641); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant8(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant11(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1645::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1641::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 211) } 658 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1646); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1642); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant8(__symbols); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym8.2; + let __nt = match super::__action1642::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (9, 211) + } + 659 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1643); + assert!(__symbols.len() >= 10); + let __sym9 = __pop_Variant8(__symbols); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant11(__symbols); + let __sym6 = __pop_Variant65(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym9.2; + let __nt = match super::__action1643::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (10, 211) + } + 660 => { + // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1644); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant8(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym5.2; + let __nt = match super::__action1644::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (6, 211) + } + 661 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1645); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant8(__symbols); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant11(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym7.2; + let __nt = match super::__action1645::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (8, 211) + } + 662 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1646); + assert!(__symbols.len() >= 9); + let __sym8 = __pop_Variant8(__symbols); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant11(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym8.2; let __nt = match super::__action1646::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (9, 211) } - 659 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1647); - assert!(__symbols.len() >= 10); - let __sym9 = __pop_Variant8(__symbols); - let __sym8 = __pop_Variant0(__symbols); - let __sym7 = __pop_Variant11(__symbols); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); + 663 => { + // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter => ActionFn(1647); + assert!(__symbols.len() >= 4); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym9.2; - let __nt = match super::__action1647::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __end = __sym3.2; + let __nt = match super::__action1647::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (10, 211) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (4, 211) } - 660 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1648); + 664 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter => ActionFn(1648); assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant8(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); + let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; let __nt = match super::__action1648::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 211) } - 661 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1649); - assert!(__symbols.len() >= 8); - let __sym7 = __pop_Variant8(__symbols); - let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant11(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym7.2; - let __nt = match super::__action1649::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (8, 211) - } - 662 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1650); - assert!(__symbols.len() >= 9); - let __sym8 = __pop_Variant8(__symbols); - let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant11(__symbols); + 665 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter => ActionFn(1649); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant65(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym8.2; - let __nt = match super::__action1650::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __end = __sym6.2; + let __nt = match super::__action1649::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (9, 211) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (7, 211) } - 663 => { - // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter => ActionFn(1651); - assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant63(__symbols); + 666 => { + // ParameterList = OneOrMore>, ",", "*" => ActionFn(1650); + assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; - let __end = __sym3.2; - let __nt = match super::__action1651::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __end = __sym2.2; + let __nt = match super::__action1650::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (4, 211) + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (3, 211) } - 664 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter => ActionFn(1652); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant63(__symbols); + 667 => { + // ParameterList = OneOrMore>, ",", "/", ",", "*" => ActionFn(1651); + assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); + let __start = __sym0.0; + let __end = __sym4.2; + let __nt = match super::__action1651::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + (5, 211) + } + 668 => { + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*" => ActionFn(1652); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant11(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; let __nt = match super::__action1652::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (6, 211) - } - 665 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter => ActionFn(1653); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant63(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = match super::__action1653::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (7, 211) - } - 666 => { - // ParameterList = OneOrMore>, ",", "*" => ActionFn(1654); - assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym2.2; - let __nt = match super::__action1654::<>(mode, __sym0, __sym1, __sym2) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (3, 211) - } - 667 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*" => ActionFn(1655); - assert!(__symbols.len() >= 5); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym4.2; - let __nt = match super::__action1655::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); - (5, 211) - } - 668 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*" => ActionFn(1656); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant11(__symbols); - let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); - let __start = __sym0.0; - let __end = __sym5.2; - let __nt = match super::__action1656::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 211) } 669 => { - // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1657); + // ParameterList = OneOrMore>, ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1653); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant11(__symbols); - let __sym3 = __pop_Variant63(__symbols); + let __sym3 = __pop_Variant65(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1657::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1653::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 211) } 670 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1658); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1654); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant11(__symbols); - let __sym5 = __pop_Variant63(__symbols); + let __sym5 = __pop_Variant65(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1658::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1654::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 211) } 671 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1659); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarUntypedParameter, ("," >)+ => ActionFn(1655); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant11(__symbols); - let __sym6 = __pop_Variant63(__symbols); + let __sym6 = __pop_Variant65(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1659::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1655::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (8, 211) } 672 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+ => ActionFn(1660); + // ParameterList = OneOrMore>, ",", "*", ("," >)+ => ActionFn(1656); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1660::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1656::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 211) } 673 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+ => ActionFn(1661); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+ => ActionFn(1657); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant11(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1661::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1657::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 211) } 674 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+ => ActionFn(1662); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+ => ActionFn(1658); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant11(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -16266,95 +16268,95 @@ mod __parse__Top { let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1662::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1658::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 211) } 675 => { - // ParameterList = OneOrMore> => ActionFn(1663); - let __sym0 = __pop_Variant80(__symbols); + // ParameterList = OneOrMore> => ActionFn(1659); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1663::<>(mode, __sym0) { + let __nt = match super::__action1659::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (1, 211) } 676 => { - // ParameterList = OneOrMore>, ",", "/" => ActionFn(1664); + // ParameterList = OneOrMore>, ",", "/" => ActionFn(1660); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1664::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1660::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 211) } 677 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+ => ActionFn(1665); + // ParameterList = OneOrMore>, ",", "/", ("," >)+ => ActionFn(1661); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1665::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1661::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 211) } 678 => { - // ParameterList = OneOrMore>, ",", KwargParameter, "," => ActionFn(1666); + // ParameterList = OneOrMore>, ",", KwargParameter, "," => ActionFn(1662); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant8(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1666::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1662::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 211) } 679 => { - // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter, "," => ActionFn(1667); + // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter, "," => ActionFn(1663); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1667::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1663::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 211) } 680 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter, "," => ActionFn(1668); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter, "," => ActionFn(1664); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant8(__symbols); @@ -16362,85 +16364,85 @@ mod __parse__Top { let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1668::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1664::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (7, 211) } 681 => { - // ParameterList = OneOrMore>, ",", KwargParameter => ActionFn(1669); + // ParameterList = OneOrMore>, ",", KwargParameter => ActionFn(1665); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant8(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1669::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1665::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 211) } 682 => { - // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter => ActionFn(1670); + // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter => ActionFn(1666); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1670::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1666::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 211) } 683 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter => ActionFn(1671); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter => ActionFn(1667); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant8(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1671::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1667::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 211) } 684 => { - // ParameterList = "*", StarUntypedParameter, ",", KwargParameter, "," => ActionFn(1380); + // ParameterList = "*", StarUntypedParameter, ",", KwargParameter, "," => ActionFn(1392); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1380::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1392::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 211) } 685 => { - // ParameterList = "*", ",", KwargParameter, "," => ActionFn(1381); + // ParameterList = "*", ",", KwargParameter, "," => ActionFn(1393); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant8(__symbols); @@ -16448,33 +16450,33 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1381::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1393::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 211) } 686 => { - // ParameterList = "*", StarUntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1382); + // ParameterList = "*", StarUntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1394); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1382::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1394::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (6, 211) } 687 => { - // ParameterList = "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1383); + // ParameterList = "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1395); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant8(__symbols); @@ -16483,123 +16485,123 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1383::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1395::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 211) } 688 => { - // ParameterList = "*", StarUntypedParameter, "," => ActionFn(1384); + // ParameterList = "*", StarUntypedParameter, "," => ActionFn(1396); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1384::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1396::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 211) } 689 => { - // ParameterList = "*", "," => ActionFn(1385); + // ParameterList = "*", "," => ActionFn(1397); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1385::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1397::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 211) } 690 => { - // ParameterList = "*", StarUntypedParameter, ("," >)+, "," => ActionFn(1386); + // ParameterList = "*", StarUntypedParameter, ("," >)+, "," => ActionFn(1398); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1386::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1398::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 211) } 691 => { - // ParameterList = "*", ("," >)+, "," => ActionFn(1387); + // ParameterList = "*", ("," >)+, "," => ActionFn(1399); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant11(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1387::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1399::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 211) } 692 => { - // ParameterList = "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1388); + // ParameterList = "*", StarUntypedParameter, ",", KwargParameter => ActionFn(1400); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1388::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1400::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 211) } 693 => { - // ParameterList = "*", ",", KwargParameter => ActionFn(1389); + // ParameterList = "*", ",", KwargParameter => ActionFn(1401); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant8(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1389::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1401::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 211) } 694 => { - // ParameterList = "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1390); + // ParameterList = "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1402); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1390::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1402::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (5, 211) } 695 => { - // ParameterList = "*", ("," >)+, ",", KwargParameter => ActionFn(1391); + // ParameterList = "*", ("," >)+, ",", KwargParameter => ActionFn(1403); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -16607,66 +16609,66 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1391::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1403::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (4, 211) } 696 => { - // ParameterList = "*", StarUntypedParameter => ActionFn(1392); + // ParameterList = "*", StarUntypedParameter => ActionFn(1404); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1392::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1404::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 211) } 697 => { - // ParameterList = "*" => ActionFn(1393); + // ParameterList = "*" => ActionFn(1405); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1393::<>(mode, __sym0) { + let __nt = match super::__action1405::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (1, 211) } 698 => { - // ParameterList = "*", StarUntypedParameter, ("," >)+ => ActionFn(1394); + // ParameterList = "*", StarUntypedParameter, ("," >)+ => ActionFn(1406); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1394::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1406::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 211) } 699 => { - // ParameterList = "*", ("," >)+ => ActionFn(1395); + // ParameterList = "*", ("," >)+ => ActionFn(1407); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant11(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1395::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1407::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 211) } 700 => { @@ -16682,15 +16684,15 @@ mod __parse__Top { __reduce703(mode, __lookahead_start, __symbols, core::marker::PhantomData::<()>) } 704 => { - // ParameterListStarArgs = "*", StarTypedParameter, ",", KwargParameter => ActionFn(859); + // ParameterListStarArgs = "*", StarTypedParameter, ",", KwargParameter => ActionFn(861); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action859::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action861::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16698,14 +16700,14 @@ mod __parse__Top { (4, 213) } 705 => { - // ParameterListStarArgs = "*", ",", KwargParameter => ActionFn(860); + // ParameterListStarArgs = "*", ",", KwargParameter => ActionFn(862); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant8(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action860::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action862::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16713,16 +16715,16 @@ mod __parse__Top { (3, 213) } 706 => { - // ParameterListStarArgs = "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(861); + // ParameterListStarArgs = "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(863); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action861::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action863::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16730,7 +16732,7 @@ mod __parse__Top { (5, 213) } 707 => { - // ParameterListStarArgs = "*", ("," >)+, ",", KwargParameter => ActionFn(862); + // ParameterListStarArgs = "*", ("," >)+, ",", KwargParameter => ActionFn(864); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -16738,7 +16740,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action862::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action864::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16746,13 +16748,13 @@ mod __parse__Top { (4, 213) } 708 => { - // ParameterListStarArgs = "*", StarTypedParameter => ActionFn(863); + // ParameterListStarArgs = "*", StarTypedParameter => ActionFn(865); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action863::<>(mode, __sym0, __sym1) { + let __nt = match super::__action865::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16760,11 +16762,11 @@ mod __parse__Top { (2, 213) } 709 => { - // ParameterListStarArgs = "*" => ActionFn(864); + // ParameterListStarArgs = "*" => ActionFn(866); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action864::<>(mode, __sym0) { + let __nt = match super::__action866::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16772,14 +16774,14 @@ mod __parse__Top { (1, 213) } 710 => { - // ParameterListStarArgs = "*", StarTypedParameter, ("," >)+ => ActionFn(865); + // ParameterListStarArgs = "*", StarTypedParameter, ("," >)+ => ActionFn(867); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action865::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action867::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16787,13 +16789,13 @@ mod __parse__Top { (3, 213) } 711 => { - // ParameterListStarArgs = "*", ("," >)+ => ActionFn(866); + // ParameterListStarArgs = "*", ("," >)+ => ActionFn(868); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant11(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action866::<>(mode, __sym0, __sym1) { + let __nt = match super::__action868::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16801,15 +16803,15 @@ mod __parse__Top { (2, 213) } 712 => { - // ParameterListStarArgs = "*", StarUntypedParameter, ",", KwargParameter => ActionFn(989); + // ParameterListStarArgs = "*", StarUntypedParameter, ",", KwargParameter => ActionFn(987); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action989::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action987::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16817,14 +16819,14 @@ mod __parse__Top { (4, 214) } 713 => { - // ParameterListStarArgs = "*", ",", KwargParameter => ActionFn(990); + // ParameterListStarArgs = "*", ",", KwargParameter => ActionFn(988); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant8(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action990::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action988::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16832,16 +16834,16 @@ mod __parse__Top { (3, 214) } 714 => { - // ParameterListStarArgs = "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(991); + // ParameterListStarArgs = "*", StarUntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(989); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant8(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action991::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action989::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16849,7 +16851,7 @@ mod __parse__Top { (5, 214) } 715 => { - // ParameterListStarArgs = "*", ("," >)+, ",", KwargParameter => ActionFn(992); + // ParameterListStarArgs = "*", ("," >)+, ",", KwargParameter => ActionFn(990); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant8(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -16857,7 +16859,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action992::<>(mode, __sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action990::<>(mode, __sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16865,13 +16867,13 @@ mod __parse__Top { (4, 214) } 716 => { - // ParameterListStarArgs = "*", StarUntypedParameter => ActionFn(993); + // ParameterListStarArgs = "*", StarUntypedParameter => ActionFn(991); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action993::<>(mode, __sym0, __sym1) { + let __nt = match super::__action991::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16879,11 +16881,11 @@ mod __parse__Top { (2, 214) } 717 => { - // ParameterListStarArgs = "*" => ActionFn(994); + // ParameterListStarArgs = "*" => ActionFn(992); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action994::<>(mode, __sym0) { + let __nt = match super::__action992::<>(mode, __sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16891,14 +16893,14 @@ mod __parse__Top { (1, 214) } 718 => { - // ParameterListStarArgs = "*", StarUntypedParameter, ("," >)+ => ActionFn(995); + // ParameterListStarArgs = "*", StarUntypedParameter, ("," >)+ => ActionFn(993); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant11(__symbols); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action995::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action993::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16906,13 +16908,13 @@ mod __parse__Top { (3, 214) } 719 => { - // ParameterListStarArgs = "*", ("," >)+ => ActionFn(996); + // ParameterListStarArgs = "*", ("," >)+ => ActionFn(994); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant11(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action996::<>(mode, __sym0, __sym1) { + let __nt = match super::__action994::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16920,32 +16922,32 @@ mod __parse__Top { (2, 214) } 720 => { - // Parameters = "(", ParameterList, ")" => ActionFn(1490); + // Parameters = "(", ParameterList, ")" => ActionFn(1486); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant45(__symbols); + let __sym1 = __pop_Variant47(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1490::<>(mode, __sym0, __sym1, __sym2) { + let __nt = match super::__action1486::<>(mode, __sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (3, 215) } 721 => { - // Parameters = "(", ")" => ActionFn(1491); + // Parameters = "(", ")" => ActionFn(1487); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1491::<>(mode, __sym0, __sym1) { + let __nt = match super::__action1487::<>(mode, __sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 215) } 722 => { @@ -17532,7 +17534,7 @@ mod __parse__Top { } 916 => { // __Top = Top => ActionFn(0); - let __sym0 = __pop_Variant90(__symbols); + let __sym0 = __pop_Variant92(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action0::<>(mode, __sym0); @@ -17571,16 +17573,6 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant59< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, (Option>, ast::Expr), TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant59(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } fn __pop_Variant12< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -17591,13 +17583,23 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant72< + fn __pop_Variant61< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, (Option>, ast::ParenthesizedExpr), TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant61(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant74< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, (Option, Option), TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant72(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant74(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -17624,7 +17626,7 @@ mod __parse__Top { fn __pop_Variant26< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, (TextSize, ast::Expr, ast::Suite), TextSize) + ) -> (TextSize, (TextSize, ast::ParenthesizedExpr, ast::Suite), TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant26(__v), __r)) => (__l, __v, __r), @@ -17641,53 +17643,53 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant82< + fn __pop_Variant84< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, (Vec, Vec), TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant82(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant84(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } fn __pop_Variant43< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, (ast::CmpOp, ast::Expr), TextSize) + ) -> (TextSize, (ast::CmpOp, ast::ParenthesizedExpr), TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant43(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant60< + fn __pop_Variant78< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, (ast::Expr, ast::Expr), TextSize) + ) -> (TextSize, (ast::Expr, ast::Pattern), TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant60(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant78(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } fn __pop_Variant38< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, (ast::Expr, ast::Identifier), TextSize) + ) -> (TextSize, (ast::ParenthesizedExpr, ast::Identifier), TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant38(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant76< + fn __pop_Variant62< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, (ast::Expr, ast::Pattern), TextSize) + ) -> (TextSize, (ast::ParenthesizedExpr, ast::ParenthesizedExpr), TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant76(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant62(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -17731,13 +17733,13 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant87< + fn __pop_Variant89< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Option, TextSize) + ) -> (TextSize, Option, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant87(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant89(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -17751,136 +17753,136 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant47< + fn __pop_Variant49< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, TextSize, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant47(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant51< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant51(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant61< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec<(Option>, ast::Expr)>, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant61(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant79< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec<(ast::Expr, ast::Pattern)>, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant79(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant69< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant69(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant49(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } fn __pop_Variant53< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) + ) -> (TextSize, Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant53(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant32< + fn __pop_Variant63< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) + ) -> (TextSize, Vec<(Option>, ast::ParenthesizedExpr)>, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant32(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant77< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant77(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant80< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant80(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant52< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant52(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant78< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant78(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant89< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant89(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant63(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } fn __pop_Variant81< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, Vec, TextSize) + ) -> (TextSize, Vec<(ast::Expr, ast::Pattern)>, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant81(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } + fn __pop_Variant71< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant71(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant55< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant55(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant79< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant79(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant82< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant82(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant32< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant32(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant54< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant54(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant80< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant80(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant91< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant91(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant83< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant83(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } fn __pop_Variant39< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -17914,7 +17916,7 @@ mod __parse__Top { fn __pop_Variant27< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>, TextSize) + ) -> (TextSize, alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant27(__v), __r)) => (__l, __v, __r), @@ -17924,7 +17926,7 @@ mod __parse__Top { fn __pop_Variant44< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::Expr)>, TextSize) + ) -> (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant44(__v), __r)) => (__l, __v, __r), @@ -17941,63 +17943,53 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant86< + fn __pop_Variant88< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, alloc::vec::Vec, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant86(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant88(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant58< + fn __pop_Variant60< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, alloc::vec::Vec, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant58(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant60(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant66< + fn __pop_Variant68< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, alloc::vec::Vec, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant66(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant68(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant16< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, alloc::vec::Vec, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant71< + fn __pop_Variant73< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, alloc::vec::Vec, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant71(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant73(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant74< + fn __pop_Variant76< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, alloc::vec::Vec, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant74(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant76(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -18011,6 +18003,16 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } + fn __pop_Variant16< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, alloc::vec::Vec, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant16(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } fn __pop_Variant35< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -18051,83 +18053,83 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant68< + fn __pop_Variant70< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::Alias, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant68(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant70(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant49< + fn __pop_Variant51< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::Arguments, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant49(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant55< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, ast::CmpOp, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant55(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant85< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, ast::Comprehension, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant85(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant56< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, ast::Constant, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant56(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant51(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } fn __pop_Variant57< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, ast::Decorator, TextSize) + ) -> (TextSize, ast::CmpOp, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant57(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant65< + fn __pop_Variant87< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, ast::Comprehension, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant87(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant58< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, ast::Constant, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant58(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant59< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, ast::Decorator, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant59(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant67< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::ExceptHandler, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant65(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant67(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant14< + fn __pop_Variant45< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::Expr, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant45(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -18141,53 +18143,53 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant70< + fn __pop_Variant72< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::Int, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant70(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant72(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant73< + fn __pop_Variant75< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::MatchCase, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant73(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant75(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant90< + fn __pop_Variant92< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::Mod, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant90(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant92(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant48< + fn __pop_Variant50< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::Operator, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant48(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant50(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant63< + fn __pop_Variant65< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::Parameter, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant63(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant65(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -18201,13 +18203,23 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant45< + fn __pop_Variant47< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::Parameters, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant45(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant47(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant14< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, ast::ParenthesizedExpr, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant14(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -18221,23 +18233,23 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant84< + fn __pop_Variant86< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::PatternArguments, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant84(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant86(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant75< + fn __pop_Variant77< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::PatternKeyword, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant75(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant77(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -18261,36 +18273,36 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant91< + fn __pop_Variant93< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, ast::TypeParam, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant91(__v), __r)) => (__l, __v, __r), - _ => __symbol_type_mismatch() - } - } - fn __pop_Variant92< - >( - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, ast::TypeParams, TextSize) - { - match __symbols.pop() { - Some((__l, __Symbol::Variant92(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant93(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } fn __pop_Variant94< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, ast::UnaryOp, TextSize) + ) -> (TextSize, ast::TypeParams, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant94(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } + fn __pop_Variant96< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, ast::UnaryOp, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant96(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } fn __pop_Variant17< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> @@ -18301,13 +18313,13 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant67< + fn __pop_Variant69< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, core::option::Option<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant67(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant69(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -18341,40 +18353,40 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant88< + fn __pop_Variant90< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, core::option::Option>, TextSize) + ) -> (TextSize, core::option::Option>, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant88(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant90(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant62< + fn __pop_Variant64< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, core::option::Option>, ast::Expr)>>, TextSize) + ) -> (TextSize, core::option::Option>, ast::ParenthesizedExpr)>>, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant62(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant64(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant54< + fn __pop_Variant56< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, core::option::Option>, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant54(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant56(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } fn __pop_Variant33< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> - ) -> (TextSize, core::option::Option>, TextSize) + ) -> (TextSize, core::option::Option>, TextSize) { match __symbols.pop() { Some((__l, __Symbol::Variant33(__v), __r)) => (__l, __v, __r), @@ -18391,23 +18403,23 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant50< + fn __pop_Variant52< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, core::option::Option, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant50(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant52(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant15< + fn __pop_Variant46< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, core::option::Option, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant46(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -18421,33 +18433,43 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant64< + fn __pop_Variant66< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, core::option::Option, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant64(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant66(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant46< + fn __pop_Variant48< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, core::option::Option, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant46(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant48(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } - fn __pop_Variant83< + fn __pop_Variant15< + >( + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> + ) -> (TextSize, core::option::Option, TextSize) + { + match __symbols.pop() { + Some((__l, __Symbol::Variant15(__v), __r)) => (__l, __v, __r), + _ => __symbol_type_mismatch() + } + } + fn __pop_Variant85< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, core::option::Option, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant83(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant85(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -18461,13 +18483,13 @@ mod __parse__Top { _ => __symbol_type_mismatch() } } - fn __pop_Variant93< + fn __pop_Variant95< >( __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)> ) -> (TextSize, core::option::Option, TextSize) { match __symbols.pop() { - Some((__l, __Symbol::Variant93(__v), __r)) => (__l, __v, __r), + Some((__l, __Symbol::Variant95(__v), __r)) => (__l, __v, __r), _ => __symbol_type_mismatch() } } @@ -18924,13 +18946,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("," >)? = ",", Test<"all"> => ActionFn(1047); + // ("," >)? = ",", Test<"all"> => ActionFn(1045); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1047::<>(mode, __sym0, __sym1); + let __nt = super::__action1045::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 18) } @@ -19006,13 +19028,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("," )+ = ",", TestOrStarNamedExpr => ActionFn(1050); + // ("," )+ = ",", TestOrStarNamedExpr => ActionFn(1048); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1050::<>(mode, __sym0, __sym1); + let __nt = super::__action1048::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (2, 21) } @@ -19024,14 +19046,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("," )+ = ("," )+, ",", TestOrStarNamedExpr => ActionFn(1051); + // ("," )+ = ("," )+, ",", TestOrStarNamedExpr => ActionFn(1049); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant16(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1051::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1049::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (3, 21) } @@ -19092,13 +19114,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("," >)+ = ",", WithItem<"all"> => ActionFn(1060); + // ("," >)+ = ",", WithItem<"all"> => ActionFn(1058); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant17(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1060::<>(mode, __sym0, __sym1); + let __nt = super::__action1058::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant18(__nt), __end)); (2, 24) } @@ -19110,14 +19132,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("," >)+ = ("," >)+, ",", WithItem<"all"> => ActionFn(1061); + // ("," >)+ = ("," >)+, ",", WithItem<"all"> => ActionFn(1059); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant17(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant18(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1061::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1059::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant18(__nt), __end)); (3, 24) } @@ -19147,13 +19169,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("->" >)? = "->", Test<"all"> => ActionFn(1066); + // ("->" >)? = "->", Test<"all"> => ActionFn(1064); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1066::<>(mode, __sym0, __sym1); + let __nt = super::__action1064::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 26) } @@ -19198,13 +19220,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("." Identifier)+ = ".", Identifier => ActionFn(1071); + // ("." Identifier)+ = ".", Identifier => ActionFn(1069); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1071::<>(mode, __sym0, __sym1); + let __nt = super::__action1069::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant20(__nt), __end)); (2, 28) } @@ -19216,14 +19238,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("." Identifier)+ = ("." Identifier)+, ".", Identifier => ActionFn(1072); + // ("." Identifier)+ = ("." Identifier)+, ".", Identifier => ActionFn(1070); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant20(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1072::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1070::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant20(__nt), __end)); (3, 28) } @@ -19253,13 +19275,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (":" >)? = ":", Test<"all"> => ActionFn(1073); + // (":" >)? = ":", Test<"all"> => ActionFn(1071); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1073::<>(mode, __sym0, __sym1); + let __nt = super::__action1071::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 30) } @@ -19304,13 +19326,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (":" )? = ":", TestOrStarExpr => ActionFn(1080); + // (":" )? = ":", TestOrStarExpr => ActionFn(1078); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1080::<>(mode, __sym0, __sym1); + let __nt = super::__action1078::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 32) } @@ -19353,11 +19375,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("?")+ = "?" => ActionFn(1083); + // ("?")+ = "?" => ActionFn(1081); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1083::<>(mode, __sym0); + let __nt = super::__action1081::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant21(__nt), __end)); (1, 34) } @@ -19369,13 +19391,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("?")+ = ("?")+, "?" => ActionFn(1084); + // ("?")+ = ("?")+, "?" => ActionFn(1082); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant21(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1084::<>(mode, __sym0, __sym1); + let __nt = super::__action1082::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant21(__nt), __end)); (2, 34) } @@ -19434,11 +19456,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("\n")+ = "\n" => ActionFn(1085); + // ("\n")+ = "\n" => ActionFn(1083); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1085::<>(mode, __sym0); + let __nt = super::__action1083::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant21(__nt), __end)); (1, 37) } @@ -19450,13 +19472,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("\n")+ = ("\n")+, "\n" => ActionFn(1086); + // ("\n")+ = ("\n")+, "\n" => ActionFn(1084); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant21(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1086::<>(mode, __sym0, __sym1); + let __nt = super::__action1084::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant21(__nt), __end)); (2, 37) } @@ -19486,13 +19508,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("as" )? = "as", Identifier => ActionFn(1089); + // ("as" )? = "as", Identifier => ActionFn(1087); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1089::<>(mode, __sym0, __sym1); + let __nt = super::__action1087::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant23(__nt), __end)); (2, 39) } @@ -19538,14 +19560,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("else" ":" )? = "else", ":", Suite => ActionFn(1094); + // ("else" ":" )? = "else", ":", Suite => ActionFn(1092); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1094::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1092::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant25(__nt), __end)); (3, 41) } @@ -19591,14 +19613,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("finally" ":" )? = "finally", ":", Suite => ActionFn(1105); + // ("finally" ":" )? = "finally", ":", Suite => ActionFn(1103); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1105::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1103::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant25(__nt), __end)); (3, 43) } @@ -19643,13 +19665,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ("from" >)? = "from", Test<"all"> => ActionFn(1115); + // ("from" >)? = "from", Test<"all"> => ActionFn(1113); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1115::<>(mode, __sym0, __sym1); + let __nt = super::__action1113::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 45) } @@ -19727,7 +19749,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (<@L> "elif" ":" )+ = "elif", NamedExpressionTest, ":", Suite => ActionFn(1118); + // (<@L> "elif" ":" )+ = "elif", NamedExpressionTest, ":", Suite => ActionFn(1116); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant24(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -19735,7 +19757,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1118::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1116::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant27(__nt), __end)); (4, 48) } @@ -19747,7 +19769,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (<@L> "elif" ":" )+ = (<@L> "elif" ":" )+, "elif", NamedExpressionTest, ":", Suite => ActionFn(1119); + // (<@L> "elif" ":" )+ = (<@L> "elif" ":" )+, "elif", NamedExpressionTest, ":", Suite => ActionFn(1117); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant24(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -19756,7 +19778,7 @@ mod __parse__Top { let __sym0 = __pop_Variant27(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1119::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1117::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant27(__nt), __end)); (5, 48) } @@ -19787,14 +19809,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (<@L> "else" ":" )? = "else", ":", Suite => ActionFn(1122); + // (<@L> "else" ":" )? = "else", ":", Suite => ActionFn(1120); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1122::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1120::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant29(__nt), __end)); (3, 50) } @@ -19839,13 +19861,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (> "or")+ = AndTest<"all">, "or" => ActionFn(1127); + // (> "or")+ = AndTest<"all">, "or" => ActionFn(1125); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1127::<>(mode, __sym0, __sym1); + let __nt = super::__action1125::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (2, 52) } @@ -19857,14 +19879,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (> "or")+ = (> "or")+, AndTest<"all">, "or" => ActionFn(1128); + // (> "or")+ = (> "or")+, AndTest<"all">, "or" => ActionFn(1126); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant16(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1128::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1126::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (3, 52) } @@ -19925,13 +19947,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ",")+ = FunctionArgument, "," => ActionFn(1129); + // ( ",")+ = FunctionArgument, "," => ActionFn(1127); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant30(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1129::<>(mode, __sym0, __sym1); + let __nt = super::__action1127::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant31(__nt), __end)); (2, 55) } @@ -19943,14 +19965,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ",")+ = ( ",")+, FunctionArgument, "," => ActionFn(1130); + // ( ",")+ = ( ",")+, FunctionArgument, "," => ActionFn(1128); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant30(__symbols); let __sym0 = __pop_Variant31(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1130::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1128::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant31(__nt), __end)); (3, 55) } @@ -19980,13 +20002,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (> "and")+ = NotTest<"all">, "and" => ActionFn(1133); + // (> "and")+ = NotTest<"all">, "and" => ActionFn(1131); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1133::<>(mode, __sym0, __sym1); + let __nt = super::__action1131::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (2, 57) } @@ -19998,14 +20020,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (> "and")+ = (> "and")+, NotTest<"all">, "and" => ActionFn(1134); + // (> "and")+ = (> "and")+, NotTest<"all">, "and" => ActionFn(1132); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant16(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1134::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1132::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (3, 57) } @@ -20035,13 +20057,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (>> ",")? = OneOrMore>, "," => ActionFn(1135); + // (>> ",")? = OneOrMore>, "," => ActionFn(1133); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1135::<>(mode, __sym0, __sym1); + let __nt = super::__action1133::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (2, 59) } @@ -20117,13 +20139,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ",")+ = Pattern, "," => ActionFn(1152); + // ( ",")+ = Pattern, "," => ActionFn(1150); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant34(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1152::<>(mode, __sym0, __sym1); + let __nt = super::__action1150::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (2, 62) } @@ -20135,14 +20157,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ",")+ = ( ",")+, Pattern, "," => ActionFn(1153); + // ( ",")+ = ( ",")+, Pattern, "," => ActionFn(1151); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant34(__symbols); let __sym0 = __pop_Variant35(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1153::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1151::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (3, 62) } @@ -20203,13 +20225,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ";")+ = SmallStatement, ";" => ActionFn(1156); + // ( ";")+ = SmallStatement, ";" => ActionFn(1154); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant36(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1156::<>(mode, __sym0, __sym1); + let __nt = super::__action1154::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant37(__nt), __end)); (2, 65) } @@ -20221,14 +20243,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ";")+ = ( ";")+, SmallStatement, ";" => ActionFn(1157); + // ( ";")+ = ( ";")+, SmallStatement, ";" => ActionFn(1155); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant36(__symbols); let __sym0 = __pop_Variant37(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1157::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1155::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant37(__nt), __end)); (3, 65) } @@ -20259,13 +20281,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ",") = OneOrMore>, "," => ActionFn(1470); + // ( ",") = OneOrMore>, "," => ActionFn(1174); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1470::<>(mode, __sym0, __sym1); + let __nt = super::__action1174::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (2, 67) } @@ -20277,13 +20299,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ",")? = OneOrMore>, "," => ActionFn(1473); + // ( ",")? = OneOrMore>, "," => ActionFn(1177); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1473::<>(mode, __sym0, __sym1); + let __nt = super::__action1177::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant40(__nt), __end)); (2, 68) } @@ -20310,11 +20332,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (@L string @R) = string => ActionFn(1176); + // (@L string @R) = string => ActionFn(1186); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1176::<>(mode, __sym0); + let __nt = super::__action1186::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant41(__nt), __end)); (1, 69) } @@ -20326,11 +20348,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (@L string @R)+ = string => ActionFn(1482); + // (@L string @R)+ = string => ActionFn(1478); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1482::<>(mode, __sym0); + let __nt = super::__action1478::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant42(__nt), __end)); (1, 70) } @@ -20342,13 +20364,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (@L string @R)+ = (@L string @R)+, string => ActionFn(1483); + // (@L string @R)+ = (@L string @R)+, string => ActionFn(1479); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant6(__symbols); let __sym0 = __pop_Variant42(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1483::<>(mode, __sym0, __sym1); + let __nt = super::__action1479::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant42(__nt), __end)); (2, 70) } @@ -20363,7 +20385,7 @@ mod __parse__Top { // (CompOp Expression<"all">) = CompOp, Expression<"all"> => ActionFn(493); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); - let __sym0 = __pop_Variant55(__symbols); + let __sym0 = __pop_Variant57(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action493::<>(mode, __sym0, __sym1); @@ -20378,13 +20400,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (CompOp Expression<"all">)+ = CompOp, Expression<"all"> => ActionFn(1484); + // (CompOp Expression<"all">)+ = CompOp, Expression<"all"> => ActionFn(1480); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); - let __sym0 = __pop_Variant55(__symbols); + let __sym0 = __pop_Variant57(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1484::<>(mode, __sym0, __sym1); + let __nt = super::__action1480::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant44(__nt), __end)); (2, 72) } @@ -20396,14 +20418,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (CompOp Expression<"all">)+ = (CompOp Expression<"all">)+, CompOp, Expression<"all"> => ActionFn(1485); + // (CompOp Expression<"all">)+ = (CompOp Expression<"all">)+, CompOp, Expression<"all"> => ActionFn(1481); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); - let __sym1 = __pop_Variant55(__symbols); + let __sym1 = __pop_Variant57(__symbols); let __sym0 = __pop_Variant44(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1485::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1481::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant44(__nt), __end)); (3, 72) } @@ -20416,11 +20438,11 @@ mod __parse__Top { ) -> (usize, usize) { // (Guard) = Guard => ActionFn(342); - let __sym0 = __pop_Variant14(__symbols); + let __sym0 = __pop_Variant45(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action342::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 73) } pub(crate) fn __reduce144< @@ -20431,12 +20453,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (Guard)? = Guard => ActionFn(1486); - let __sym0 = __pop_Variant14(__symbols); + // (Guard)? = Guard => ActionFn(1482); + let __sym0 = __pop_Variant45(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1486::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant15(__nt), __end)); + let __nt = super::__action1482::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant46(__nt), __end)); (1, 74) } pub(crate) fn __reduce145< @@ -20451,7 +20473,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action341::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant15(__nt), __end)); + __symbols.push((__start, __Symbol::Variant46(__nt), __end)); (0, 74) } pub(crate) fn __reduce146< @@ -20463,11 +20485,11 @@ mod __parse__Top { ) -> (usize, usize) { // (ParameterList) = ParameterList => ActionFn(276); - let __sym0 = __pop_Variant45(__symbols); + let __sym0 = __pop_Variant47(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action276::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (1, 75) } pub(crate) fn __reduce147< @@ -20478,12 +20500,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (ParameterList)? = ParameterList => ActionFn(1489); - let __sym0 = __pop_Variant45(__symbols); + // (ParameterList)? = ParameterList => ActionFn(1485); + let __sym0 = __pop_Variant47(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1489::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant46(__nt), __end)); + let __nt = super::__action1485::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant48(__nt), __end)); (1, 76) } pub(crate) fn __reduce148< @@ -20498,7 +20520,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action275::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant46(__nt), __end)); + __symbols.push((__start, __Symbol::Variant48(__nt), __end)); (0, 76) } pub(crate) fn __reduce149< @@ -20513,7 +20535,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action393::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + __symbols.push((__start, __Symbol::Variant49(__nt), __end)); (0, 77) } pub(crate) fn __reduce150< @@ -20528,7 +20550,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action392::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant47(__nt), __end)); + __symbols.push((__start, __Symbol::Variant49(__nt), __end)); (0, 78) } pub(crate) fn __reduce151< @@ -20544,7 +20566,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action196::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 79) } pub(crate) fn __reduce152< @@ -20560,7 +20582,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action197::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 79) } pub(crate) fn __reduce153< @@ -20571,14 +20593,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AddOpExpr = ConstantExpr, AddOp, ConstantAtom => ActionFn(1177); + // AddOpExpr = ConstantExpr, AddOp, ConstantAtom => ActionFn(1187); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); - let __sym1 = __pop_Variant48(__symbols); + let __sym1 = __pop_Variant50(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1177::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1187::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 80) } @@ -20590,14 +20612,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AndExpression<"all"> = AndExpression<"all">, "&", ShiftExpression<"all"> => ActionFn(1178); + // AndExpression<"all"> = AndExpression<"all">, "&", ShiftExpression<"all"> => ActionFn(1188); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1178::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1188::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 81) } @@ -20625,14 +20647,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AndExpression<"no-withitems"> = AndExpression<"all">, "&", ShiftExpression<"all"> => ActionFn(1179); + // AndExpression<"no-withitems"> = AndExpression<"all">, "&", ShiftExpression<"all"> => ActionFn(1189); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1179::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1189::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 82) } @@ -20660,13 +20682,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AndTest<"all"> = (> "and")+, NotTest<"all"> => ActionFn(1180); + // AndTest<"all"> = (> "and")+, NotTest<"all"> => ActionFn(1190); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant16(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1180::<>(mode, __sym0, __sym1); + let __nt = super::__action1190::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 83) } @@ -20694,13 +20716,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AndTest<"no-withitems"> = (> "and")+, NotTest<"all"> => ActionFn(1181); + // AndTest<"no-withitems"> = (> "and")+, NotTest<"all"> => ActionFn(1191); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant16(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1181::<>(mode, __sym0, __sym1); + let __nt = super::__action1191::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 84) } @@ -20729,11 +20751,11 @@ mod __parse__Top { ) -> (usize, usize) { // Arguments? = Arguments => ActionFn(266); - let __sym0 = __pop_Variant49(__symbols); + let __sym0 = __pop_Variant51(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action266::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant50(__nt), __end)); + __symbols.push((__start, __Symbol::Variant52(__nt), __end)); (1, 86) } pub(crate) fn __reduce167< @@ -20748,7 +20770,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action267::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant50(__nt), __end)); + __symbols.push((__start, __Symbol::Variant52(__nt), __end)); (0, 86) } pub(crate) fn __reduce168< @@ -20759,14 +20781,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ArithmeticExpression<"all"> = ArithmeticExpression<"all">, AddOp, Term<"all"> => ActionFn(1183); + // ArithmeticExpression<"all"> = ArithmeticExpression<"all">, AddOp, Term<"all"> => ActionFn(1193); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); - let __sym1 = __pop_Variant48(__symbols); + let __sym1 = __pop_Variant50(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1183::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1193::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 87) } @@ -20794,14 +20816,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ArithmeticExpression<"no-withitems"> = ArithmeticExpression<"all">, AddOp, Term<"all"> => ActionFn(1184); + // ArithmeticExpression<"no-withitems"> = ArithmeticExpression<"all">, AddOp, Term<"all"> => ActionFn(1194); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); - let __sym1 = __pop_Variant48(__symbols); + let __sym1 = __pop_Variant50(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1184::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1194::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 88) } @@ -20829,7 +20851,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AssertStatement = "assert", Test<"all">, ",", Test<"all"> => ActionFn(1186); + // AssertStatement = "assert", Test<"all">, ",", Test<"all"> => ActionFn(1196); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant14(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -20837,7 +20859,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1186::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1196::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 90) } @@ -20849,13 +20871,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AssertStatement = "assert", Test<"all"> => ActionFn(1187); + // AssertStatement = "assert", Test<"all"> => ActionFn(1197); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1187::<>(mode, __sym0, __sym1); + let __nt = super::__action1197::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (2, 90) } @@ -20999,11 +21021,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = Constant => ActionFn(1188); - let __sym0 = __pop_Variant56(__symbols); + // Atom<"all"> = Constant => ActionFn(1198); + let __sym0 = __pop_Variant58(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1188::<>(mode, __sym0); + let __nt = super::__action1198::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 95) } @@ -21015,11 +21037,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = Identifier => ActionFn(1189); + // Atom<"all"> = Identifier => ActionFn(1199); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1189::<>(mode, __sym0); + let __nt = super::__action1199::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 95) } @@ -21031,14 +21053,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "[", ListLiteralValues, "]" => ActionFn(1548); + // Atom<"all"> = "[", ListLiteralValues, "]" => ActionFn(1544); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant32(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1548::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1544::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 95) } @@ -21050,13 +21072,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "[", "]" => ActionFn(1549); + // Atom<"all"> = "[", "]" => ActionFn(1545); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1549::<>(mode, __sym0, __sym1); + let __nt = super::__action1545::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 95) } @@ -21068,15 +21090,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "[", TestOrStarNamedExpr, CompFor, "]" => ActionFn(1191); + // Atom<"all"> = "[", TestOrStarNamedExpr, CompFor, "]" => ActionFn(1201); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant53(__symbols); + let __sym2 = __pop_Variant55(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1191::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1201::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 95) } @@ -21088,7 +21110,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "(", OneOrMore>, ",", ")" => ActionFn(1192); + // Atom<"all"> = "(", OneOrMore>, ",", ")" => ActionFn(1202); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -21096,7 +21118,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1192::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1202::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 95) } @@ -21108,14 +21130,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "(", OneOrMore>, ")" => ActionFn(1193); + // Atom<"all"> = "(", OneOrMore>, ")" => ActionFn(1203); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant32(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1193::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1203::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 95) } @@ -21127,13 +21149,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "(", ")" => ActionFn(1202); + // Atom<"all"> = "(", ")" => ActionFn(1212); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1202::<>(mode, __sym0, __sym1); + let __nt = super::__action1212::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 95) } @@ -21145,14 +21167,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "(", YieldExpr, ")" => ActionFn(530); + // Atom<"all"> = "(", YieldExpr, ")" => ActionFn(1213); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action530::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1213::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 95) } @@ -21164,15 +21186,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "(", NamedExpressionTest, CompFor, ")" => ActionFn(1203); + // Atom<"all"> = "(", NamedExpressionTest, CompFor, ")" => ActionFn(1214); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant53(__symbols); + let __sym2 = __pop_Variant55(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1203::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1214::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 95) } @@ -21184,14 +21206,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "{", DictLiteralValues, "}" => ActionFn(1532); + // Atom<"all"> = "{", DictLiteralValues, "}" => ActionFn(1528); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant61(__symbols); + let __sym1 = __pop_Variant63(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1532::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1528::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 95) } @@ -21203,13 +21225,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "{", "}" => ActionFn(1533); + // Atom<"all"> = "{", "}" => ActionFn(1529); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1533::<>(mode, __sym0, __sym1); + let __nt = super::__action1529::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 95) } @@ -21221,15 +21243,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "{", DictEntry, CompFor, "}" => ActionFn(1206); + // Atom<"all"> = "{", DictEntry, CompFor, "}" => ActionFn(1217); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant53(__symbols); - let __sym1 = __pop_Variant60(__symbols); + let __sym2 = __pop_Variant55(__symbols); + let __sym1 = __pop_Variant62(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1206::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1217::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 95) } @@ -21241,14 +21263,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "{", SetLiteralValues, "}" => ActionFn(1207); + // Atom<"all"> = "{", SetLiteralValues, "}" => ActionFn(1218); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant32(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1207::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1218::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 95) } @@ -21260,15 +21282,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "{", NamedExpressionTest, CompFor, "}" => ActionFn(1208); + // Atom<"all"> = "{", NamedExpressionTest, CompFor, "}" => ActionFn(1219); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant53(__symbols); + let __sym2 = __pop_Variant55(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1208::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1219::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 95) } @@ -21280,11 +21302,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "True" => ActionFn(1209); + // Atom<"all"> = "True" => ActionFn(1220); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1209::<>(mode, __sym0); + let __nt = super::__action1220::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 95) } @@ -21296,11 +21318,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "False" => ActionFn(1210); + // Atom<"all"> = "False" => ActionFn(1221); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1210::<>(mode, __sym0); + let __nt = super::__action1221::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 95) } @@ -21312,11 +21334,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "None" => ActionFn(1211); + // Atom<"all"> = "None" => ActionFn(1222); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1211::<>(mode, __sym0); + let __nt = super::__action1222::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 95) } @@ -21328,11 +21350,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "..." => ActionFn(1212); + // Atom<"all"> = "..." => ActionFn(1223); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1212::<>(mode, __sym0); + let __nt = super::__action1223::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 95) } @@ -21344,11 +21366,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = Constant => ActionFn(1213); - let __sym0 = __pop_Variant56(__symbols); + // Atom<"no-withitems"> = Constant => ActionFn(1224); + let __sym0 = __pop_Variant58(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1213::<>(mode, __sym0); + let __nt = super::__action1224::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 96) } @@ -21360,11 +21382,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = Identifier => ActionFn(1214); + // Atom<"no-withitems"> = Identifier => ActionFn(1225); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1214::<>(mode, __sym0); + let __nt = super::__action1225::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 96) } @@ -21376,14 +21398,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "[", ListLiteralValues, "]" => ActionFn(1550); + // Atom<"no-withitems"> = "[", ListLiteralValues, "]" => ActionFn(1546); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant32(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1550::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1546::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 96) } @@ -21395,13 +21417,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "[", "]" => ActionFn(1551); + // Atom<"no-withitems"> = "[", "]" => ActionFn(1547); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1551::<>(mode, __sym0, __sym1); + let __nt = super::__action1547::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 96) } @@ -21413,15 +21435,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "[", TestOrStarNamedExpr, CompFor, "]" => ActionFn(1216); + // Atom<"no-withitems"> = "[", TestOrStarNamedExpr, CompFor, "]" => ActionFn(1227); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant53(__symbols); + let __sym2 = __pop_Variant55(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1216::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1227::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 96) } @@ -21433,13 +21455,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "(", ")" => ActionFn(1225); + // Atom<"no-withitems"> = "(", ")" => ActionFn(1236); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1225::<>(mode, __sym0, __sym1); + let __nt = super::__action1236::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 96) } @@ -21451,14 +21473,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "(", YieldExpr, ")" => ActionFn(572); + // Atom<"no-withitems"> = "(", YieldExpr, ")" => ActionFn(1237); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action572::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1237::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 96) } @@ -21470,15 +21492,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "(", NamedExpressionTest, CompFor, ")" => ActionFn(1226); + // Atom<"no-withitems"> = "(", NamedExpressionTest, CompFor, ")" => ActionFn(1238); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant53(__symbols); + let __sym2 = __pop_Variant55(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1226::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1238::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 96) } @@ -21490,14 +21512,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "{", DictLiteralValues, "}" => ActionFn(1534); + // Atom<"no-withitems"> = "{", DictLiteralValues, "}" => ActionFn(1530); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant61(__symbols); + let __sym1 = __pop_Variant63(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1534::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1530::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 96) } @@ -21509,13 +21531,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "{", "}" => ActionFn(1535); + // Atom<"no-withitems"> = "{", "}" => ActionFn(1531); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1535::<>(mode, __sym0, __sym1); + let __nt = super::__action1531::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 96) } @@ -21527,15 +21549,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "{", DictEntry, CompFor, "}" => ActionFn(1229); + // Atom<"no-withitems"> = "{", DictEntry, CompFor, "}" => ActionFn(1241); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant53(__symbols); - let __sym1 = __pop_Variant60(__symbols); + let __sym2 = __pop_Variant55(__symbols); + let __sym1 = __pop_Variant62(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1229::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1241::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 96) } @@ -21547,14 +21569,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "{", SetLiteralValues, "}" => ActionFn(1230); + // Atom<"no-withitems"> = "{", SetLiteralValues, "}" => ActionFn(1242); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant32(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1230::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1242::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 96) } @@ -21566,15 +21588,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "{", NamedExpressionTest, CompFor, "}" => ActionFn(1231); + // Atom<"no-withitems"> = "{", NamedExpressionTest, CompFor, "}" => ActionFn(1243); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant53(__symbols); + let __sym2 = __pop_Variant55(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1231::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1243::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 96) } @@ -21586,11 +21608,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "True" => ActionFn(1232); + // Atom<"no-withitems"> = "True" => ActionFn(1244); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1232::<>(mode, __sym0); + let __nt = super::__action1244::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 96) } @@ -21602,11 +21624,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "False" => ActionFn(1233); + // Atom<"no-withitems"> = "False" => ActionFn(1245); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1233::<>(mode, __sym0); + let __nt = super::__action1245::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 96) } @@ -21618,11 +21640,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "None" => ActionFn(1234); + // Atom<"no-withitems"> = "None" => ActionFn(1246); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1234::<>(mode, __sym0); + let __nt = super::__action1246::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 96) } @@ -21634,11 +21656,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "..." => ActionFn(1235); + // Atom<"no-withitems"> = "..." => ActionFn(1247); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1235::<>(mode, __sym0); + let __nt = super::__action1247::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 96) } @@ -21666,13 +21688,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AtomExpr2<"all"> = AtomExpr2<"all">, Arguments => ActionFn(1236); + // AtomExpr2<"all"> = AtomExpr2<"all">, Arguments => ActionFn(1248); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant49(__symbols); + let __sym1 = __pop_Variant51(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1236::<>(mode, __sym0, __sym1); + let __nt = super::__action1248::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 97) } @@ -21684,7 +21706,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AtomExpr2<"all"> = AtomExpr2<"all">, "[", SubscriptList, "]" => ActionFn(1237); + // AtomExpr2<"all"> = AtomExpr2<"all">, "[", SubscriptList, "]" => ActionFn(1249); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant14(__symbols); @@ -21692,7 +21714,7 @@ mod __parse__Top { let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1237::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1249::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 97) } @@ -21704,14 +21726,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AtomExpr2<"all"> = AtomExpr2<"all">, ".", Identifier => ActionFn(1238); + // AtomExpr2<"all"> = AtomExpr2<"all">, ".", Identifier => ActionFn(1250); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1238::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1250::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 97) } @@ -21739,13 +21761,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AtomExpr2<"no-withitems"> = AtomExpr2<"all">, Arguments => ActionFn(1239); + // AtomExpr2<"no-withitems"> = AtomExpr2<"all">, Arguments => ActionFn(1251); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant49(__symbols); + let __sym1 = __pop_Variant51(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1239::<>(mode, __sym0, __sym1); + let __nt = super::__action1251::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 98) } @@ -21757,7 +21779,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AtomExpr2<"no-withitems"> = AtomExpr2<"all">, "[", SubscriptList, "]" => ActionFn(1240); + // AtomExpr2<"no-withitems"> = AtomExpr2<"all">, "[", SubscriptList, "]" => ActionFn(1252); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant14(__symbols); @@ -21765,7 +21787,7 @@ mod __parse__Top { let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1240::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1252::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 98) } @@ -21777,14 +21799,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AtomExpr2<"no-withitems"> = AtomExpr2<"all">, ".", Identifier => ActionFn(1241); + // AtomExpr2<"no-withitems"> = AtomExpr2<"all">, ".", Identifier => ActionFn(1253); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1241::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1253::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 98) } @@ -21796,13 +21818,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AtomExpr<"all"> = "await", AtomExpr2<"all"> => ActionFn(1242); + // AtomExpr<"all"> = "await", AtomExpr2<"all"> => ActionFn(1254); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1242::<>(mode, __sym0, __sym1); + let __nt = super::__action1254::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 99) } @@ -21830,13 +21852,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // AtomExpr<"no-withitems"> = "await", AtomExpr2<"all"> => ActionFn(1243); + // AtomExpr<"no-withitems"> = "await", AtomExpr2<"all"> => ActionFn(1255); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1243::<>(mode, __sym0, __sym1); + let __nt = super::__action1255::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 100) } @@ -21869,7 +21891,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action40::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce252< @@ -21885,7 +21907,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action41::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce253< @@ -21901,7 +21923,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action42::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce254< @@ -21917,7 +21939,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action43::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce255< @@ -21933,7 +21955,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action44::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce256< @@ -21949,7 +21971,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action45::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce257< @@ -21965,7 +21987,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action46::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce258< @@ -21981,7 +22003,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action47::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce259< @@ -21997,7 +22019,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action48::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce260< @@ -22013,7 +22035,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action49::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce261< @@ -22029,7 +22051,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action50::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce262< @@ -22045,7 +22067,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action51::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce263< @@ -22061,7 +22083,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action52::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 101) } pub(crate) fn __reduce264< @@ -22072,11 +22094,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // CapturePattern = Identifier => ActionFn(1244); + // CapturePattern = Identifier => ActionFn(1256); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1244::<>(mode, __sym0); + let __nt = super::__action1256::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (1, 102) } @@ -22088,17 +22110,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = "class", Identifier, TypeParams, Arguments, ":", Suite => ActionFn(1704); + // ClassDef = "class", Identifier, TypeParams, Arguments, ":", Suite => ActionFn(1700); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant24(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant49(__symbols); - let __sym2 = __pop_Variant92(__symbols); + let __sym3 = __pop_Variant51(__symbols); + let __sym2 = __pop_Variant94(__symbols); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1704::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1700::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (6, 103) } @@ -22110,16 +22132,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = "class", Identifier, Arguments, ":", Suite => ActionFn(1705); + // ClassDef = "class", Identifier, Arguments, ":", Suite => ActionFn(1701); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant24(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant49(__symbols); + let __sym2 = __pop_Variant51(__symbols); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1705::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1701::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (5, 103) } @@ -22131,18 +22153,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = Decorator+, "class", Identifier, TypeParams, Arguments, ":", Suite => ActionFn(1706); + // ClassDef = Decorator+, "class", Identifier, TypeParams, Arguments, ":", Suite => ActionFn(1702); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant49(__symbols); - let __sym3 = __pop_Variant92(__symbols); + let __sym4 = __pop_Variant51(__symbols); + let __sym3 = __pop_Variant94(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1706::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1702::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 103) } @@ -22154,17 +22176,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = Decorator+, "class", Identifier, Arguments, ":", Suite => ActionFn(1707); + // ClassDef = Decorator+, "class", Identifier, Arguments, ":", Suite => ActionFn(1703); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant24(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant49(__symbols); + let __sym3 = __pop_Variant51(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1707::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1703::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (6, 103) } @@ -22176,16 +22198,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = "class", Identifier, TypeParams, ":", Suite => ActionFn(1708); + // ClassDef = "class", Identifier, TypeParams, ":", Suite => ActionFn(1704); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant24(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant92(__symbols); + let __sym2 = __pop_Variant94(__symbols); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1708::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1704::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (5, 103) } @@ -22197,7 +22219,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = "class", Identifier, ":", Suite => ActionFn(1709); + // ClassDef = "class", Identifier, ":", Suite => ActionFn(1705); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant24(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -22205,7 +22227,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1709::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1705::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 103) } @@ -22217,17 +22239,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = Decorator+, "class", Identifier, TypeParams, ":", Suite => ActionFn(1710); + // ClassDef = Decorator+, "class", Identifier, TypeParams, ":", Suite => ActionFn(1706); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant24(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant92(__symbols); + let __sym3 = __pop_Variant94(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1710::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1706::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (6, 103) } @@ -22239,16 +22261,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = Decorator+, "class", Identifier, ":", Suite => ActionFn(1711); + // ClassDef = Decorator+, "class", Identifier, ":", Suite => ActionFn(1707); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant24(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1711::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1707::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (5, 103) } @@ -22260,13 +22282,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassPattern = MatchName, PatternArguments => ActionFn(1245); + // ClassPattern = MatchName, PatternArguments => ActionFn(1257); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant84(__symbols); - let __sym0 = __pop_Variant14(__symbols); + let __sym1 = __pop_Variant86(__symbols); + let __sym0 = __pop_Variant45(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1245::<>(mode, __sym0, __sym1); + let __nt = super::__action1257::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (2, 104) } @@ -22278,13 +22300,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassPattern = MatchNameOrAttr, PatternArguments => ActionFn(1246); + // ClassPattern = MatchNameOrAttr, PatternArguments => ActionFn(1258); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant84(__symbols); - let __sym0 = __pop_Variant14(__symbols); + let __sym1 = __pop_Variant86(__symbols); + let __sym0 = __pop_Variant45(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1246::<>(mode, __sym0, __sym1); + let __nt = super::__action1258::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (2, 104) } @@ -22408,12 +22430,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = FunctionArgument => ActionFn(1498); + // Comma = FunctionArgument => ActionFn(1494); let __sym0 = __pop_Variant30(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1498::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant51(__nt), __end)); + let __nt = super::__action1494::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant53(__nt), __end)); (1, 106) } pub(crate) fn __reduce283< @@ -22424,11 +22446,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = => ActionFn(1499); + // Comma = => ActionFn(1495); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); - let __nt = super::__action1499::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant51(__nt), __end)); + let __nt = super::__action1495::<>(mode, &__start, &__end); + __symbols.push((__start, __Symbol::Variant53(__nt), __end)); (0, 106) } pub(crate) fn __reduce284< @@ -22439,14 +22461,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = ( ",")+, FunctionArgument => ActionFn(1500); + // Comma = ( ",")+, FunctionArgument => ActionFn(1496); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant30(__symbols); let __sym0 = __pop_Variant31(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1500::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant51(__nt), __end)); + let __nt = super::__action1496::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant53(__nt), __end)); (2, 106) } pub(crate) fn __reduce285< @@ -22457,12 +22479,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = ( ",")+ => ActionFn(1501); + // Comma = ( ",")+ => ActionFn(1497); let __sym0 = __pop_Variant31(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1501::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant51(__nt), __end)); + let __nt = super::__action1497::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant53(__nt), __end)); (1, 106) } pub(crate) fn __reduce286< @@ -22473,12 +22495,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = Pattern => ActionFn(1506); + // Comma = Pattern => ActionFn(1502); let __sym0 = __pop_Variant34(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1506::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + let __nt = super::__action1502::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (1, 107) } pub(crate) fn __reduce287< @@ -22489,11 +22511,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = => ActionFn(1507); + // Comma = => ActionFn(1503); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); - let __nt = super::__action1507::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + let __nt = super::__action1503::<>(mode, &__start, &__end); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (0, 107) } pub(crate) fn __reduce288< @@ -22504,14 +22526,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = ( ",")+, Pattern => ActionFn(1508); + // Comma = ( ",")+, Pattern => ActionFn(1504); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant34(__symbols); let __sym0 = __pop_Variant35(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1508::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + let __nt = super::__action1504::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (2, 107) } pub(crate) fn __reduce289< @@ -22522,12 +22544,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = ( ",")+ => ActionFn(1509); + // Comma = ( ",")+ => ActionFn(1505); let __sym0 = __pop_Variant35(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1509::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + let __nt = super::__action1505::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (1, 107) } pub(crate) fn __reduce290< @@ -22539,11 +22561,11 @@ mod __parse__Top { ) -> (usize, usize) { // CompFor = SingleForComprehension+ => ActionFn(224); - let __sym0 = __pop_Variant86(__symbols); + let __sym0 = __pop_Variant88(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action224::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant53(__nt), __end)); + __symbols.push((__start, __Symbol::Variant55(__nt), __end)); (1, 108) } pub(crate) fn __reduce291< @@ -22555,11 +22577,11 @@ mod __parse__Top { ) -> (usize, usize) { // CompFor? = CompFor => ActionFn(237); - let __sym0 = __pop_Variant53(__symbols); + let __sym0 = __pop_Variant55(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action237::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant54(__nt), __end)); + __symbols.push((__start, __Symbol::Variant56(__nt), __end)); (1, 109) } pub(crate) fn __reduce292< @@ -22574,7 +22596,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action238::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant54(__nt), __end)); + __symbols.push((__start, __Symbol::Variant56(__nt), __end)); (0, 109) } pub(crate) fn __reduce293< @@ -22590,7 +22612,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action184::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (1, 110) } pub(crate) fn __reduce294< @@ -22606,7 +22628,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action185::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (1, 110) } pub(crate) fn __reduce295< @@ -22622,7 +22644,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action186::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (1, 110) } pub(crate) fn __reduce296< @@ -22638,7 +22660,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action187::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (1, 110) } pub(crate) fn __reduce297< @@ -22654,7 +22676,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action188::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (1, 110) } pub(crate) fn __reduce298< @@ -22670,7 +22692,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action189::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (1, 110) } pub(crate) fn __reduce299< @@ -22686,7 +22708,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action190::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (1, 110) } pub(crate) fn __reduce300< @@ -22704,7 +22726,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action191::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (2, 110) } pub(crate) fn __reduce301< @@ -22720,7 +22742,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action192::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (1, 110) } pub(crate) fn __reduce302< @@ -22738,7 +22760,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action193::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant55(__nt), __end)); + __symbols.push((__start, __Symbol::Variant57(__nt), __end)); (2, 110) } pub(crate) fn __reduce303< @@ -22749,13 +22771,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comparison<"all"> = Expression<"all">, (CompOp Expression<"all">)+ => ActionFn(1247); + // Comparison<"all"> = Expression<"all">, (CompOp Expression<"all">)+ => ActionFn(1259); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant44(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1247::<>(mode, __sym0, __sym1); + let __nt = super::__action1259::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 111) } @@ -22783,13 +22805,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comparison<"no-withitems"> = Expression<"all">, (CompOp Expression<"all">)+ => ActionFn(1248); + // Comparison<"no-withitems"> = Expression<"all">, (CompOp Expression<"all">)+ => ActionFn(1260); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant44(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1248::<>(mode, __sym0, __sym1); + let __nt = super::__action1260::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 112) } @@ -23033,7 +23055,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action233::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant56(__nt), __end)); + __symbols.push((__start, __Symbol::Variant58(__nt), __end)); (1, 117) } pub(crate) fn __reduce321< @@ -23049,7 +23071,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action234::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant56(__nt), __end)); + __symbols.push((__start, __Symbol::Variant58(__nt), __end)); (1, 117) } pub(crate) fn __reduce322< @@ -23065,7 +23087,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action235::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant56(__nt), __end)); + __symbols.push((__start, __Symbol::Variant58(__nt), __end)); (1, 117) } pub(crate) fn __reduce323< @@ -23076,11 +23098,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ConstantAtom = Constant => ActionFn(1249); - let __sym0 = __pop_Variant56(__symbols); + // ConstantAtom = Constant => ActionFn(1261); + let __sym0 = __pop_Variant58(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1249::<>(mode, __sym0); + let __nt = super::__action1261::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 118) } @@ -23108,13 +23130,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ConstantExpr = "-", ConstantAtom => ActionFn(1250); + // ConstantExpr = "-", ConstantAtom => ActionFn(1262); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1250::<>(mode, __sym0, __sym1); + let __nt = super::__action1262::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 119) } @@ -23126,15 +23148,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Decorator = "@", NamedExpressionTest, "\n" => ActionFn(1251); + // Decorator = "@", NamedExpressionTest, "\n" => ActionFn(1263); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1251::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant57(__nt), __end)); + let __nt = super::__action1263::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant59(__nt), __end)); (3, 120) } pub(crate) fn __reduce327< @@ -23149,7 +23171,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action286::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant58(__nt), __end)); + __symbols.push((__start, __Symbol::Variant60(__nt), __end)); (0, 121) } pub(crate) fn __reduce328< @@ -23161,11 +23183,11 @@ mod __parse__Top { ) -> (usize, usize) { // Decorator* = Decorator+ => ActionFn(287); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action287::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant58(__nt), __end)); + __symbols.push((__start, __Symbol::Variant60(__nt), __end)); (1, 121) } pub(crate) fn __reduce329< @@ -23177,11 +23199,11 @@ mod __parse__Top { ) -> (usize, usize) { // Decorator+ = Decorator => ActionFn(414); - let __sym0 = __pop_Variant57(__symbols); + let __sym0 = __pop_Variant59(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action414::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant58(__nt), __end)); + __symbols.push((__start, __Symbol::Variant60(__nt), __end)); (1, 122) } pub(crate) fn __reduce330< @@ -23194,12 +23216,12 @@ mod __parse__Top { { // Decorator+ = Decorator+, Decorator => ActionFn(415); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant57(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym1 = __pop_Variant59(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action415::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant58(__nt), __end)); + __symbols.push((__start, __Symbol::Variant60(__nt), __end)); (2, 122) } pub(crate) fn __reduce331< @@ -23210,13 +23232,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // DelStatement = "del", ExpressionList2 => ActionFn(1252); + // DelStatement = "del", ExpressionList2 => ActionFn(1264); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant32(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1252::<>(mode, __sym0, __sym1); + let __nt = super::__action1264::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (2, 123) } @@ -23229,11 +23251,11 @@ mod __parse__Top { ) -> (usize, usize) { // DictElement = DictEntry => ActionFn(215); - let __sym0 = __pop_Variant60(__symbols); + let __sym0 = __pop_Variant62(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action215::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant59(__nt), __end)); + __symbols.push((__start, __Symbol::Variant61(__nt), __end)); (1, 124) } pub(crate) fn __reduce333< @@ -23251,7 +23273,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action216::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant59(__nt), __end)); + __symbols.push((__start, __Symbol::Variant61(__nt), __end)); (2, 124) } pub(crate) fn __reduce334< @@ -23270,7 +23292,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action214::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant60(__nt), __end)); + __symbols.push((__start, __Symbol::Variant62(__nt), __end)); (3, 125) } pub(crate) fn __reduce335< @@ -23284,11 +23306,11 @@ mod __parse__Top { // DictLiteralValues = OneOrMore, "," => ActionFn(589); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant61(__symbols); + let __sym0 = __pop_Variant63(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action589::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant61(__nt), __end)); + __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (2, 126) } pub(crate) fn __reduce336< @@ -23300,11 +23322,11 @@ mod __parse__Top { ) -> (usize, usize) { // DictLiteralValues = OneOrMore => ActionFn(590); - let __sym0 = __pop_Variant61(__symbols); + let __sym0 = __pop_Variant63(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action590::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant61(__nt), __end)); + __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (1, 126) } pub(crate) fn __reduce337< @@ -23316,11 +23338,11 @@ mod __parse__Top { ) -> (usize, usize) { // DictLiteralValues? = DictLiteralValues => ActionFn(541); - let __sym0 = __pop_Variant61(__symbols); + let __sym0 = __pop_Variant63(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action541::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant62(__nt), __end)); + __symbols.push((__start, __Symbol::Variant64(__nt), __end)); (1, 127) } pub(crate) fn __reduce338< @@ -23335,7 +23357,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action542::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant62(__nt), __end)); + __symbols.push((__start, __Symbol::Variant64(__nt), __end)); (0, 127) } pub(crate) fn __reduce339< @@ -23346,11 +23368,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // DottedName = name => ActionFn(1253); + // DottedName = name => ActionFn(1265); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1253::<>(mode, __sym0); + let __nt = super::__action1265::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant22(__nt), __end)); (1, 128) } @@ -23362,13 +23384,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // DottedName = name, ("." Identifier)+ => ActionFn(1254); + // DottedName = name, ("." Identifier)+ => ActionFn(1266); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant20(__symbols); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1254::<>(mode, __sym0, __sym1); + let __nt = super::__action1266::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant22(__nt), __end)); (2, 128) } @@ -23380,15 +23402,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // DoubleStarTypedParameter = Identifier, ":", Test<"all"> => ActionFn(1255); + // DoubleStarTypedParameter = Identifier, ":", Test<"all"> => ActionFn(1267); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1255::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant63(__nt), __end)); + let __nt = super::__action1267::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant65(__nt), __end)); (3, 129) } pub(crate) fn __reduce342< @@ -23399,12 +23421,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // DoubleStarTypedParameter = Identifier => ActionFn(1256); + // DoubleStarTypedParameter = Identifier => ActionFn(1268); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1256::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant63(__nt), __end)); + let __nt = super::__action1268::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant65(__nt), __end)); (1, 129) } pub(crate) fn __reduce343< @@ -23416,11 +23438,11 @@ mod __parse__Top { ) -> (usize, usize) { // DoubleStarTypedParameter? = DoubleStarTypedParameter => ActionFn(475); - let __sym0 = __pop_Variant63(__symbols); + let __sym0 = __pop_Variant65(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action475::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant64(__nt), __end)); + __symbols.push((__start, __Symbol::Variant66(__nt), __end)); (1, 130) } pub(crate) fn __reduce344< @@ -23435,7 +23457,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action476::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant64(__nt), __end)); + __symbols.push((__start, __Symbol::Variant66(__nt), __end)); (0, 130) } pub(crate) fn __reduce345< @@ -23446,7 +23468,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExceptClause = "except", Test<"all">, ":", Suite => ActionFn(1676); + // ExceptClause = "except", Test<"all">, ":", Suite => ActionFn(1672); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant24(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -23454,8 +23476,8 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1676::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant65(__nt), __end)); + let __nt = super::__action1672::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant67(__nt), __end)); (4, 131) } pub(crate) fn __reduce346< @@ -23466,15 +23488,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExceptClause = "except", ":", Suite => ActionFn(1677); + // ExceptClause = "except", ":", Suite => ActionFn(1673); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1677::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant65(__nt), __end)); + let __nt = super::__action1673::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant67(__nt), __end)); (3, 131) } pub(crate) fn __reduce347< @@ -23485,7 +23507,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExceptClause = "except", Test<"all">, "as", Identifier, ":", Suite => ActionFn(1174); + // ExceptClause = "except", Test<"all">, "as", Identifier, ":", Suite => ActionFn(1172); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant24(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -23495,8 +23517,8 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1174::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); - __symbols.push((__start, __Symbol::Variant65(__nt), __end)); + let __nt = super::__action1172::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + __symbols.push((__start, __Symbol::Variant67(__nt), __end)); (6, 131) } pub(crate) fn __reduce348< @@ -23508,11 +23530,11 @@ mod __parse__Top { ) -> (usize, usize) { // ExceptClause+ = ExceptClause => ActionFn(310); - let __sym0 = __pop_Variant65(__symbols); + let __sym0 = __pop_Variant67(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action310::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant66(__nt), __end)); + __symbols.push((__start, __Symbol::Variant68(__nt), __end)); (1, 132) } pub(crate) fn __reduce349< @@ -23525,12 +23547,12 @@ mod __parse__Top { { // ExceptClause+ = ExceptClause+, ExceptClause => ActionFn(311); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant65(__symbols); - let __sym0 = __pop_Variant66(__symbols); + let __sym1 = __pop_Variant67(__symbols); + let __sym0 = __pop_Variant68(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action311::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant66(__nt), __end)); + __symbols.push((__start, __Symbol::Variant68(__nt), __end)); (2, 132) } pub(crate) fn __reduce350< @@ -23541,7 +23563,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExceptStarClause = "except", "*", Test<"all">, ":", Suite => ActionFn(769); + // ExceptStarClause = "except", "*", Test<"all">, ":", Suite => ActionFn(771); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant24(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -23550,8 +23572,8 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action769::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); - __symbols.push((__start, __Symbol::Variant65(__nt), __end)); + let __nt = super::__action771::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant67(__nt), __end)); (5, 133) } pub(crate) fn __reduce351< @@ -23562,7 +23584,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExceptStarClause = "except", "*", Test<"all">, "as", Identifier, ":", Suite => ActionFn(1175); + // ExceptStarClause = "except", "*", Test<"all">, "as", Identifier, ":", Suite => ActionFn(1173); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -23573,8 +23595,8 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1175::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); - __symbols.push((__start, __Symbol::Variant65(__nt), __end)); + let __nt = super::__action1173::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + __symbols.push((__start, __Symbol::Variant67(__nt), __end)); (7, 133) } pub(crate) fn __reduce352< @@ -23586,11 +23608,11 @@ mod __parse__Top { ) -> (usize, usize) { // ExceptStarClause+ = ExceptStarClause => ActionFn(305); - let __sym0 = __pop_Variant65(__symbols); + let __sym0 = __pop_Variant67(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action305::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant66(__nt), __end)); + __symbols.push((__start, __Symbol::Variant68(__nt), __end)); (1, 134) } pub(crate) fn __reduce353< @@ -23603,12 +23625,12 @@ mod __parse__Top { { // ExceptStarClause+ = ExceptStarClause+, ExceptStarClause => ActionFn(306); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant65(__symbols); - let __sym0 = __pop_Variant66(__symbols); + let __sym1 = __pop_Variant67(__symbols); + let __sym0 = __pop_Variant68(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action306::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant66(__nt), __end)); + __symbols.push((__start, __Symbol::Variant68(__nt), __end)); (2, 134) } pub(crate) fn __reduce354< @@ -23619,14 +23641,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Expression<"all"> = Expression<"all">, "|", XorExpression<"all"> => ActionFn(1257); + // Expression<"all"> = Expression<"all">, "|", XorExpression<"all"> => ActionFn(1269); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1257::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1269::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 135) } @@ -23654,14 +23676,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Expression<"no-withitems"> = Expression<"all">, "|", XorExpression<"all"> => ActionFn(1258); + // Expression<"no-withitems"> = Expression<"all">, "|", XorExpression<"all"> => ActionFn(1270); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1258::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1270::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 136) } @@ -23787,11 +23809,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = GenericList => ActionFn(1701); + // ExpressionStatement = GenericList => ActionFn(1697); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1701::<>(mode, __sym0); + let __nt = super::__action1697::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (1, 141) } @@ -23803,13 +23825,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = GenericList, AssignSuffix+ => ActionFn(1702); + // ExpressionStatement = GenericList, AssignSuffix+ => ActionFn(1698); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant16(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1702::<>(mode, __sym0, __sym1); + let __nt = super::__action1698::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (2, 141) } @@ -23821,14 +23843,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = GenericList, AugAssign, TestListOrYieldExpr => ActionFn(1703); + // ExpressionStatement = GenericList, AugAssign, TestListOrYieldExpr => ActionFn(1699); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); - let __sym1 = __pop_Variant48(__symbols); + let __sym1 = __pop_Variant50(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1703::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1699::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (3, 141) } @@ -23840,7 +23862,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = Test<"all">, ":", Test<"all">, AssignSuffix => ActionFn(1496); + // ExpressionStatement = Test<"all">, ":", Test<"all">, AssignSuffix => ActionFn(1492); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant14(__symbols); let __sym2 = __pop_Variant14(__symbols); @@ -23848,7 +23870,7 @@ mod __parse__Top { let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1496::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1492::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 141) } @@ -23860,14 +23882,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = Test<"all">, ":", Test<"all"> => ActionFn(1497); + // ExpressionStatement = Test<"all">, ":", Test<"all"> => ActionFn(1493); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1497::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1493::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (3, 141) } @@ -23879,13 +23901,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Factor<"all"> = UnaryOp, Factor<"all"> => ActionFn(1262); + // Factor<"all"> = UnaryOp, Factor<"all"> => ActionFn(1274); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); - let __sym0 = __pop_Variant94(__symbols); + let __sym0 = __pop_Variant96(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1262::<>(mode, __sym0, __sym1); + let __nt = super::__action1274::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 142) } @@ -23913,13 +23935,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Factor<"no-withitems"> = UnaryOp, Factor<"all"> => ActionFn(1263); + // Factor<"no-withitems"> = UnaryOp, Factor<"all"> => ActionFn(1275); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); - let __sym0 = __pop_Variant94(__symbols); + let __sym0 = __pop_Variant96(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1263::<>(mode, __sym0, __sym1); + let __nt = super::__action1275::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 143) } @@ -23947,11 +23969,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FlowStatement = "break" => ActionFn(1264); + // FlowStatement = "break" => ActionFn(1276); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1264::<>(mode, __sym0); + let __nt = super::__action1276::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (1, 144) } @@ -23963,11 +23985,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FlowStatement = "continue" => ActionFn(1265); + // FlowStatement = "continue" => ActionFn(1277); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1265::<>(mode, __sym0); + let __nt = super::__action1277::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (1, 144) } @@ -23979,13 +24001,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FlowStatement = "return", GenericList => ActionFn(1697); + // FlowStatement = "return", GenericList => ActionFn(1693); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1697::<>(mode, __sym0, __sym1); + let __nt = super::__action1693::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (2, 144) } @@ -23997,11 +24019,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FlowStatement = "return" => ActionFn(1698); + // FlowStatement = "return" => ActionFn(1694); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1698::<>(mode, __sym0); + let __nt = super::__action1694::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (1, 144) } @@ -24013,11 +24035,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FlowStatement = YieldExpr => ActionFn(1267); + // FlowStatement = YieldExpr => ActionFn(1279); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1267::<>(mode, __sym0); + let __nt = super::__action1279::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (1, 144) } @@ -24045,7 +24067,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ForStatement = "async", "for", ExpressionList, "in", GenericList, ":", Suite, "else", ":", Suite => ActionFn(1688); + // ForStatement = "async", "for", ExpressionList, "in", GenericList, ":", Suite, "else", ":", Suite => ActionFn(1684); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant24(__symbols); let __sym8 = __pop_Variant0(__symbols); @@ -24059,7 +24081,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = super::__action1688::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); + let __nt = super::__action1684::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (10, 145) } @@ -24071,7 +24093,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ForStatement = "async", "for", ExpressionList, "in", GenericList, ":", Suite => ActionFn(1689); + // ForStatement = "async", "for", ExpressionList, "in", GenericList, ":", Suite => ActionFn(1685); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -24082,7 +24104,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1689::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1685::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 145) } @@ -24094,7 +24116,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ForStatement = "for", ExpressionList, "in", GenericList, ":", Suite, "else", ":", Suite => ActionFn(1690); + // ForStatement = "for", ExpressionList, "in", GenericList, ":", Suite, "else", ":", Suite => ActionFn(1686); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant24(__symbols); let __sym7 = __pop_Variant0(__symbols); @@ -24107,7 +24129,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = super::__action1690::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); + let __nt = super::__action1686::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (9, 145) } @@ -24119,7 +24141,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ForStatement = "for", ExpressionList, "in", GenericList, ":", Suite => ActionFn(1691); + // ForStatement = "for", ExpressionList, "in", GenericList, ":", Suite => ActionFn(1687); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant24(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -24129,7 +24151,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1691::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1687::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (6, 145) } @@ -24141,20 +24163,20 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "async", "def", Identifier, TypeParams, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1712); + // FuncDef = "async", "def", Identifier, TypeParams, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1708); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant24(__symbols); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant14(__symbols); let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant45(__symbols); - let __sym3 = __pop_Variant92(__symbols); + let __sym4 = __pop_Variant47(__symbols); + let __sym3 = __pop_Variant94(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = super::__action1712::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); + let __nt = super::__action1708::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (9, 146) } @@ -24166,19 +24188,19 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "async", "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1713); + // FuncDef = "async", "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1709); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant24(__symbols); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant14(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant45(__symbols); + let __sym3 = __pop_Variant47(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action1713::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action1709::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (8, 146) } @@ -24190,21 +24212,21 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "async", "def", Identifier, TypeParams, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1714); + // FuncDef = Decorator+, "async", "def", Identifier, TypeParams, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1710); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant24(__symbols); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant14(__symbols); let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant45(__symbols); - let __sym4 = __pop_Variant92(__symbols); + let __sym5 = __pop_Variant47(__symbols); + let __sym4 = __pop_Variant94(__symbols); let __sym3 = __pop_Variant22(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = super::__action1714::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); + let __nt = super::__action1710::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (10, 146) } @@ -24216,20 +24238,20 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "async", "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1715); + // FuncDef = Decorator+, "async", "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1711); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant24(__symbols); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant14(__symbols); let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant45(__symbols); + let __sym4 = __pop_Variant47(__symbols); let __sym3 = __pop_Variant22(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = super::__action1715::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); + let __nt = super::__action1711::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (9, 146) } @@ -24241,18 +24263,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "async", "def", Identifier, TypeParams, Parameters, ":", Suite => ActionFn(1716); + // FuncDef = "async", "def", Identifier, TypeParams, Parameters, ":", Suite => ActionFn(1712); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant45(__symbols); - let __sym3 = __pop_Variant92(__symbols); + let __sym4 = __pop_Variant47(__symbols); + let __sym3 = __pop_Variant94(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1716::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1712::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 146) } @@ -24264,17 +24286,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "async", "def", Identifier, Parameters, ":", Suite => ActionFn(1717); + // FuncDef = "async", "def", Identifier, Parameters, ":", Suite => ActionFn(1713); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant24(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant45(__symbols); + let __sym3 = __pop_Variant47(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1717::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1713::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (6, 146) } @@ -24286,19 +24308,19 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "async", "def", Identifier, TypeParams, Parameters, ":", Suite => ActionFn(1718); + // FuncDef = Decorator+, "async", "def", Identifier, TypeParams, Parameters, ":", Suite => ActionFn(1714); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant24(__symbols); let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant45(__symbols); - let __sym4 = __pop_Variant92(__symbols); + let __sym5 = __pop_Variant47(__symbols); + let __sym4 = __pop_Variant94(__symbols); let __sym3 = __pop_Variant22(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action1718::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action1714::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (8, 146) } @@ -24310,18 +24332,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "async", "def", Identifier, Parameters, ":", Suite => ActionFn(1719); + // FuncDef = Decorator+, "async", "def", Identifier, Parameters, ":", Suite => ActionFn(1715); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant45(__symbols); + let __sym4 = __pop_Variant47(__symbols); let __sym3 = __pop_Variant22(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1719::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1715::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 146) } @@ -24333,19 +24355,19 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "def", Identifier, TypeParams, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1720); + // FuncDef = "def", Identifier, TypeParams, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1716); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant24(__symbols); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant14(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant45(__symbols); - let __sym2 = __pop_Variant92(__symbols); + let __sym3 = __pop_Variant47(__symbols); + let __sym2 = __pop_Variant94(__symbols); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action1720::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action1716::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (8, 146) } @@ -24357,18 +24379,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1721); + // FuncDef = "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1717); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant14(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant45(__symbols); + let __sym2 = __pop_Variant47(__symbols); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1721::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1717::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 146) } @@ -24380,20 +24402,20 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "def", Identifier, TypeParams, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1722); + // FuncDef = Decorator+, "def", Identifier, TypeParams, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1718); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant24(__symbols); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant14(__symbols); let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant45(__symbols); - let __sym3 = __pop_Variant92(__symbols); + let __sym4 = __pop_Variant47(__symbols); + let __sym3 = __pop_Variant94(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = super::__action1722::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); + let __nt = super::__action1718::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (9, 146) } @@ -24405,19 +24427,19 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1723); + // FuncDef = Decorator+, "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1719); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant24(__symbols); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant14(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant45(__symbols); + let __sym3 = __pop_Variant47(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action1723::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action1719::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (8, 146) } @@ -24429,17 +24451,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "def", Identifier, TypeParams, Parameters, ":", Suite => ActionFn(1724); + // FuncDef = "def", Identifier, TypeParams, Parameters, ":", Suite => ActionFn(1720); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant24(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant45(__symbols); - let __sym2 = __pop_Variant92(__symbols); + let __sym3 = __pop_Variant47(__symbols); + let __sym2 = __pop_Variant94(__symbols); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1724::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1720::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (6, 146) } @@ -24451,16 +24473,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "def", Identifier, Parameters, ":", Suite => ActionFn(1725); + // FuncDef = "def", Identifier, Parameters, ":", Suite => ActionFn(1721); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant24(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant45(__symbols); + let __sym2 = __pop_Variant47(__symbols); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1725::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1721::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (5, 146) } @@ -24472,18 +24494,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "def", Identifier, TypeParams, Parameters, ":", Suite => ActionFn(1726); + // FuncDef = Decorator+, "def", Identifier, TypeParams, Parameters, ":", Suite => ActionFn(1722); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant45(__symbols); - let __sym3 = __pop_Variant92(__symbols); + let __sym4 = __pop_Variant47(__symbols); + let __sym3 = __pop_Variant94(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1726::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1722::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 146) } @@ -24495,17 +24517,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "def", Identifier, Parameters, ":", Suite => ActionFn(1727); + // FuncDef = Decorator+, "def", Identifier, Parameters, ":", Suite => ActionFn(1723); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant24(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant45(__symbols); + let __sym3 = __pop_Variant47(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant58(__symbols); + let __sym0 = __pop_Variant60(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1727::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1723::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (6, 146) } @@ -24517,13 +24539,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FunctionArgument = NamedExpressionTest, CompFor => ActionFn(1514); + // FunctionArgument = NamedExpressionTest, CompFor => ActionFn(1510); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant53(__symbols); + let __sym1 = __pop_Variant55(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1514::<>(mode, __sym0, __sym1); + let __nt = super::__action1510::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant30(__nt), __end)); (2, 147) } @@ -24535,11 +24557,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FunctionArgument = NamedExpressionTest => ActionFn(1515); + // FunctionArgument = NamedExpressionTest => ActionFn(1511); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1515::<>(mode, __sym0); + let __nt = super::__action1511::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant30(__nt), __end)); (1, 147) } @@ -24551,14 +24573,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FunctionArgument = Identifier, "=", Test<"all"> => ActionFn(1269); + // FunctionArgument = Identifier, "=", Test<"all"> => ActionFn(1281); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1269::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1281::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant30(__nt), __end)); (3, 147) } @@ -24570,13 +24592,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FunctionArgument = "*", Test<"all"> => ActionFn(1270); + // FunctionArgument = "*", Test<"all"> => ActionFn(1282); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1270::<>(mode, __sym0, __sym1); + let __nt = super::__action1282::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant30(__nt), __end)); (2, 147) } @@ -24588,13 +24610,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FunctionArgument = "**", Test<"all"> => ActionFn(1271); + // FunctionArgument = "**", Test<"all"> => ActionFn(1283); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1271::<>(mode, __sym0, __sym1); + let __nt = super::__action1283::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant30(__nt), __end)); (2, 147) } @@ -24611,7 +24633,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action441::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant67(__nt), __end)); + __symbols.push((__start, __Symbol::Variant69(__nt), __end)); (1, 148) } pub(crate) fn __reduce405< @@ -24626,7 +24648,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action442::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant67(__nt), __end)); + __symbols.push((__start, __Symbol::Variant69(__nt), __end)); (0, 148) } pub(crate) fn __reduce406< @@ -24637,13 +24659,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // GenericList = OneOrMore, "," => ActionFn(1272); + // GenericList = OneOrMore, "," => ActionFn(1284); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1272::<>(mode, __sym0, __sym1); + let __nt = super::__action1284::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 149) } @@ -24655,11 +24677,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // GenericList = OneOrMore => ActionFn(1273); + // GenericList = OneOrMore => ActionFn(1285); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1273::<>(mode, __sym0); + let __nt = super::__action1285::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 149) } @@ -24671,13 +24693,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // GenericList = OneOrMore, "," => ActionFn(1274); + // GenericList = OneOrMore, "," => ActionFn(1286); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1274::<>(mode, __sym0, __sym1); + let __nt = super::__action1286::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 150) } @@ -24689,11 +24711,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // GenericList = OneOrMore => ActionFn(1275); + // GenericList = OneOrMore => ActionFn(1287); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1275::<>(mode, __sym0); + let __nt = super::__action1287::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 150) } @@ -24705,13 +24727,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // GlobalStatement = "global", OneOrMore => ActionFn(1276); + // GlobalStatement = "global", OneOrMore => ActionFn(1288); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant77(__symbols); + let __sym1 = __pop_Variant79(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1276::<>(mode, __sym0, __sym1); + let __nt = super::__action1288::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (2, 151) } @@ -24730,7 +24752,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action89::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (2, 152) } pub(crate) fn __reduce412< @@ -24741,11 +24763,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Identifier = name => ActionFn(1277); + // Identifier = name => ActionFn(1289); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1277::<>(mode, __sym0); + let __nt = super::__action1289::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant22(__nt), __end)); (1, 153) } @@ -24757,7 +24779,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // IfStatement = "if", NamedExpressionTest, ":", Suite, "else", ":", Suite => ActionFn(1123); + // IfStatement = "if", NamedExpressionTest, ":", Suite, "else", ":", Suite => ActionFn(1121); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -24768,7 +24790,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1123::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1121::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 154) } @@ -24780,7 +24802,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // IfStatement = "if", NamedExpressionTest, ":", Suite => ActionFn(1124); + // IfStatement = "if", NamedExpressionTest, ":", Suite => ActionFn(1122); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant24(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -24788,7 +24810,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1124::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1122::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 154) } @@ -24800,7 +24822,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // IfStatement = "if", NamedExpressionTest, ":", Suite, (<@L> "elif" ":" )+, "else", ":", Suite => ActionFn(1125); + // IfStatement = "if", NamedExpressionTest, ":", Suite, (<@L> "elif" ":" )+, "else", ":", Suite => ActionFn(1123); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant24(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -24812,7 +24834,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action1125::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action1123::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (8, 154) } @@ -24824,7 +24846,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // IfStatement = "if", NamedExpressionTest, ":", Suite, (<@L> "elif" ":" )+ => ActionFn(1126); + // IfStatement = "if", NamedExpressionTest, ":", Suite, (<@L> "elif" ":" )+ => ActionFn(1124); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant27(__symbols); let __sym3 = __pop_Variant24(__symbols); @@ -24833,7 +24855,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1126::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1124::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (5, 154) } @@ -24845,15 +24867,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportAsAlias = DottedName, "as", Identifier => ActionFn(1278); + // ImportAsAlias = DottedName, "as", Identifier => ActionFn(1290); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1278::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant68(__nt), __end)); + let __nt = super::__action1290::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant70(__nt), __end)); (3, 155) } pub(crate) fn __reduce418< @@ -24864,12 +24886,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportAsAlias = DottedName => ActionFn(1279); + // ImportAsAlias = DottedName => ActionFn(1291); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1279::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant68(__nt), __end)); + let __nt = super::__action1291::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant70(__nt), __end)); (1, 155) } pub(crate) fn __reduce419< @@ -24880,15 +24902,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportAsAlias = Identifier, "as", Identifier => ActionFn(1280); + // ImportAsAlias = Identifier, "as", Identifier => ActionFn(1292); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1280::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant68(__nt), __end)); + let __nt = super::__action1292::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant70(__nt), __end)); (3, 156) } pub(crate) fn __reduce420< @@ -24899,12 +24921,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportAsAlias = Identifier => ActionFn(1281); + // ImportAsAlias = Identifier => ActionFn(1293); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1281::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant68(__nt), __end)); + let __nt = super::__action1293::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant70(__nt), __end)); (1, 156) } pub(crate) fn __reduce421< @@ -24915,12 +24937,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportAsNames = OneOrMore> => ActionFn(1282); - let __sym0 = __pop_Variant69(__symbols); + // ImportAsNames = OneOrMore> => ActionFn(1294); + let __sym0 = __pop_Variant71(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1282::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1294::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (1, 157) } pub(crate) fn __reduce422< @@ -24931,16 +24953,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportAsNames = "(", OneOrMore>, ",", ")" => ActionFn(1283); + // ImportAsNames = "(", OneOrMore>, ",", ")" => ActionFn(1295); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant69(__symbols); + let __sym1 = __pop_Variant71(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1283::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1295::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (4, 157) } pub(crate) fn __reduce423< @@ -24951,15 +24973,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportAsNames = "(", OneOrMore>, ")" => ActionFn(1284); + // ImportAsNames = "(", OneOrMore>, ")" => ActionFn(1296); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant69(__symbols); + let __sym1 = __pop_Variant71(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1284::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1296::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (3, 157) } pub(crate) fn __reduce424< @@ -24970,12 +24992,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportAsNames = "*" => ActionFn(1285); + // ImportAsNames = "*" => ActionFn(1297); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1285::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1297::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (1, 157) } pub(crate) fn __reduce425< @@ -24991,7 +25013,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action64::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant70(__nt), __end)); + __symbols.push((__start, __Symbol::Variant72(__nt), __end)); (1, 158) } pub(crate) fn __reduce426< @@ -25007,7 +25029,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action65::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant70(__nt), __end)); + __symbols.push((__start, __Symbol::Variant72(__nt), __end)); (1, 158) } pub(crate) fn __reduce427< @@ -25022,7 +25044,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action367::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant71(__nt), __end)); + __symbols.push((__start, __Symbol::Variant73(__nt), __end)); (0, 159) } pub(crate) fn __reduce428< @@ -25034,11 +25056,11 @@ mod __parse__Top { ) -> (usize, usize) { // ImportDots* = ImportDots+ => ActionFn(368); - let __sym0 = __pop_Variant71(__symbols); + let __sym0 = __pop_Variant73(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action368::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant71(__nt), __end)); + __symbols.push((__start, __Symbol::Variant73(__nt), __end)); (1, 159) } pub(crate) fn __reduce429< @@ -25050,11 +25072,11 @@ mod __parse__Top { ) -> (usize, usize) { // ImportDots+ = ImportDots => ActionFn(365); - let __sym0 = __pop_Variant70(__symbols); + let __sym0 = __pop_Variant72(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action365::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant71(__nt), __end)); + __symbols.push((__start, __Symbol::Variant73(__nt), __end)); (1, 160) } pub(crate) fn __reduce430< @@ -25067,12 +25089,12 @@ mod __parse__Top { { // ImportDots+ = ImportDots+, ImportDots => ActionFn(366); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant70(__symbols); - let __sym0 = __pop_Variant71(__symbols); + let __sym1 = __pop_Variant72(__symbols); + let __sym0 = __pop_Variant73(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action366::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant71(__nt), __end)); + __symbols.push((__start, __Symbol::Variant73(__nt), __end)); (2, 160) } pub(crate) fn __reduce431< @@ -25083,12 +25105,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportFromLocation = DottedName => ActionFn(1546); + // ImportFromLocation = DottedName => ActionFn(1542); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1546::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant72(__nt), __end)); + let __nt = super::__action1542::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant74(__nt), __end)); (1, 161) } pub(crate) fn __reduce432< @@ -25099,14 +25121,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportFromLocation = ImportDots+, DottedName => ActionFn(1547); + // ImportFromLocation = ImportDots+, DottedName => ActionFn(1543); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant22(__symbols); - let __sym0 = __pop_Variant71(__symbols); + let __sym0 = __pop_Variant73(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1547::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant72(__nt), __end)); + let __nt = super::__action1543::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant74(__nt), __end)); (2, 161) } pub(crate) fn __reduce433< @@ -25118,11 +25140,11 @@ mod __parse__Top { ) -> (usize, usize) { // ImportFromLocation = ImportDots+ => ActionFn(63); - let __sym0 = __pop_Variant71(__symbols); + let __sym0 = __pop_Variant73(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action63::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant72(__nt), __end)); + __symbols.push((__start, __Symbol::Variant74(__nt), __end)); (1, 161) } pub(crate) fn __reduce434< @@ -25133,13 +25155,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportStatement = "import", OneOrMore> => ActionFn(1286); + // ImportStatement = "import", OneOrMore> => ActionFn(1298); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant69(__symbols); + let __sym1 = __pop_Variant71(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1286::<>(mode, __sym0, __sym1); + let __nt = super::__action1298::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (2, 162) } @@ -25151,15 +25173,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportStatement = "from", ImportFromLocation, "import", ImportAsNames => ActionFn(1287); + // ImportStatement = "from", ImportFromLocation, "import", ImportAsNames => ActionFn(1299); assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant69(__symbols); + let __sym3 = __pop_Variant71(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant72(__symbols); + let __sym1 = __pop_Variant74(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1287::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1299::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 162) } @@ -25171,13 +25193,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // KwargParameter = "**", DoubleStarTypedParameter => ActionFn(1536); + // KwargParameter = "**", DoubleStarTypedParameter => ActionFn(1532); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1536::<>(mode, __sym0, __sym1); + let __nt = super::__action1532::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); (2, 166) } @@ -25189,11 +25211,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // KwargParameter = "**" => ActionFn(1537); + // KwargParameter = "**" => ActionFn(1533); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1537::<>(mode, __sym0); + let __nt = super::__action1533::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); (1, 166) } @@ -25205,13 +25227,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // KwargParameter = "**", StarUntypedParameter => ActionFn(987); + // KwargParameter = "**", StarUntypedParameter => ActionFn(985); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant63(__symbols); + let __sym1 = __pop_Variant65(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action987::<>(mode, __sym0, __sym1); + let __nt = super::__action985::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); (2, 167) } @@ -25223,11 +25245,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // KwargParameter = "**" => ActionFn(988); + // KwargParameter = "**" => ActionFn(986); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action988::<>(mode, __sym0); + let __nt = super::__action986::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); (1, 167) } @@ -25304,11 +25326,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // LiteralPattern = "None" => ActionFn(1292); + // LiteralPattern = "None" => ActionFn(1304); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1292::<>(mode, __sym0); + let __nt = super::__action1304::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (1, 171) } @@ -25320,11 +25342,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // LiteralPattern = "True" => ActionFn(1293); + // LiteralPattern = "True" => ActionFn(1305); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1293::<>(mode, __sym0); + let __nt = super::__action1305::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (1, 171) } @@ -25336,11 +25358,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // LiteralPattern = "False" => ActionFn(1294); + // LiteralPattern = "False" => ActionFn(1306); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1294::<>(mode, __sym0); + let __nt = super::__action1306::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (1, 171) } @@ -25352,11 +25374,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // LiteralPattern = ConstantExpr => ActionFn(1295); + // LiteralPattern = ConstantExpr => ActionFn(1307); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1295::<>(mode, __sym0); + let __nt = super::__action1307::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (1, 171) } @@ -25368,11 +25390,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // LiteralPattern = AddOpExpr => ActionFn(1296); + // LiteralPattern = AddOpExpr => ActionFn(1308); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1296::<>(mode, __sym0); + let __nt = super::__action1308::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (1, 171) } @@ -25384,12 +25406,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingKey = ConstantExpr => ActionFn(126); - let __sym0 = __pop_Variant14(__symbols); + // MappingKey = MatchNameOrAttr => ActionFn(126); + let __sym0 = __pop_Variant45(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action126::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 172) } pub(crate) fn __reduce456< @@ -25400,12 +25422,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingKey = AddOpExpr => ActionFn(127); + // MappingKey = ConstantExpr => ActionFn(127); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action127::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 172) } pub(crate) fn __reduce457< @@ -25416,12 +25438,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingKey = MatchNameOrAttr => ActionFn(128); + // MappingKey = AddOpExpr => ActionFn(128); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action128::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 172) } pub(crate) fn __reduce458< @@ -25432,12 +25454,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingKey = "None" => ActionFn(1298); + // MappingKey = "None" => ActionFn(1310); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1298::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + let __nt = super::__action1310::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 172) } pub(crate) fn __reduce459< @@ -25448,12 +25470,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingKey = "True" => ActionFn(1299); + // MappingKey = "True" => ActionFn(1311); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1299::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + let __nt = super::__action1311::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 172) } pub(crate) fn __reduce460< @@ -25464,12 +25486,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingKey = "False" => ActionFn(1300); + // MappingKey = "False" => ActionFn(1312); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1300::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + let __nt = super::__action1312::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 172) } pub(crate) fn __reduce462< @@ -25480,13 +25502,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingPattern = "{", "}" => ActionFn(1301); + // MappingPattern = "{", "}" => ActionFn(1313); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1301::<>(mode, __sym0, __sym1); + let __nt = super::__action1313::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (2, 173) } @@ -25498,15 +25520,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingPattern = "{", OneOrMore, ",", "}" => ActionFn(1302); + // MappingPattern = "{", OneOrMore, ",", "}" => ActionFn(1314); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant79(__symbols); + let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1302::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1314::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (4, 173) } @@ -25518,14 +25540,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingPattern = "{", OneOrMore, "}" => ActionFn(1303); + // MappingPattern = "{", OneOrMore, "}" => ActionFn(1315); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant79(__symbols); + let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1303::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1315::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (3, 173) } @@ -25537,7 +25559,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingPattern = "{", "**", Identifier, ",", "}" => ActionFn(1304); + // MappingPattern = "{", "**", Identifier, ",", "}" => ActionFn(1316); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -25546,7 +25568,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1304::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1316::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (5, 173) } @@ -25558,7 +25580,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingPattern = "{", "**", Identifier, "}" => ActionFn(1305); + // MappingPattern = "{", "**", Identifier, "}" => ActionFn(1317); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant22(__symbols); @@ -25566,7 +25588,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1305::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1317::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (4, 173) } @@ -25578,18 +25600,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingPattern = "{", OneOrMore, ",", "**", Identifier, ",", "}" => ActionFn(1306); + // MappingPattern = "{", OneOrMore, ",", "**", Identifier, ",", "}" => ActionFn(1318); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant22(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant79(__symbols); + let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1306::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1318::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (7, 173) } @@ -25601,17 +25623,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MappingPattern = "{", OneOrMore, ",", "**", Identifier, "}" => ActionFn(1307); + // MappingPattern = "{", OneOrMore, ",", "**", Identifier, "}" => ActionFn(1319); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant22(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant79(__symbols); + let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1307::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1319::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (6, 173) } @@ -25623,17 +25645,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchCase = "case", Patterns, Guard, ":", Suite => ActionFn(1487); + // MatchCase = "case", Patterns, Guard, ":", Suite => ActionFn(1483); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant24(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant14(__symbols); + let __sym2 = __pop_Variant45(__symbols); let __sym1 = __pop_Variant34(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1487::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); - __symbols.push((__start, __Symbol::Variant73(__nt), __end)); + let __nt = super::__action1483::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant75(__nt), __end)); (5, 174) } pub(crate) fn __reduce470< @@ -25644,7 +25666,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchCase = "case", Patterns, ":", Suite => ActionFn(1488); + // MatchCase = "case", Patterns, ":", Suite => ActionFn(1484); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant24(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -25652,8 +25674,8 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1488::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant73(__nt), __end)); + let __nt = super::__action1484::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant75(__nt), __end)); (4, 174) } pub(crate) fn __reduce471< @@ -25665,11 +25687,11 @@ mod __parse__Top { ) -> (usize, usize) { // MatchCase+ = MatchCase => ActionFn(345); - let __sym0 = __pop_Variant73(__symbols); + let __sym0 = __pop_Variant75(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action345::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant74(__nt), __end)); + __symbols.push((__start, __Symbol::Variant76(__nt), __end)); (1, 175) } pub(crate) fn __reduce472< @@ -25682,12 +25704,12 @@ mod __parse__Top { { // MatchCase+ = MatchCase+, MatchCase => ActionFn(346); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant73(__symbols); - let __sym0 = __pop_Variant74(__symbols); + let __sym1 = __pop_Variant75(__symbols); + let __sym0 = __pop_Variant76(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action346::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant74(__nt), __end)); + __symbols.push((__start, __Symbol::Variant76(__nt), __end)); (2, 175) } pub(crate) fn __reduce473< @@ -25698,15 +25720,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchKeywordEntry = Identifier, "=", Pattern => ActionFn(1308); + // MatchKeywordEntry = Identifier, "=", Pattern => ActionFn(1320); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant34(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1308::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant75(__nt), __end)); + let __nt = super::__action1320::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant77(__nt), __end)); (3, 176) } pub(crate) fn __reduce474< @@ -25721,11 +25743,11 @@ mod __parse__Top { assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant34(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant14(__symbols); + let __sym0 = __pop_Variant45(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action133::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant76(__nt), __end)); + __symbols.push((__start, __Symbol::Variant78(__nt), __end)); (3, 177) } pub(crate) fn __reduce475< @@ -25736,12 +25758,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchName = Identifier => ActionFn(1309); + // MatchName = Identifier => ActionFn(1321); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1309::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + let __nt = super::__action1321::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 178) } pub(crate) fn __reduce476< @@ -25752,15 +25774,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchNameOrAttr = MatchName, ".", Identifier => ActionFn(1310); + // MatchNameOrAttr = MatchName, ".", Identifier => ActionFn(1322); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant14(__symbols); + let __sym0 = __pop_Variant45(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1310::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + let __nt = super::__action1322::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (3, 179) } pub(crate) fn __reduce477< @@ -25771,15 +25793,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchNameOrAttr = MatchNameOrAttr, ".", Identifier => ActionFn(1311); + // MatchNameOrAttr = MatchNameOrAttr, ".", Identifier => ActionFn(1323); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant14(__symbols); + let __sym0 = __pop_Variant45(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1311::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + let __nt = super::__action1323::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (3, 179) } pub(crate) fn __reduce478< @@ -25790,10 +25812,10 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchStatement = "match", TestOrStarNamedExpr, ":", "\n", Indent, MatchCase+, Dedent => ActionFn(831); + // MatchStatement = "match", TestOrStarNamedExpr, ":", "\n", Indent, MatchCase+, Dedent => ActionFn(833); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant74(__symbols); + let __sym5 = __pop_Variant76(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -25801,7 +25823,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action831::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action833::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 180) } @@ -25813,10 +25835,10 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchStatement = "match", TestOrStarNamedExpr, ",", ":", "\n", Indent, MatchCase+, Dedent => ActionFn(832); + // MatchStatement = "match", TestOrStarNamedExpr, ",", ":", "\n", Indent, MatchCase+, Dedent => ActionFn(834); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant74(__symbols); + let __sym6 = __pop_Variant76(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -25825,7 +25847,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action832::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action834::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (8, 180) } @@ -25837,10 +25859,10 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchStatement = "match", TwoOrMore, ",", ":", "\n", Indent, MatchCase+, Dedent => ActionFn(833); + // MatchStatement = "match", TwoOrMore, ",", ":", "\n", Indent, MatchCase+, Dedent => ActionFn(835); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); - let __sym6 = __pop_Variant74(__symbols); + let __sym6 = __pop_Variant76(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -25849,7 +25871,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action833::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action835::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (8, 180) } @@ -25861,10 +25883,10 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchStatement = "match", TwoOrMore, ":", "\n", Indent, MatchCase+, Dedent => ActionFn(834); + // MatchStatement = "match", TwoOrMore, ":", "\n", Indent, MatchCase+, Dedent => ActionFn(836); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant74(__symbols); + let __sym5 = __pop_Variant76(__symbols); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -25872,7 +25894,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action834::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action836::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 180) } @@ -25889,7 +25911,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action198::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 181) } pub(crate) fn __reduce483< @@ -25905,7 +25927,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action199::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 181) } pub(crate) fn __reduce484< @@ -25921,7 +25943,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action200::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 181) } pub(crate) fn __reduce485< @@ -25937,7 +25959,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action201::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 181) } pub(crate) fn __reduce486< @@ -25953,7 +25975,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action202::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 181) } pub(crate) fn __reduce487< @@ -25964,14 +25986,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // NamedExpression = NamedExpressionName, ":=", Test<"all"> => ActionFn(1312); + // NamedExpression = NamedExpressionName, ":=", Test<"all"> => ActionFn(1324); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1312::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1324::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 182) } @@ -25983,11 +26005,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // NamedExpressionName = Identifier => ActionFn(1313); + // NamedExpressionName = Identifier => ActionFn(1325); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1313::<>(mode, __sym0); + let __nt = super::__action1325::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 183) } @@ -26063,13 +26085,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // NonlocalStatement = "nonlocal", OneOrMore => ActionFn(1314); + // NonlocalStatement = "nonlocal", OneOrMore => ActionFn(1326); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant77(__symbols); + let __sym1 = __pop_Variant79(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1314::<>(mode, __sym0, __sym1); + let __nt = super::__action1326::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (2, 186) } @@ -26081,13 +26103,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // NotTest<"all"> = "not", NotTest<"all"> => ActionFn(1315); + // NotTest<"all"> = "not", NotTest<"all"> => ActionFn(1327); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1315::<>(mode, __sym0, __sym1); + let __nt = super::__action1327::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 187) } @@ -26115,13 +26137,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // NotTest<"no-withitems"> = "not", NotTest<"all"> => ActionFn(1316); + // NotTest<"no-withitems"> = "not", NotTest<"all"> => ActionFn(1328); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1316::<>(mode, __sym0, __sym1); + let __nt = super::__action1328::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 188) } @@ -26150,11 +26172,11 @@ mod __parse__Top { ) -> (usize, usize) { // OneOrMore = DictElement => ActionFn(250); - let __sym0 = __pop_Variant59(__symbols); + let __sym0 = __pop_Variant61(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action250::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant61(__nt), __end)); + __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (1, 189) } pub(crate) fn __reduce499< @@ -26167,13 +26189,13 @@ mod __parse__Top { { // OneOrMore = OneOrMore, ",", DictElement => ActionFn(251); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant59(__symbols); + let __sym2 = __pop_Variant61(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant61(__symbols); + let __sym0 = __pop_Variant63(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action251::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant61(__nt), __end)); + __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (3, 189) } pub(crate) fn __reduce500< @@ -26224,7 +26246,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action355::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant77(__nt), __end)); + __symbols.push((__start, __Symbol::Variant79(__nt), __end)); (1, 191) } pub(crate) fn __reduce503< @@ -26239,11 +26261,11 @@ mod __parse__Top { assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant77(__symbols); + let __sym0 = __pop_Variant79(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action356::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant77(__nt), __end)); + __symbols.push((__start, __Symbol::Variant79(__nt), __end)); (3, 191) } pub(crate) fn __reduce504< @@ -26254,15 +26276,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = DottedName, "as", Identifier => ActionFn(1538); + // OneOrMore> = DottedName, "as", Identifier => ActionFn(1534); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1538::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1534::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (3, 192) } pub(crate) fn __reduce505< @@ -26273,12 +26295,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = DottedName => ActionFn(1539); + // OneOrMore> = DottedName => ActionFn(1535); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1539::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1535::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (1, 192) } pub(crate) fn __reduce506< @@ -26289,17 +26311,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = OneOrMore>, ",", DottedName, "as", Identifier => ActionFn(1540); + // OneOrMore> = OneOrMore>, ",", DottedName, "as", Identifier => ActionFn(1536); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant22(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant69(__symbols); + let __sym0 = __pop_Variant71(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1540::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1536::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (5, 192) } pub(crate) fn __reduce507< @@ -26310,15 +26332,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = OneOrMore>, ",", DottedName => ActionFn(1541); + // OneOrMore> = OneOrMore>, ",", DottedName => ActionFn(1537); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant69(__symbols); + let __sym0 = __pop_Variant71(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1541::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1537::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (3, 192) } pub(crate) fn __reduce508< @@ -26329,15 +26351,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = Identifier, "as", Identifier => ActionFn(1542); + // OneOrMore> = Identifier, "as", Identifier => ActionFn(1538); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1542::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1538::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (3, 193) } pub(crate) fn __reduce509< @@ -26348,12 +26370,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = Identifier => ActionFn(1543); + // OneOrMore> = Identifier => ActionFn(1539); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1543::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1539::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (1, 193) } pub(crate) fn __reduce510< @@ -26364,17 +26386,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = OneOrMore>, ",", Identifier, "as", Identifier => ActionFn(1544); + // OneOrMore> = OneOrMore>, ",", Identifier, "as", Identifier => ActionFn(1540); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant22(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant69(__symbols); + let __sym0 = __pop_Variant71(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1544::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1540::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (5, 193) } pub(crate) fn __reduce511< @@ -26385,15 +26407,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = OneOrMore>, ",", Identifier => ActionFn(1545); + // OneOrMore> = OneOrMore>, ",", Identifier => ActionFn(1541); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant69(__symbols); + let __sym0 = __pop_Variant71(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1545::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant69(__nt), __end)); + let __nt = super::__action1541::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant71(__nt), __end)); (3, 193) } pub(crate) fn __reduce512< @@ -26405,11 +26427,11 @@ mod __parse__Top { ) -> (usize, usize) { // OneOrMore = MatchKeywordEntry => ActionFn(323); - let __sym0 = __pop_Variant75(__symbols); + let __sym0 = __pop_Variant77(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action323::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant78(__nt), __end)); + __symbols.push((__start, __Symbol::Variant80(__nt), __end)); (1, 194) } pub(crate) fn __reduce513< @@ -26422,13 +26444,13 @@ mod __parse__Top { { // OneOrMore = OneOrMore, ",", MatchKeywordEntry => ActionFn(324); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant75(__symbols); + let __sym2 = __pop_Variant77(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant78(__symbols); + let __sym0 = __pop_Variant80(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action324::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant78(__nt), __end)); + __symbols.push((__start, __Symbol::Variant80(__nt), __end)); (3, 194) } pub(crate) fn __reduce514< @@ -26440,11 +26462,11 @@ mod __parse__Top { ) -> (usize, usize) { // OneOrMore = MatchMappingEntry => ActionFn(327); - let __sym0 = __pop_Variant76(__symbols); + let __sym0 = __pop_Variant78(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action327::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant79(__nt), __end)); + __symbols.push((__start, __Symbol::Variant81(__nt), __end)); (1, 195) } pub(crate) fn __reduce515< @@ -26457,13 +26479,13 @@ mod __parse__Top { { // OneOrMore = OneOrMore, ",", MatchMappingEntry => ActionFn(328); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant76(__symbols); + let __sym2 = __pop_Variant78(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant79(__symbols); + let __sym0 = __pop_Variant81(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action328::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant79(__nt), __end)); + __symbols.push((__start, __Symbol::Variant81(__nt), __end)); (3, 195) } pub(crate) fn __reduce516< @@ -26479,7 +26501,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action464::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant80(__nt), __end)); + __symbols.push((__start, __Symbol::Variant82(__nt), __end)); (1, 196) } pub(crate) fn __reduce517< @@ -26494,11 +26516,11 @@ mod __parse__Top { assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant10(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action465::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant80(__nt), __end)); + __symbols.push((__start, __Symbol::Variant82(__nt), __end)); (3, 196) } pub(crate) fn __reduce518< @@ -26514,7 +26536,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action453::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant80(__nt), __end)); + __symbols.push((__start, __Symbol::Variant82(__nt), __end)); (1, 197) } pub(crate) fn __reduce519< @@ -26529,11 +26551,11 @@ mod __parse__Top { assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant10(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action454::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant80(__nt), __end)); + __symbols.push((__start, __Symbol::Variant82(__nt), __end)); (3, 197) } pub(crate) fn __reduce520< @@ -26549,7 +26571,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action325::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (1, 198) } pub(crate) fn __reduce521< @@ -26564,11 +26586,11 @@ mod __parse__Top { assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant34(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant52(__symbols); + let __sym0 = __pop_Variant54(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action326::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (3, 198) } pub(crate) fn __reduce522< @@ -26685,11 +26707,11 @@ mod __parse__Top { ) -> (usize, usize) { // OneOrMore = TypeParam => ActionFn(264); - let __sym0 = __pop_Variant91(__symbols); + let __sym0 = __pop_Variant93(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action264::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant81(__nt), __end)); + __symbols.push((__start, __Symbol::Variant83(__nt), __end)); (1, 202) } pub(crate) fn __reduce529< @@ -26702,13 +26724,13 @@ mod __parse__Top { { // OneOrMore = OneOrMore, ",", TypeParam => ActionFn(265); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant91(__symbols); + let __sym2 = __pop_Variant93(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant81(__symbols); + let __sym0 = __pop_Variant83(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action265::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant81(__nt), __end)); + __symbols.push((__start, __Symbol::Variant83(__nt), __end)); (3, 202) } pub(crate) fn __reduce530< @@ -26735,11 +26757,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OrPattern = TwoOrMore => ActionFn(1317); - let __sym0 = __pop_Variant52(__symbols); + // OrPattern = TwoOrMore => ActionFn(1329); + let __sym0 = __pop_Variant54(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1317::<>(mode, __sym0); + let __nt = super::__action1329::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (1, 203) } @@ -26751,13 +26773,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OrTest<"all"> = (> "or")+, AndTest<"all"> => ActionFn(1318); + // OrTest<"all"> = (> "or")+, AndTest<"all"> => ActionFn(1330); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant16(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1318::<>(mode, __sym0, __sym1); + let __nt = super::__action1330::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 204) } @@ -26785,13 +26807,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OrTest<"no-withitems"> = (> "or")+, AndTest<"all"> => ActionFn(1319); + // OrTest<"no-withitems"> = (> "or")+, AndTest<"all"> => ActionFn(1331); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant16(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1319::<>(mode, __sym0, __sym1); + let __nt = super::__action1331::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 205) } @@ -26835,14 +26857,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterDef = TypedParameter, "=", Test<"all"> => ActionFn(1320); + // ParameterDef = TypedParameter, "=", Test<"all"> => ActionFn(1332); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant10(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1320::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1332::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (3, 206) } @@ -26870,14 +26892,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterDef = UntypedParameter, "=", Test<"all"> => ActionFn(1321); + // ParameterDef = UntypedParameter, "=", Test<"all"> => ActionFn(1333); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant10(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1321::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1333::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (3, 207) } @@ -26890,11 +26912,11 @@ mod __parse__Top { ) -> (usize, usize) { // ParameterDefs = OneOrMore> => ActionFn(422); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action422::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant82(__nt), __end)); + __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (1, 208) } pub(crate) fn __reduce541< @@ -26909,11 +26931,11 @@ mod __parse__Top { assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action673::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant82(__nt), __end)); + __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (3, 208) } pub(crate) fn __reduce542< @@ -26929,11 +26951,11 @@ mod __parse__Top { let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; let __nt = super::__action674::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant82(__nt), __end)); + __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (4, 208) } pub(crate) fn __reduce543< @@ -26945,11 +26967,11 @@ mod __parse__Top { ) -> (usize, usize) { // ParameterDefs = OneOrMore> => ActionFn(430); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action430::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant82(__nt), __end)); + __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (1, 209) } pub(crate) fn __reduce544< @@ -26964,11 +26986,11 @@ mod __parse__Top { assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action681::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant82(__nt), __end)); + __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (3, 209) } pub(crate) fn __reduce545< @@ -26984,11 +27006,11 @@ mod __parse__Top { let __sym3 = __pop_Variant11(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant80(__symbols); + let __sym0 = __pop_Variant82(__symbols); let __start = __sym0.0; let __end = __sym3.2; let __nt = super::__action682::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant82(__nt), __end)); + __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (4, 209) } pub(crate) fn __reduce622< @@ -26999,14 +27021,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterList = KwargParameter, "," => ActionFn(1358); + // ParameterList = KwargParameter, "," => ActionFn(1370); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant8(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1358::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + let __nt = super::__action1370::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 210) } pub(crate) fn __reduce623< @@ -27017,12 +27039,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterList = KwargParameter => ActionFn(1359); + // ParameterList = KwargParameter => ActionFn(1371); let __sym0 = __pop_Variant8(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1359::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + let __nt = super::__action1371::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (1, 210) } pub(crate) fn __reduce700< @@ -27033,14 +27055,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterList = KwargParameter, "," => ActionFn(1396); + // ParameterList = KwargParameter, "," => ActionFn(1408); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant8(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1396::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + let __nt = super::__action1408::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (2, 211) } pub(crate) fn __reduce701< @@ -27051,12 +27073,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterList = KwargParameter => ActionFn(1397); + // ParameterList = KwargParameter => ActionFn(1409); let __sym0 = __pop_Variant8(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1397::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant45(__nt), __end)); + let __nt = super::__action1409::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant47(__nt), __end)); (1, 211) } pub(crate) fn __reduce702< @@ -27068,11 +27090,11 @@ mod __parse__Top { ) -> (usize, usize) { // ParameterList? = ParameterList => ActionFn(258); - let __sym0 = __pop_Variant45(__symbols); + let __sym0 = __pop_Variant47(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action258::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant46(__nt), __end)); + __symbols.push((__start, __Symbol::Variant48(__nt), __end)); (1, 212) } pub(crate) fn __reduce703< @@ -27087,7 +27109,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action259::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant46(__nt), __end)); + __symbols.push((__start, __Symbol::Variant48(__nt), __end)); (0, 212) } pub(crate) fn __reduce722< @@ -27098,11 +27120,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // PassStatement = "pass" => ActionFn(1399); + // PassStatement = "pass" => ActionFn(1411); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1399::<>(mode, __sym0); + let __nt = super::__action1411::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (1, 216) } @@ -27151,7 +27173,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action405::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant83(__nt), __end)); + __symbols.push((__start, __Symbol::Variant85(__nt), __end)); (1, 218) } pub(crate) fn __reduce726< @@ -27166,7 +27188,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action406::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant83(__nt), __end)); + __symbols.push((__start, __Symbol::Variant85(__nt), __end)); (0, 218) } pub(crate) fn __reduce727< @@ -27177,18 +27199,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // PatternArguments = "(", OneOrMore, ",", OneOrMore, ",", ")" => ActionFn(1400); + // PatternArguments = "(", OneOrMore, ",", OneOrMore, ",", ")" => ActionFn(1412); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant78(__symbols); + let __sym3 = __pop_Variant80(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant52(__symbols); + let __sym1 = __pop_Variant54(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1400::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); - __symbols.push((__start, __Symbol::Variant84(__nt), __end)); + let __nt = super::__action1412::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + __symbols.push((__start, __Symbol::Variant86(__nt), __end)); (6, 219) } pub(crate) fn __reduce728< @@ -27199,17 +27221,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // PatternArguments = "(", OneOrMore, ",", OneOrMore, ")" => ActionFn(1401); + // PatternArguments = "(", OneOrMore, ",", OneOrMore, ")" => ActionFn(1413); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant78(__symbols); + let __sym3 = __pop_Variant80(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant52(__symbols); + let __sym1 = __pop_Variant54(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1401::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); - __symbols.push((__start, __Symbol::Variant84(__nt), __end)); + let __nt = super::__action1413::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant86(__nt), __end)); (5, 219) } pub(crate) fn __reduce729< @@ -27220,16 +27242,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // PatternArguments = "(", OneOrMore, ",", ")" => ActionFn(1402); + // PatternArguments = "(", OneOrMore, ",", ")" => ActionFn(1414); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant52(__symbols); + let __sym1 = __pop_Variant54(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1402::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant84(__nt), __end)); + let __nt = super::__action1414::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant86(__nt), __end)); (4, 219) } pub(crate) fn __reduce730< @@ -27240,15 +27262,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // PatternArguments = "(", OneOrMore, ")" => ActionFn(1403); + // PatternArguments = "(", OneOrMore, ")" => ActionFn(1415); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant52(__symbols); + let __sym1 = __pop_Variant54(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1403::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant84(__nt), __end)); + let __nt = super::__action1415::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant86(__nt), __end)); (3, 219) } pub(crate) fn __reduce731< @@ -27259,16 +27281,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // PatternArguments = "(", OneOrMore, ",", ")" => ActionFn(1404); + // PatternArguments = "(", OneOrMore, ",", ")" => ActionFn(1416); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant78(__symbols); + let __sym1 = __pop_Variant80(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1404::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant84(__nt), __end)); + let __nt = super::__action1416::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant86(__nt), __end)); (4, 219) } pub(crate) fn __reduce732< @@ -27279,15 +27301,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // PatternArguments = "(", OneOrMore, ")" => ActionFn(1405); + // PatternArguments = "(", OneOrMore, ")" => ActionFn(1417); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant78(__symbols); + let __sym1 = __pop_Variant80(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1405::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant84(__nt), __end)); + let __nt = super::__action1417::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant86(__nt), __end)); (3, 219) } pub(crate) fn __reduce733< @@ -27298,14 +27320,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // PatternArguments = "(", ")" => ActionFn(1406); + // PatternArguments = "(", ")" => ActionFn(1418); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1406::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant84(__nt), __end)); + let __nt = super::__action1418::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant86(__nt), __end)); (2, 219) } pub(crate) fn __reduce734< @@ -27316,13 +27338,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Patterns = Pattern, "," => ActionFn(1407); + // Patterns = Pattern, "," => ActionFn(1419); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant34(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1407::<>(mode, __sym0, __sym1); + let __nt = super::__action1419::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (2, 220) } @@ -27334,13 +27356,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Patterns = TwoOrMore, "," => ActionFn(1408); + // Patterns = TwoOrMore, "," => ActionFn(1420); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant52(__symbols); + let __sym0 = __pop_Variant54(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1408::<>(mode, __sym0, __sym1); + let __nt = super::__action1420::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (2, 220) } @@ -27352,11 +27374,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Patterns = TwoOrMore => ActionFn(1409); - let __sym0 = __pop_Variant52(__symbols); + // Patterns = TwoOrMore => ActionFn(1421); + let __sym0 = __pop_Variant54(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1409::<>(mode, __sym0); + let __nt = super::__action1421::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (1, 220) } @@ -27384,14 +27406,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Power<"all"> = AtomExpr<"all">, "**", Factor<"all"> => ActionFn(1410); + // Power<"all"> = AtomExpr<"all">, "**", Factor<"all"> => ActionFn(1422); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1410::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1422::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 221) } @@ -27419,14 +27441,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Power<"no-withitems"> = AtomExpr<"all">, "**", Factor<"all"> => ActionFn(1411); + // Power<"no-withitems"> = AtomExpr<"all">, "**", Factor<"all"> => ActionFn(1423); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1411::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1423::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 222) } @@ -27487,7 +27509,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Program = Program, SmallStatement, ";", "\n" => ActionFn(1158); + // Program = Program, SmallStatement, ";", "\n" => ActionFn(1156); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -27495,7 +27517,7 @@ mod __parse__Top { let __sym0 = __pop_Variant24(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1158::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1156::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant24(__nt), __end)); (4, 223) } @@ -27507,7 +27529,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Program = Program, ( ";")+, SmallStatement, ";", "\n" => ActionFn(1159); + // Program = Program, ( ";")+, SmallStatement, ";", "\n" => ActionFn(1157); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -27516,7 +27538,7 @@ mod __parse__Top { let __sym0 = __pop_Variant24(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1159::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1157::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant24(__nt), __end)); (5, 223) } @@ -27528,14 +27550,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Program = Program, SmallStatement, "\n" => ActionFn(1160); + // Program = Program, SmallStatement, "\n" => ActionFn(1158); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant36(__symbols); let __sym0 = __pop_Variant24(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1160::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1158::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant24(__nt), __end)); (3, 223) } @@ -27547,7 +27569,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Program = Program, ( ";")+, SmallStatement, "\n" => ActionFn(1161); + // Program = Program, ( ";")+, SmallStatement, "\n" => ActionFn(1159); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant36(__symbols); @@ -27555,7 +27577,7 @@ mod __parse__Top { let __sym0 = __pop_Variant24(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1161::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1159::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant24(__nt), __end)); (4, 223) } @@ -27585,11 +27607,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // RaiseStatement = "raise" => ActionFn(1412); + // RaiseStatement = "raise" => ActionFn(1424); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1412::<>(mode, __sym0); + let __nt = super::__action1424::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (1, 224) } @@ -27601,7 +27623,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // RaiseStatement = "raise", Test<"all">, "from", Test<"all"> => ActionFn(1413); + // RaiseStatement = "raise", Test<"all">, "from", Test<"all"> => ActionFn(1425); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant14(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -27609,7 +27631,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1413::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1425::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 224) } @@ -27621,13 +27643,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // RaiseStatement = "raise", Test<"all"> => ActionFn(1414); + // RaiseStatement = "raise", Test<"all"> => ActionFn(1426); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1414::<>(mode, __sym0, __sym1); + let __nt = super::__action1426::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (2, 224) } @@ -27639,14 +27661,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", Pattern, ")" => ActionFn(1415); + // SequencePattern = "(", Pattern, ")" => ActionFn(1427); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant34(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1415::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1427::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (3, 225) } @@ -27658,13 +27680,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", ")" => ActionFn(1416); + // SequencePattern = "(", ")" => ActionFn(1428); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1416::<>(mode, __sym0, __sym1); + let __nt = super::__action1428::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (2, 225) } @@ -27676,7 +27698,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", Pattern, ",", ")" => ActionFn(1417); + // SequencePattern = "(", Pattern, ",", ")" => ActionFn(1429); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -27684,7 +27706,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1417::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1429::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (4, 225) } @@ -27696,7 +27718,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", ( ",")+, Pattern, ",", ")" => ActionFn(1418); + // SequencePattern = "(", ( ",")+, Pattern, ",", ")" => ActionFn(1430); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -27705,7 +27727,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1418::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1430::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (5, 225) } @@ -27717,7 +27739,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", ( ",")+, Pattern, ")" => ActionFn(1419); + // SequencePattern = "(", ( ",")+, Pattern, ")" => ActionFn(1431); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant34(__symbols); @@ -27725,7 +27747,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1419::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1431::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (4, 225) } @@ -27737,14 +27759,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "[", Pattern, "]" => ActionFn(1510); + // SequencePattern = "[", Pattern, "]" => ActionFn(1506); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant34(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1510::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1506::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (3, 225) } @@ -27756,13 +27778,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "[", "]" => ActionFn(1511); + // SequencePattern = "[", "]" => ActionFn(1507); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1511::<>(mode, __sym0, __sym1); + let __nt = super::__action1507::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (2, 225) } @@ -27774,7 +27796,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "[", ( ",")+, Pattern, "]" => ActionFn(1512); + // SequencePattern = "[", ( ",")+, Pattern, "]" => ActionFn(1508); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant34(__symbols); @@ -27782,7 +27804,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1512::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1508::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (4, 225) } @@ -27794,14 +27816,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "[", ( ",")+, "]" => ActionFn(1513); + // SequencePattern = "[", ( ",")+, "]" => ActionFn(1509); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant35(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1513::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1509::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (3, 225) } @@ -27847,14 +27869,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ShiftExpression<"all"> = ShiftExpression<"all">, ShiftOp, ArithmeticExpression<"all"> => ActionFn(1421); + // ShiftExpression<"all"> = ShiftExpression<"all">, ShiftOp, ArithmeticExpression<"all"> => ActionFn(1433); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); - let __sym1 = __pop_Variant48(__symbols); + let __sym1 = __pop_Variant50(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1421::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1433::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 227) } @@ -27882,14 +27904,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ShiftExpression<"no-withitems"> = ShiftExpression<"all">, ShiftOp, ArithmeticExpression<"all"> => ActionFn(1422); + // ShiftExpression<"no-withitems"> = ShiftExpression<"all">, ShiftOp, ArithmeticExpression<"all"> => ActionFn(1434); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); - let __sym1 = __pop_Variant48(__symbols); + let __sym1 = __pop_Variant50(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1422::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1434::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 228) } @@ -27922,7 +27944,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action194::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 229) } pub(crate) fn __reduce768< @@ -27938,7 +27960,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action195::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant48(__nt), __end)); + __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 229) } pub(crate) fn __reduce769< @@ -27949,7 +27971,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SingleForComprehension = "async", "for", ExpressionList, "in", OrTest<"all"> => ActionFn(1516); + // SingleForComprehension = "async", "for", ExpressionList, "in", OrTest<"all"> => ActionFn(1512); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant14(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -27958,8 +27980,8 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1516::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); - __symbols.push((__start, __Symbol::Variant85(__nt), __end)); + let __nt = super::__action1512::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant87(__nt), __end)); (5, 230) } pub(crate) fn __reduce770< @@ -27970,7 +27992,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SingleForComprehension = "async", "for", ExpressionList, "in", OrTest<"all">, ComprehensionIf+ => ActionFn(1517); + // SingleForComprehension = "async", "for", ExpressionList, "in", OrTest<"all">, ComprehensionIf+ => ActionFn(1513); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant16(__symbols); let __sym4 = __pop_Variant14(__symbols); @@ -27980,8 +28002,8 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1517::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); - __symbols.push((__start, __Symbol::Variant85(__nt), __end)); + let __nt = super::__action1513::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + __symbols.push((__start, __Symbol::Variant87(__nt), __end)); (6, 230) } pub(crate) fn __reduce771< @@ -27992,7 +28014,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SingleForComprehension = "for", ExpressionList, "in", OrTest<"all"> => ActionFn(1518); + // SingleForComprehension = "for", ExpressionList, "in", OrTest<"all"> => ActionFn(1514); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant14(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -28000,8 +28022,8 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1518::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant85(__nt), __end)); + let __nt = super::__action1514::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant87(__nt), __end)); (4, 230) } pub(crate) fn __reduce772< @@ -28012,7 +28034,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SingleForComprehension = "for", ExpressionList, "in", OrTest<"all">, ComprehensionIf+ => ActionFn(1519); + // SingleForComprehension = "for", ExpressionList, "in", OrTest<"all">, ComprehensionIf+ => ActionFn(1515); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant16(__symbols); let __sym3 = __pop_Variant14(__symbols); @@ -28021,8 +28043,8 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1519::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); - __symbols.push((__start, __Symbol::Variant85(__nt), __end)); + let __nt = super::__action1515::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant87(__nt), __end)); (5, 230) } pub(crate) fn __reduce773< @@ -28034,11 +28056,11 @@ mod __parse__Top { ) -> (usize, usize) { // SingleForComprehension+ = SingleForComprehension => ActionFn(244); - let __sym0 = __pop_Variant85(__symbols); + let __sym0 = __pop_Variant87(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action244::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant86(__nt), __end)); + __symbols.push((__start, __Symbol::Variant88(__nt), __end)); (1, 231) } pub(crate) fn __reduce774< @@ -28051,12 +28073,12 @@ mod __parse__Top { { // SingleForComprehension+ = SingleForComprehension+, SingleForComprehension => ActionFn(245); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant85(__symbols); - let __sym0 = __pop_Variant86(__symbols); + let __sym1 = __pop_Variant87(__symbols); + let __sym0 = __pop_Variant88(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action245::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant86(__nt), __end)); + __symbols.push((__start, __Symbol::Variant88(__nt), __end)); (2, 231) } pub(crate) fn __reduce775< @@ -28067,14 +28089,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SliceOp = ":", Test<"all"> => ActionFn(1678); + // SliceOp = ":", Test<"all"> => ActionFn(1674); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1678::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant87(__nt), __end)); + let __nt = super::__action1674::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant89(__nt), __end)); (2, 232) } pub(crate) fn __reduce776< @@ -28085,12 +28107,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SliceOp = ":" => ActionFn(1679); + // SliceOp = ":" => ActionFn(1675); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1679::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant87(__nt), __end)); + let __nt = super::__action1675::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant89(__nt), __end)); (1, 232) } pub(crate) fn __reduce777< @@ -28102,11 +28124,11 @@ mod __parse__Top { ) -> (usize, usize) { // SliceOp? = SliceOp => ActionFn(254); - let __sym0 = __pop_Variant87(__symbols); + let __sym0 = __pop_Variant89(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action254::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant88(__nt), __end)); + __symbols.push((__start, __Symbol::Variant90(__nt), __end)); (1, 233) } pub(crate) fn __reduce778< @@ -28121,7 +28143,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action255::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant88(__nt), __end)); + __symbols.push((__start, __Symbol::Variant90(__nt), __end)); (0, 233) } pub(crate) fn __reduce779< @@ -28308,13 +28330,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // StarExpr = "*", Expression<"all"> => ActionFn(1425); + // StarExpr = "*", Expression<"all"> => ActionFn(1437); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1425::<>(mode, __sym0, __sym1); + let __nt = super::__action1437::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 235) } @@ -28326,13 +28348,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // StarPattern = "*", Identifier => ActionFn(1426); + // StarPattern = "*", Identifier => ActionFn(1438); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1426::<>(mode, __sym0, __sym1); + let __nt = super::__action1438::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (2, 236) } @@ -28344,15 +28366,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // StarTypedParameter = Identifier, ":", TestOrStarExpr => ActionFn(1427); + // StarTypedParameter = Identifier, ":", TestOrStarExpr => ActionFn(1439); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1427::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant63(__nt), __end)); + let __nt = super::__action1439::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant65(__nt), __end)); (3, 237) } pub(crate) fn __reduce793< @@ -28363,12 +28385,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // StarTypedParameter = Identifier => ActionFn(1428); + // StarTypedParameter = Identifier => ActionFn(1440); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1428::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant63(__nt), __end)); + let __nt = super::__action1440::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant65(__nt), __end)); (1, 237) } pub(crate) fn __reduce794< @@ -28380,11 +28402,11 @@ mod __parse__Top { ) -> (usize, usize) { // StarTypedParameter? = StarTypedParameter => ActionFn(473); - let __sym0 = __pop_Variant63(__symbols); + let __sym0 = __pop_Variant65(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action473::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant64(__nt), __end)); + __symbols.push((__start, __Symbol::Variant66(__nt), __end)); (1, 238) } pub(crate) fn __reduce795< @@ -28399,7 +28421,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action474::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant64(__nt), __end)); + __symbols.push((__start, __Symbol::Variant66(__nt), __end)); (0, 238) } pub(crate) fn __reduce796< @@ -28410,12 +28432,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // StarUntypedParameter = Identifier => ActionFn(1429); + // StarUntypedParameter = Identifier => ActionFn(1441); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1429::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant63(__nt), __end)); + let __nt = super::__action1441::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant65(__nt), __end)); (1, 239) } pub(crate) fn __reduce797< @@ -28427,11 +28449,11 @@ mod __parse__Top { ) -> (usize, usize) { // StarUntypedParameter? = StarUntypedParameter => ActionFn(462); - let __sym0 = __pop_Variant63(__symbols); + let __sym0 = __pop_Variant65(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action462::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant64(__nt), __end)); + __symbols.push((__start, __Symbol::Variant66(__nt), __end)); (1, 240) } pub(crate) fn __reduce798< @@ -28446,7 +28468,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action463::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant64(__nt), __end)); + __symbols.push((__start, __Symbol::Variant66(__nt), __end)); (0, 240) } pub(crate) fn __reduce799< @@ -28457,15 +28479,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Statements = SmallStatement, ";", "\n" => ActionFn(1162); + // Statements = SmallStatement, ";", "\n" => ActionFn(1160); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant36(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1162::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + let __nt = super::__action1160::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (3, 241) } pub(crate) fn __reduce800< @@ -28476,7 +28498,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Statements = ( ";")+, SmallStatement, ";", "\n" => ActionFn(1163); + // Statements = ( ";")+, SmallStatement, ";", "\n" => ActionFn(1161); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -28484,8 +28506,8 @@ mod __parse__Top { let __sym0 = __pop_Variant37(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1163::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + let __nt = super::__action1161::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (4, 241) } pub(crate) fn __reduce801< @@ -28496,14 +28518,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Statements = SmallStatement, "\n" => ActionFn(1164); + // Statements = SmallStatement, "\n" => ActionFn(1162); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant36(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1164::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + let __nt = super::__action1162::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (2, 241) } pub(crate) fn __reduce802< @@ -28514,15 +28536,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Statements = ( ";")+, SmallStatement, "\n" => ActionFn(1165); + // Statements = ( ";")+, SmallStatement, "\n" => ActionFn(1163); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant36(__symbols); let __sym0 = __pop_Variant37(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1165::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + let __nt = super::__action1163::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (3, 241) } pub(crate) fn __reduce803< @@ -28538,7 +28560,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action10::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (1, 241) } pub(crate) fn __reduce804< @@ -28552,11 +28574,11 @@ mod __parse__Top { // Statements = Statements, CompoundStatement => ActionFn(11); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant36(__symbols); - let __sym0 = __pop_Variant89(__symbols); + let __sym0 = __pop_Variant91(__symbols); let __start = __sym0.0; let __end = __sym1.2; let __nt = super::__action11::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (2, 241) } pub(crate) fn __reduce805< @@ -28567,16 +28589,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Statements = Statements, SmallStatement, ";", "\n" => ActionFn(1166); + // Statements = Statements, SmallStatement, ";", "\n" => ActionFn(1164); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant36(__symbols); - let __sym0 = __pop_Variant89(__symbols); + let __sym0 = __pop_Variant91(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1166::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + let __nt = super::__action1164::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (4, 241) } pub(crate) fn __reduce806< @@ -28587,17 +28609,17 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Statements = Statements, ( ";")+, SmallStatement, ";", "\n" => ActionFn(1167); + // Statements = Statements, ( ";")+, SmallStatement, ";", "\n" => ActionFn(1165); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant36(__symbols); let __sym1 = __pop_Variant37(__symbols); - let __sym0 = __pop_Variant89(__symbols); + let __sym0 = __pop_Variant91(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1167::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + let __nt = super::__action1165::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (5, 241) } pub(crate) fn __reduce807< @@ -28608,15 +28630,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Statements = Statements, SmallStatement, "\n" => ActionFn(1168); + // Statements = Statements, SmallStatement, "\n" => ActionFn(1166); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant36(__symbols); - let __sym0 = __pop_Variant89(__symbols); + let __sym0 = __pop_Variant91(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1168::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + let __nt = super::__action1166::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (3, 241) } pub(crate) fn __reduce808< @@ -28627,16 +28649,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Statements = Statements, ( ";")+, SmallStatement, "\n" => ActionFn(1169); + // Statements = Statements, ( ";")+, SmallStatement, "\n" => ActionFn(1167); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant36(__symbols); let __sym1 = __pop_Variant37(__symbols); - let __sym0 = __pop_Variant89(__symbols); + let __sym0 = __pop_Variant91(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1169::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant89(__nt), __end)); + let __nt = super::__action1167::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant91(__nt), __end)); (4, 241) } pub(crate) fn __reduce809< @@ -28663,15 +28685,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = Test<"all">, ":", Test<"all">, SliceOp => ActionFn(1680); + // Subscript = Test<"all">, ":", Test<"all">, SliceOp => ActionFn(1676); assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant87(__symbols); + let __sym3 = __pop_Variant89(__symbols); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1680::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1676::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (4, 242) } @@ -28683,14 +28705,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = Test<"all">, ":", SliceOp => ActionFn(1681); + // Subscript = Test<"all">, ":", SliceOp => ActionFn(1677); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant87(__symbols); + let __sym2 = __pop_Variant89(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1681::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1677::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 242) } @@ -28702,14 +28724,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = ":", Test<"all">, SliceOp => ActionFn(1682); + // Subscript = ":", Test<"all">, SliceOp => ActionFn(1678); assert!(__symbols.len() >= 3); - let __sym2 = __pop_Variant87(__symbols); + let __sym2 = __pop_Variant89(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1682::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1678::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 242) } @@ -28721,13 +28743,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = ":", SliceOp => ActionFn(1683); + // Subscript = ":", SliceOp => ActionFn(1679); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant87(__symbols); + let __sym1 = __pop_Variant89(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1683::<>(mode, __sym0, __sym1); + let __nt = super::__action1679::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 242) } @@ -28739,14 +28761,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = Test<"all">, ":", Test<"all"> => ActionFn(1684); + // Subscript = Test<"all">, ":", Test<"all"> => ActionFn(1680); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1684::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1680::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 242) } @@ -28758,13 +28780,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = Test<"all">, ":" => ActionFn(1685); + // Subscript = Test<"all">, ":" => ActionFn(1681); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1685::<>(mode, __sym0, __sym1); + let __nt = super::__action1681::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 242) } @@ -28776,13 +28798,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = ":", Test<"all"> => ActionFn(1686); + // Subscript = ":", Test<"all"> => ActionFn(1682); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1686::<>(mode, __sym0, __sym1); + let __nt = super::__action1682::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 242) } @@ -28794,11 +28816,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = ":" => ActionFn(1687); + // Subscript = ":" => ActionFn(1683); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1687::<>(mode, __sym0); + let __nt = super::__action1683::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 242) } @@ -28810,11 +28832,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SubscriptList = Subscript => ActionFn(1431); + // SubscriptList = Subscript => ActionFn(206); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1431::<>(mode, __sym0); + let __nt = super::__action206::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 243) } @@ -28826,13 +28848,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SubscriptList = Subscript, "," => ActionFn(1432); + // SubscriptList = Subscript, "," => ActionFn(1443); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1432::<>(mode, __sym0, __sym1); + let __nt = super::__action1443::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 243) } @@ -28844,13 +28866,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SubscriptList = TwoOrMore, "," => ActionFn(1433); + // SubscriptList = TwoOrMore, "," => ActionFn(1444); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1433::<>(mode, __sym0, __sym1); + let __nt = super::__action1444::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 243) } @@ -28862,11 +28884,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SubscriptList = TwoOrMore => ActionFn(1434); + // SubscriptList = TwoOrMore => ActionFn(1445); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1434::<>(mode, __sym0); + let __nt = super::__action1445::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 243) } @@ -28878,14 +28900,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Suite = SmallStatement, ";", "\n" => ActionFn(1170); + // Suite = SmallStatement, ";", "\n" => ActionFn(1168); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant36(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1170::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1168::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant24(__nt), __end)); (3, 244) } @@ -28897,7 +28919,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Suite = ( ";")+, SmallStatement, ";", "\n" => ActionFn(1171); + // Suite = ( ";")+, SmallStatement, ";", "\n" => ActionFn(1169); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -28905,7 +28927,7 @@ mod __parse__Top { let __sym0 = __pop_Variant37(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1171::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1169::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant24(__nt), __end)); (4, 244) } @@ -28917,13 +28939,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Suite = SmallStatement, "\n" => ActionFn(1172); + // Suite = SmallStatement, "\n" => ActionFn(1170); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant36(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1172::<>(mode, __sym0, __sym1); + let __nt = super::__action1170::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant24(__nt), __end)); (2, 244) } @@ -28935,14 +28957,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Suite = ( ";")+, SmallStatement, "\n" => ActionFn(1173); + // Suite = ( ";")+, SmallStatement, "\n" => ActionFn(1171); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant36(__symbols); let __sym0 = __pop_Variant37(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1173::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1171::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant24(__nt), __end)); (3, 244) } @@ -28957,7 +28979,7 @@ mod __parse__Top { // Suite = "\n", Indent, Statements, Dedent => ActionFn(8); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant89(__symbols); + let __sym2 = __pop_Variant91(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; @@ -28974,14 +28996,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Term<"all"> = Term<"all">, MulOp, Factor<"all"> => ActionFn(1435); + // Term<"all"> = Term<"all">, MulOp, Factor<"all"> => ActionFn(1446); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); - let __sym1 = __pop_Variant48(__symbols); + let __sym1 = __pop_Variant50(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1435::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1446::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 245) } @@ -29009,14 +29031,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Term<"no-withitems"> = Term<"all">, MulOp, Factor<"all"> => ActionFn(1436); + // Term<"no-withitems"> = Term<"all">, MulOp, Factor<"all"> => ActionFn(1447); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); - let __sym1 = __pop_Variant48(__symbols); + let __sym1 = __pop_Variant50(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1436::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1447::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 246) } @@ -29044,7 +29066,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Test<"all"> = OrTest<"all">, "if", OrTest<"all">, "else", Test<"all"> => ActionFn(1437); + // Test<"all"> = OrTest<"all">, "if", OrTest<"all">, "else", Test<"all"> => ActionFn(1448); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant14(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -29053,7 +29075,7 @@ mod __parse__Top { let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1437::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1448::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (5, 247) } @@ -29128,7 +29150,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Test<"no-withitems"> = OrTest<"all">, "if", OrTest<"all">, "else", Test<"all"> => ActionFn(1438); + // Test<"no-withitems"> = OrTest<"all">, "if", OrTest<"all">, "else", Test<"all"> => ActionFn(1449); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant14(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -29137,7 +29159,7 @@ mod __parse__Top { let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1438::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1449::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (5, 249) } @@ -29197,11 +29219,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TestList? = GenericList => ActionFn(1692); + // TestList? = GenericList => ActionFn(1688); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1692::<>(mode, __sym0); + let __nt = super::__action1688::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (1, 251) } @@ -29228,11 +29250,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TestListOrYieldExpr = GenericList => ActionFn(1693); + // TestListOrYieldExpr = GenericList => ActionFn(1689); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1693::<>(mode, __sym0); + let __nt = super::__action1689::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 252) } @@ -29292,11 +29314,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TestOrStarExprList = GenericList => ActionFn(1694); + // TestOrStarExprList = GenericList => ActionFn(1690); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1694::<>(mode, __sym0); + let __nt = super::__action1690::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 254) } @@ -29340,14 +29362,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Top = StartModule, Program => ActionFn(1439); + // Top = StartModule, Program => ActionFn(1450); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant24(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1439::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant90(__nt), __end)); + let __nt = super::__action1450::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant92(__nt), __end)); (2, 256) } pub(crate) fn __reduce850< @@ -29358,14 +29380,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Top = StartExpression, GenericList => ActionFn(1695); + // Top = StartExpression, GenericList => ActionFn(1691); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1695::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant90(__nt), __end)); + let __nt = super::__action1691::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant92(__nt), __end)); (2, 256) } pub(crate) fn __reduce851< @@ -29376,15 +29398,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Top = StartExpression, GenericList, ("\n")+ => ActionFn(1696); + // Top = StartExpression, GenericList, ("\n")+ => ActionFn(1692); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant21(__symbols); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1696::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant90(__nt), __end)); + let __nt = super::__action1692::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant92(__nt), __end)); (3, 256) } pub(crate) fn __reduce852< @@ -29395,7 +29417,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptClause+, "else", ":", Suite, "finally", ":", Suite => ActionFn(1442); + // TryStatement = "try", ":", Suite, ExceptClause+, "else", ":", Suite, "finally", ":", Suite => ActionFn(1453); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant24(__symbols); let __sym8 = __pop_Variant0(__symbols); @@ -29403,13 +29425,13 @@ mod __parse__Top { let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant66(__symbols); + let __sym3 = __pop_Variant68(__symbols); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = super::__action1442::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); + let __nt = super::__action1453::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (10, 257) } @@ -29421,18 +29443,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptClause+, "else", ":", Suite => ActionFn(1443); + // TryStatement = "try", ":", Suite, ExceptClause+, "else", ":", Suite => ActionFn(1454); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant66(__symbols); + let __sym3 = __pop_Variant68(__symbols); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1443::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1454::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 257) } @@ -29444,18 +29466,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptClause+, "finally", ":", Suite => ActionFn(1444); + // TryStatement = "try", ":", Suite, ExceptClause+, "finally", ":", Suite => ActionFn(1455); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant66(__symbols); + let __sym3 = __pop_Variant68(__symbols); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1444::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1455::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 257) } @@ -29467,15 +29489,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptClause+ => ActionFn(1445); + // TryStatement = "try", ":", Suite, ExceptClause+ => ActionFn(1456); assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant66(__symbols); + let __sym3 = __pop_Variant68(__symbols); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1445::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1456::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 257) } @@ -29487,7 +29509,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptStarClause+, "else", ":", Suite, "finally", ":", Suite => ActionFn(1446); + // TryStatement = "try", ":", Suite, ExceptStarClause+, "else", ":", Suite, "finally", ":", Suite => ActionFn(1457); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant24(__symbols); let __sym8 = __pop_Variant0(__symbols); @@ -29495,13 +29517,13 @@ mod __parse__Top { let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant66(__symbols); + let __sym3 = __pop_Variant68(__symbols); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = super::__action1446::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); + let __nt = super::__action1457::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (10, 257) } @@ -29513,18 +29535,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptStarClause+, "else", ":", Suite => ActionFn(1447); + // TryStatement = "try", ":", Suite, ExceptStarClause+, "else", ":", Suite => ActionFn(1458); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant66(__symbols); + let __sym3 = __pop_Variant68(__symbols); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1447::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1458::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 257) } @@ -29536,18 +29558,18 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptStarClause+, "finally", ":", Suite => ActionFn(1448); + // TryStatement = "try", ":", Suite, ExceptStarClause+, "finally", ":", Suite => ActionFn(1459); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant66(__symbols); + let __sym3 = __pop_Variant68(__symbols); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1448::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1459::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 257) } @@ -29559,15 +29581,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptStarClause+ => ActionFn(1449); + // TryStatement = "try", ":", Suite, ExceptStarClause+ => ActionFn(1460); assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant66(__symbols); + let __sym3 = __pop_Variant68(__symbols); let __sym2 = __pop_Variant24(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1449::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1460::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 257) } @@ -29579,7 +29601,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, "finally", ":", Suite => ActionFn(1106); + // TryStatement = "try", ":", Suite, "finally", ":", Suite => ActionFn(1104); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant24(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -29589,7 +29611,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1106::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1104::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (6, 257) } @@ -29609,7 +29631,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action336::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (3, 258) } pub(crate) fn __reduce862< @@ -29624,11 +29646,11 @@ mod __parse__Top { assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant34(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant52(__symbols); + let __sym0 = __pop_Variant54(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action337::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (3, 258) } pub(crate) fn __reduce863< @@ -29647,7 +29669,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action338::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (3, 259) } pub(crate) fn __reduce864< @@ -29662,11 +29684,11 @@ mod __parse__Top { assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant34(__symbols); let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant52(__symbols); + let __sym0 = __pop_Variant54(__symbols); let __start = __sym0.0; let __end = __sym2.2; let __nt = super::__action339::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant52(__nt), __end)); + __symbols.push((__start, __Symbol::Variant54(__nt), __end)); (3, 259) } pub(crate) fn __reduce865< @@ -29753,12 +29775,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypeAliasName = Identifier => ActionFn(1450); + // TypeAliasName = Identifier => ActionFn(1461); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1450::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant14(__nt), __end)); + let __nt = super::__action1461::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 262) } pub(crate) fn __reduce870< @@ -29769,16 +29791,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypeAliasStatement = "type", TypeAliasName, TypeParams, "=", Test<"all"> => ActionFn(1728); + // TypeAliasStatement = "type", TypeAliasName, TypeParams, "=", Test<"all"> => ActionFn(1724); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant14(__symbols); let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant92(__symbols); - let __sym1 = __pop_Variant14(__symbols); + let __sym2 = __pop_Variant94(__symbols); + let __sym1 = __pop_Variant45(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1728::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1724::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (5, 263) } @@ -29790,15 +29812,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypeAliasStatement = "type", TypeAliasName, "=", Test<"all"> => ActionFn(1729); + // TypeAliasStatement = "type", TypeAliasName, "=", Test<"all"> => ActionFn(1725); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant14(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant14(__symbols); + let __sym1 = __pop_Variant45(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1729::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1725::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 263) } @@ -29810,15 +29832,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypeParam = Identifier, ":", Test<"all"> => ActionFn(1452); + // TypeParam = Identifier, ":", Test<"all"> => ActionFn(1463); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1452::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant91(__nt), __end)); + let __nt = super::__action1463::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant93(__nt), __end)); (3, 264) } pub(crate) fn __reduce873< @@ -29829,12 +29851,12 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypeParam = Identifier => ActionFn(1453); + // TypeParam = Identifier => ActionFn(1464); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1453::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant91(__nt), __end)); + let __nt = super::__action1464::<>(mode, __sym0); + __symbols.push((__start, __Symbol::Variant93(__nt), __end)); (1, 264) } pub(crate) fn __reduce874< @@ -29845,14 +29867,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypeParam = "*", Identifier => ActionFn(1454); + // TypeParam = "*", Identifier => ActionFn(1465); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1454::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant91(__nt), __end)); + let __nt = super::__action1465::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant93(__nt), __end)); (2, 264) } pub(crate) fn __reduce875< @@ -29863,14 +29885,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypeParam = "**", Identifier => ActionFn(1455); + // TypeParam = "**", Identifier => ActionFn(1466); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant22(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1455::<>(mode, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant91(__nt), __end)); + let __nt = super::__action1466::<>(mode, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant93(__nt), __end)); (2, 264) } pub(crate) fn __reduce876< @@ -29881,16 +29903,16 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypeParams = "[", OneOrMore, ",", "]" => ActionFn(1456); + // TypeParams = "[", OneOrMore, ",", "]" => ActionFn(1467); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant81(__symbols); + let __sym1 = __pop_Variant83(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1456::<>(mode, __sym0, __sym1, __sym2, __sym3); - __symbols.push((__start, __Symbol::Variant92(__nt), __end)); + let __nt = super::__action1467::<>(mode, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant94(__nt), __end)); (4, 265) } pub(crate) fn __reduce877< @@ -29901,15 +29923,15 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypeParams = "[", OneOrMore, "]" => ActionFn(1457); + // TypeParams = "[", OneOrMore, "]" => ActionFn(1468); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant81(__symbols); + let __sym1 = __pop_Variant83(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1457::<>(mode, __sym0, __sym1, __sym2); - __symbols.push((__start, __Symbol::Variant92(__nt), __end)); + let __nt = super::__action1468::<>(mode, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant94(__nt), __end)); (3, 265) } pub(crate) fn __reduce878< @@ -29921,11 +29943,11 @@ mod __parse__Top { ) -> (usize, usize) { // TypeParams? = TypeParams => ActionFn(284); - let __sym0 = __pop_Variant92(__symbols); + let __sym0 = __pop_Variant94(__symbols); let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action284::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant93(__nt), __end)); + __symbols.push((__start, __Symbol::Variant95(__nt), __end)); (1, 266) } pub(crate) fn __reduce879< @@ -29940,7 +29962,7 @@ mod __parse__Top { let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); let __nt = super::__action285::<>(mode, &__start, &__end); - __symbols.push((__start, __Symbol::Variant93(__nt), __end)); + __symbols.push((__start, __Symbol::Variant95(__nt), __end)); (0, 266) } pub(crate) fn __reduce880< @@ -29951,14 +29973,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypedParameter = Identifier, ":", Test<"all"> => ActionFn(1458); + // TypedParameter = Identifier, ":", Test<"all"> => ActionFn(1469); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1458::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1469::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (3, 267) } @@ -29970,11 +29992,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypedParameter = Identifier => ActionFn(1459); + // TypedParameter = Identifier => ActionFn(1470); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1459::<>(mode, __sym0); + let __nt = super::__action1470::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (1, 267) } @@ -29991,7 +30013,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action203::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant94(__nt), __end)); + __symbols.push((__start, __Symbol::Variant96(__nt), __end)); (1, 268) } pub(crate) fn __reduce883< @@ -30007,7 +30029,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action204::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant94(__nt), __end)); + __symbols.push((__start, __Symbol::Variant96(__nt), __end)); (1, 268) } pub(crate) fn __reduce884< @@ -30023,7 +30045,7 @@ mod __parse__Top { let __start = __sym0.0; let __end = __sym0.2; let __nt = super::__action205::<>(mode, __sym0); - __symbols.push((__start, __Symbol::Variant94(__nt), __end)); + __symbols.push((__start, __Symbol::Variant96(__nt), __end)); (1, 268) } pub(crate) fn __reduce885< @@ -30034,11 +30056,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // UntypedParameter = Identifier => ActionFn(1460); + // UntypedParameter = Identifier => ActionFn(1471); let __sym0 = __pop_Variant22(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1460::<>(mode, __sym0); + let __nt = super::__action1471::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant10(__nt), __end)); (1, 269) } @@ -30050,11 +30072,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ValuePattern = MatchNameOrAttr => ActionFn(1461); - let __sym0 = __pop_Variant14(__symbols); + // ValuePattern = MatchNameOrAttr => ActionFn(1472); + let __sym0 = __pop_Variant45(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1461::<>(mode, __sym0); + let __nt = super::__action1472::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant34(__nt), __end)); (1, 270) } @@ -30066,7 +30088,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WhileStatement = "while", NamedExpressionTest, ":", Suite, "else", ":", Suite => ActionFn(1103); + // WhileStatement = "while", NamedExpressionTest, ":", Suite, "else", ":", Suite => ActionFn(1101); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant24(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -30077,7 +30099,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1103::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1101::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (7, 271) } @@ -30089,7 +30111,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WhileStatement = "while", NamedExpressionTest, ":", Suite => ActionFn(1104); + // WhileStatement = "while", NamedExpressionTest, ":", Suite => ActionFn(1102); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant24(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -30097,7 +30119,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1104::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1102::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 271) } @@ -30109,11 +30131,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItem<"all"> = Test<"all"> => ActionFn(1462); + // WithItem<"all"> = Test<"all"> => ActionFn(297); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1462::<>(mode, __sym0); + let __nt = super::__action297::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant17(__nt), __end)); (1, 272) } @@ -30141,11 +30163,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItem<"no-withitems"> = Test<"no-withitems"> => ActionFn(1463); + // WithItem<"no-withitems"> = Test<"no-withitems"> => ActionFn(292); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1463::<>(mode, __sym0); + let __nt = super::__action292::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant17(__nt), __end)); (1, 273) } @@ -30173,14 +30195,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItemAs = Test<"all">, "as", Expression<"all"> => ActionFn(1464); + // WithItemAs = Test<"all">, "as", Expression<"all"> => ActionFn(1473); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1464::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1473::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant17(__nt), __end)); (3, 274) } @@ -30192,7 +30214,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", ")" => ActionFn(1471); + // WithItems = "(", OneOrMore>, ",", ")" => ActionFn(1175); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -30200,7 +30222,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1471::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1175::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (4, 275) } @@ -30212,14 +30234,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ")" => ActionFn(1472); + // WithItems = "(", OneOrMore>, ")" => ActionFn(1176); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant32(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1472::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1176::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (3, 275) } @@ -30231,7 +30253,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", WithItemAs, ",", ")" => ActionFn(1474); + // WithItems = "(", OneOrMore>, ",", WithItemAs, ",", ")" => ActionFn(1178); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -30241,7 +30263,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1474::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1178::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (6, 275) } @@ -30253,7 +30275,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", WithItemAs, ",", ")" => ActionFn(1475); + // WithItems = "(", WithItemAs, ",", ")" => ActionFn(1179); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -30261,7 +30283,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1475::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1179::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (4, 275) } @@ -30273,7 +30295,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", WithItemAs, ("," >)+, ",", ")" => ActionFn(1476); + // WithItems = "(", OneOrMore>, ",", WithItemAs, ("," >)+, ",", ")" => ActionFn(1180); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -30284,7 +30306,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1476::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1180::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (7, 275) } @@ -30296,7 +30318,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", WithItemAs, ("," >)+, ",", ")" => ActionFn(1477); + // WithItems = "(", WithItemAs, ("," >)+, ",", ")" => ActionFn(1181); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -30305,7 +30327,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1477::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1181::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (5, 275) } @@ -30317,7 +30339,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", WithItemAs, ")" => ActionFn(1478); + // WithItems = "(", OneOrMore>, ",", WithItemAs, ")" => ActionFn(1182); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant17(__symbols); @@ -30326,7 +30348,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1478::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1182::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (5, 275) } @@ -30338,14 +30360,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", WithItemAs, ")" => ActionFn(1479); + // WithItems = "(", WithItemAs, ")" => ActionFn(1183); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant17(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1479::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1183::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (3, 275) } @@ -30357,7 +30379,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", WithItemAs, ("," >)+, ")" => ActionFn(1480); + // WithItems = "(", OneOrMore>, ",", WithItemAs, ("," >)+, ")" => ActionFn(1184); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant18(__symbols); @@ -30367,7 +30389,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1480::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1184::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (6, 275) } @@ -30379,7 +30401,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", WithItemAs, ("," >)+, ")" => ActionFn(1481); + // WithItems = "(", WithItemAs, ("," >)+, ")" => ActionFn(1185); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant18(__symbols); @@ -30387,7 +30409,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1481::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1185::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (4, 275) } @@ -30433,11 +30455,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItemsNoAs = OneOrMore> => ActionFn(1465); + // WithItemsNoAs = OneOrMore> => ActionFn(160); let __sym0 = __pop_Variant32(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1465::<>(mode, __sym0); + let __nt = super::__action160::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (1, 276) } @@ -30449,7 +30471,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithStatement = "async", "with", WithItems, ":", Suite => ActionFn(931); + // WithStatement = "async", "with", WithItems, ":", Suite => ActionFn(929); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant24(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -30458,7 +30480,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action931::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action929::<>(mode, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (5, 277) } @@ -30470,7 +30492,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithStatement = "with", WithItems, ":", Suite => ActionFn(932); + // WithStatement = "with", WithItems, ":", Suite => ActionFn(930); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant24(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -30478,7 +30500,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action932::<>(mode, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action930::<>(mode, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant36(__nt), __end)); (4, 277) } @@ -30490,14 +30512,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // XorExpression<"all"> = XorExpression<"all">, "^", AndExpression<"all"> => ActionFn(1466); + // XorExpression<"all"> = XorExpression<"all">, "^", AndExpression<"all"> => ActionFn(1474); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1466::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1474::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 278) } @@ -30525,14 +30547,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // XorExpression<"no-withitems"> = XorExpression<"all">, "^", AndExpression<"all"> => ActionFn(1467); + // XorExpression<"no-withitems"> = XorExpression<"all">, "^", AndExpression<"all"> => ActionFn(1475); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant14(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1467::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1475::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 279) } @@ -30560,13 +30582,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // YieldExpr = "yield", GenericList => ActionFn(1699); + // YieldExpr = "yield", GenericList => ActionFn(1695); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant14(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1699::<>(mode, __sym0, __sym1); + let __nt = super::__action1695::<>(mode, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (2, 280) } @@ -30578,11 +30600,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // YieldExpr = "yield" => ActionFn(1700); + // YieldExpr = "yield" => ActionFn(1696); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1700::<>(mode, __sym0); + let __nt = super::__action1696::<>(mode, __sym0); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (1, 280) } @@ -30594,14 +30616,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // YieldExpr = "yield", "from", Test<"all"> => ActionFn(1469); + // YieldExpr = "yield", "from", Test<"all"> => ActionFn(1477); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant14(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1469::<>(mode, __sym0, __sym1, __sym2); + let __nt = super::__action1477::<>(mode, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant14(__nt), __end)); (3, 280) } @@ -30640,12 +30662,12 @@ fn __action2< mode: Mode, (_, start, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, body, _): (TextSize, ast::Expr, TextSize), + (_, body, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, alloc::vec::Vec, TextSize), (_, end, _): (TextSize, TextSize, TextSize), ) -> ast::Mod { - ast::ModExpression { body: Box::new(body), range: (start..end).into() }.into() + ast::ModExpression { body: Box::new(body.into()), range: (start..end).into() }.into() } #[allow(unused_variables)] @@ -30942,13 +30964,13 @@ fn __action25< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, targets, _): (TextSize, Vec, TextSize), + (_, targets, _): (TextSize, Vec, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Stmt { { ast::Stmt::Delete( - ast::StmtDelete { targets: targets.into_iter().map(|expr| set_context(expr, ast::ExprContext::Del)).collect(), range: (location..end_location).into() } + ast::StmtDelete { targets: targets.into_iter().map(|expr| set_context(expr.into(), ast::ExprContext::Del)).collect(), range: (location..end_location).into() } ) } } @@ -30959,8 +30981,8 @@ fn __action26< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, expression, _): (TextSize, ast::Expr, TextSize), - (_, suffix, _): (TextSize, alloc::vec::Vec, TextSize), + (_, expression, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, suffix, _): (TextSize, alloc::vec::Vec, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -30968,16 +30990,16 @@ fn __action26< // Just an expression, no assignment: if suffix.is_empty() { ast::Stmt::Expr( - ast::StmtExpr { value: Box::new(expression), range: (location..end_location).into() } + ast::StmtExpr { value: Box::new(expression.into()), range: (location..end_location).into() } ) } else { - let mut targets = vec![set_context(expression, ast::ExprContext::Store)]; + let mut targets = vec![set_context(expression.into(), ast::ExprContext::Store)]; let mut values = suffix; - let value = Box::new(values.pop().unwrap()); + let value = Box::new(values.pop().unwrap().into()); for target in values { - targets.push(set_context(target, ast::ExprContext::Store)); + targets.push(set_context(target.into(), ast::ExprContext::Store)); } ast::Stmt::Assign( @@ -30993,18 +31015,18 @@ fn __action27< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, target, _): (TextSize, ast::Expr, TextSize), + (_, target, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, op, _): (TextSize, ast::Operator, TextSize), - (_, rhs, _): (TextSize, ast::Expr, TextSize), + (_, rhs, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Stmt { { ast::Stmt::AugAssign( ast::StmtAugAssign { - target: Box::new(set_context(target, ast::ExprContext::Store)), + target: Box::new(set_context(target.into(), ast::ExprContext::Store)), op, - value: Box::new(rhs), + value: Box::new(rhs.into()), range: (location..end_location).into() }, ) @@ -31017,20 +31039,20 @@ fn __action28< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, target, _): (TextSize, ast::Expr, TextSize), + (_, target, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, annotation, _): (TextSize, ast::Expr, TextSize), - (_, rhs, _): (TextSize, core::option::Option, TextSize), + (_, annotation, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, rhs, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Stmt { { - let simple = target.is_name_expr(); + let simple = target.expr.is_name_expr(); ast::Stmt::AnnAssign( ast::StmtAnnAssign { - target: Box::new(set_context(target, ast::ExprContext::Store)), - annotation: Box::new(annotation), - value: rhs.map(Box::new), + target: Box::new(set_context(target.into(), ast::ExprContext::Store)), + annotation: Box::new(annotation.into()), + value: rhs.map(ast::Expr::from).map(Box::new), simple, range: (location..end_location).into() }, @@ -31044,8 +31066,8 @@ fn __action29< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { e } @@ -31056,8 +31078,8 @@ fn __action30< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { e } @@ -31067,8 +31089,8 @@ fn __action30< fn __action31< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -31078,8 +31100,8 @@ fn __action31< fn __action32< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -31089,8 +31111,8 @@ fn __action32< fn __action33< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -31100,8 +31122,8 @@ fn __action33< fn __action34< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -31111,8 +31133,8 @@ fn __action34< fn __action35< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -31122,8 +31144,8 @@ fn __action35< fn __action36< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -31133,8 +31155,8 @@ fn __action36< fn __action37< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -31144,8 +31166,8 @@ fn __action37< fn __action38< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -31155,8 +31177,8 @@ fn __action38< fn __action39< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -31342,13 +31364,13 @@ fn __action55< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, value, _): (TextSize, core::option::Option, TextSize), + (_, value, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Stmt { { ast::Stmt::Return( - ast::StmtReturn { value: value.map(Box::new), range: (location..end_location).into() } + ast::StmtReturn { value: value.map(ast::Expr::from).map(Box::new), range: (location..end_location).into() } ) } } @@ -31359,13 +31381,13 @@ fn __action56< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, expression, _): (TextSize, ast::Expr, TextSize), + (_, expression, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Stmt { { ast::Stmt::Expr( - ast::StmtExpr { value: Box::new(expression), range: (location..end_location).into() } + ast::StmtExpr { value: Box::new(expression.into()), range: (location..end_location).into() } ) } } @@ -31405,14 +31427,14 @@ fn __action59< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, t, _): (TextSize, ast::Expr, TextSize), - (_, c, _): (TextSize, core::option::Option, TextSize), + (_, exc, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, cause, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Stmt { { ast::Stmt::Raise( - ast::StmtRaise { exc: Some(Box::new(t)), cause: c.map(Box::new), range: (location..end_location).into() } + ast::StmtRaise { exc: Some(Box::new(exc.into())), cause: cause.map(ast::Expr::from).map(Box::new), range: (location..end_location).into() } ) } } @@ -31632,16 +31654,16 @@ fn __action73< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, test, _): (TextSize, ast::Expr, TextSize), - (_, msg, _): (TextSize, core::option::Option, TextSize), + (_, test, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, msg, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Stmt { { ast::Stmt::Assert( ast::StmtAssert { - test: Box::new(test), - msg: msg.map(Box::new), + test: Box::new(test.into()), + msg: msg.map(ast::Expr::from).map(Box::new), range: (location..end_location).into() } ) @@ -31684,7 +31706,7 @@ fn __action75< (_, location, _): (TextSize, TextSize, TextSize), (_, c, _): (TextSize, (IpyEscapeKind, String), TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { if mode == Mode::Jupyter { @@ -31695,13 +31717,11 @@ fn __action75< location, })?; } - Ok(ast::Expr::IpyEscapeCommand( - ast::ExprIpyEscapeCommand { - kind: c.0, - value: c.1, - range: (location..end_location).into() - } - )) + Ok(ast::ExprIpyEscapeCommand { + kind: c.0, + value: c.1, + range: (location..end_location).into() + }.into()) } else { Err(LexicalError { error: LexicalErrorType::OtherError("IPython escape commands are only allowed in Jupyter mode".to_string()), @@ -31717,7 +31737,7 @@ fn __action76< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, suffix, _): (TextSize, alloc::vec::Vec, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> Result> @@ -31778,7 +31798,7 @@ fn __action76< }; let mut value = String::new(); - unparse_expr(&e, &mut value)?; + unparse_expr(&e.into(), &mut value)?; Ok(ast::Stmt::IpyEscapeCommand( ast::StmtIpyEscapeCommand { @@ -31885,7 +31905,7 @@ fn __action85< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, subject, _): (TextSize, ast::Expr, TextSize), + (_, subject, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), @@ -31903,7 +31923,7 @@ fn __action85< .end(); ast::Stmt::Match( ast::StmtMatch { - subject: Box::new(subject), + subject: Box::new(subject.into()), cases, range: (location..end_location).into() } @@ -31918,7 +31938,7 @@ fn __action86< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, subject, _): (TextSize, ast::Expr, TextSize), + (_, subject, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), @@ -31937,7 +31957,7 @@ fn __action86< .end(); ast::Stmt::Match( ast::StmtMatch { - subject: Box::new(subject), + subject: Box::new(subject.into()), cases, range: (location..end_location).into() } @@ -31952,7 +31972,7 @@ fn __action87< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, subjects, _): (TextSize, Vec, TextSize), + (_, elts, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), @@ -31969,11 +31989,12 @@ fn __action87< .last() .unwrap() .end(); + let elts = elts.into_iter().map(ast::Expr::from).collect(); ast::Stmt::Match( ast::StmtMatch { subject: Box::new(ast::Expr::Tuple( ast::ExprTuple { - elts: subjects, + elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }, @@ -32016,11 +32037,11 @@ fn __action89< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, guard, _): (TextSize, ast::Expr, TextSize), + (_, guard, _): (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Expr { { - guard + guard.into() } } @@ -32352,11 +32373,11 @@ fn __action111< (_, location, _): (TextSize, TextSize, TextSize), (_, value, _): (TextSize, ast::Constant, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { ast::Expr::Constant( ast::ExprConstant { value, kind: None, range: (location..end_location).into() } - ) + ).into() } #[allow(unused_variables)] @@ -32364,8 +32385,8 @@ fn __action111< fn __action112< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -32377,17 +32398,17 @@ fn __action113< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, operand, _): (TextSize, ast::Expr, TextSize), + (_, operand, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { ast::Expr::UnaryOp( ast::ExprUnaryOp { op: ast::UnaryOp::USub, - operand: Box::new(operand), + operand: Box::new(operand.into()), range: (location..end_location).into() } - ) + ).into() } #[allow(unused_variables)] @@ -32396,20 +32417,18 @@ fn __action114< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, left, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, op, _): (TextSize, ast::Operator, TextSize), - (_, right, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { - left: Box::new(left), - op, - right: Box::new(right), - range: (location..end_location).into() - } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -32466,12 +32485,12 @@ fn __action118< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, value, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Pattern { ast::PatternMatchValue { - value: Box::new(value), + value: Box::new(value.into()), range: (location..end_location).into() }.into() } @@ -32482,12 +32501,12 @@ fn __action119< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, value, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Pattern { ast::PatternMatchValue { - value: Box::new(value), + value: Box::new(value.into()), range: (location..end_location).into() }.into() } @@ -32552,14 +32571,12 @@ fn __action123< (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Expr { - ast::Expr::Attribute( - ast::ExprAttribute { - value: Box::new(name), - attr, - ctx: ast::ExprContext::Load, - range: (location..end_location).into() - }, - ) + ast::ExprAttribute { + value: Box::new(name), + attr, + ctx: ast::ExprContext::Load, + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -32574,14 +32591,12 @@ fn __action124< (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Expr { - ast::Expr::Attribute( - ast::ExprAttribute { - value: Box::new(e), - attr, - ctx: ast::ExprContext::Load, - range: (location..end_location).into() - }, - ) + ast::ExprAttribute { + value: Box::new(e), + attr, + ctx: ast::ExprContext::Load, + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -32616,10 +32631,10 @@ fn __action126< fn __action127< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Expr { - __0 + e.into() } #[allow(unused_variables)] @@ -32627,10 +32642,10 @@ fn __action127< fn __action128< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Expr { - __0 + e.into() } #[allow(unused_variables)] @@ -32643,13 +32658,11 @@ fn __action129< (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Expr { - ast::Expr::Constant( - ast::ExprConstant { - value: ast::Constant::None, - kind: None, - range: (location..end_location).into() - }, - ) + ast::ExprConstant { + value: ast::Constant::None, + kind: None, + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -32662,13 +32675,11 @@ fn __action130< (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Expr { - ast::Expr::Constant( - ast::ExprConstant { - value: true.into(), - kind: None, - range: (location..end_location).into() - }, - ) + ast::ExprConstant { + value: true.into(), + kind: None, + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -32681,13 +32692,11 @@ fn __action131< (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Expr { - ast::Expr::Constant( - ast::ExprConstant { - value: false.into(), - kind: None, - range: (location..end_location).into() - }, - ) + ast::ExprConstant { + value: false.into(), + kind: None, + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -32969,17 +32978,17 @@ fn __action145< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, test, _): (TextSize, ast::Expr, TextSize), + (_, test, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), - (_, s2, _): (TextSize, alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>, TextSize), + (_, s2, _): (TextSize, alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>, TextSize), (_, s3, _): (TextSize, core::option::Option<(TextSize, ast::Suite)>, TextSize), ) -> ast::Stmt { { let elif_else_clauses: Vec<_> = s2.into_iter().map(|(start, test, body)| ast::ElifElseClause { range: (start..body.last().unwrap().end()).into(), - test: Some(test), + test: Some(test.into()), body, }).chain(s3.into_iter().map(|(start, body)| ast::ElifElseClause { range: (start..body.last().unwrap().end()).into(), @@ -32992,7 +33001,7 @@ fn __action145< .map_or_else(|| body.last().unwrap().end(), Ranged::end); ast::Stmt::If( - ast::StmtIf { test: Box::new(test), body, elif_else_clauses, range: (location..end_location).into() } + ast::StmtIf { test: Box::new(test.into()), body, elif_else_clauses, range: (location..end_location).into() } ) } } @@ -33004,7 +33013,7 @@ fn __action146< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, test, _): (TextSize, ast::Expr, TextSize), + (_, test, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), (_, s2, _): (TextSize, core::option::Option, TextSize), @@ -33019,7 +33028,7 @@ fn __action146< .end(); ast::Stmt::While( ast::StmtWhile { - test: Box::new(test), + test: Box::new(test.into()), body, orelse, range: (location..end_location).into() @@ -33036,9 +33045,9 @@ fn __action147< (_, location, _): (TextSize, TextSize, TextSize), (_, is_async, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, target, _): (TextSize, ast::Expr, TextSize), + (_, target, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, iter, _): (TextSize, ast::Expr, TextSize), + (_, iter, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), (_, orelse, _): (TextSize, core::option::Option, TextSize), @@ -33051,8 +33060,8 @@ fn __action147< .or_else(|| body.last()) .unwrap() .end(); - let target = Box::new(set_context(target, ast::ExprContext::Store)); - let iter = Box::new(iter); + let target = Box::new(set_context(target.into(), ast::ExprContext::Store)); + let iter = Box::new(iter.into()); ast::Stmt::For(ast::StmtFor { target, iter, body, orelse, is_async: is_async.is_some(), range: (location..end_location).into() }) } } @@ -33168,7 +33177,7 @@ fn __action151< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, typ, _): (TextSize, ast::Expr, TextSize), + (_, typ, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), ) -> ast::ExceptHandler @@ -33177,7 +33186,7 @@ fn __action151< let end_location = body.last().unwrap().end(); ast::ExceptHandler::ExceptHandler( ast::ExceptHandlerExceptHandler { - type_: Some(Box::new(typ)), + type_: Some(Box::new(typ.into())), name: None, body, range: (location..end_location).into() @@ -33194,7 +33203,7 @@ fn __action152< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, x, _): (TextSize, (ast::Expr, ast::Identifier), TextSize), + (_, x, _): (TextSize, (ast::ParenthesizedExpr, ast::Identifier), TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), ) -> ast::ExceptHandler @@ -33203,7 +33212,7 @@ fn __action152< let end_location = body.last().unwrap().end(); ast::ExceptHandler::ExceptHandler( ast::ExceptHandlerExceptHandler { - type_: Some(Box::new(x.0)), + type_: Some(Box::new(x.0.into())), name: Some(x.1), body, range: (location..end_location).into() @@ -33219,7 +33228,7 @@ fn __action153< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, typ, _): (TextSize, core::option::Option, TextSize), + (_, typ, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), ) -> ast::ExceptHandler @@ -33228,7 +33237,7 @@ fn __action153< let end_location = body.last().unwrap().end(); ast::ExceptHandler::ExceptHandler( ast::ExceptHandlerExceptHandler { - type_: typ.map(Box::new), + type_: typ.map(ast::Expr::from).map(Box::new), name: None, body, range: (location..end_location).into() @@ -33244,7 +33253,7 @@ fn __action154< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, x, _): (TextSize, (ast::Expr, ast::Identifier), TextSize), + (_, x, _): (TextSize, (ast::ParenthesizedExpr, ast::Identifier), TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), ) -> ast::ExceptHandler @@ -33253,7 +33262,7 @@ fn __action154< let end_location = body.last().unwrap().end(); ast::ExceptHandler::ExceptHandler( ast::ExceptHandlerExceptHandler { - type_: Some(Box::new(x.0)), + type_: Some(Box::new(x.0.into())), name: Some(x.1), body, range: (location..end_location).into() @@ -33318,10 +33327,28 @@ fn __action157< fn __action158< >( mode: Mode, - (_, __0, _): (TextSize, ast::WithItem, TextSize), + (_, item, _): (TextSize, ast::WithItem, TextSize), ) -> Vec { - vec![__0] + { + // Special-case: if the `WithItem` is a parenthesized named expression, then the item + // should _exclude_ the outer parentheses in its range. For example: + // ```python + // with (a := 0): pass + // ``` + // In this case, the `(` and `)` are part of the `with` statement. + // The same applies to `yield` and `yield from`. + let item = if matches!(item.context_expr, ast::Expr::NamedExpr(_) | ast::Expr::Yield(_) | ast::Expr::YieldFrom(_)) { + ast::WithItem { + range: item.range().add_start(TextSize::new(1)).sub_end(TextSize::new(1)), + context_expr: item.context_expr, + optional_vars: item.optional_vars, + } + } else { + item + }; + vec![item] + } } #[allow(unused_variables)] @@ -33343,13 +33370,15 @@ fn __action159< fn __action160< >( mode: Mode, - (_, location, _): (TextSize, TextSize, TextSize), - (_, all, _): (TextSize, Vec, TextSize), - (_, end_location, _): (TextSize, TextSize, TextSize), + (_, all, _): (TextSize, Vec, TextSize), ) -> Vec { { - all.into_iter().map(|context_expr| ast::WithItem { context_expr, optional_vars: None, range: (location..end_location).into() }).collect() + all.into_iter().map(|context_expr| ast::WithItem { + range: context_expr.range(), + context_expr: context_expr.into(), + optional_vars: None, + }).collect() } } @@ -33359,15 +33388,19 @@ fn __action161< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, context_expr, _): (TextSize, ast::Expr, TextSize), + (_, context_expr, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, vars, _): (TextSize, ast::Expr, TextSize), + (_, optional_vars, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::WithItem { { - let optional_vars = Some(Box::new(set_context(vars, ast::ExprContext::Store))); - ast::WithItem { context_expr, optional_vars, range: (location..end_location).into() } + let optional_vars = Some(Box::new(set_context(optional_vars.into(), ast::ExprContext::Store))); + ast::WithItem { + context_expr: context_expr.into(), + optional_vars, + range: (location..end_location).into(), + } } } @@ -33382,17 +33415,26 @@ fn __action162< (_, _, _): (TextSize, token::Tok, TextSize), (_, name, _): (TextSize, ast::Identifier, TextSize), (_, type_params, _): (TextSize, core::option::Option, TextSize), - (_, args, _): (TextSize, ast::Parameters, TextSize), - (_, r, _): (TextSize, core::option::Option, TextSize), + (_, parameters, _): (TextSize, ast::Parameters, TextSize), + (_, returns, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), ) -> ast::Stmt { { - let args = Box::new(args); - let returns = r.map(Box::new); + let parameters = Box::new(parameters); + let returns = returns.map(ast::Expr::from).map(Box::new); let end_location = body.last().unwrap().end(); - ast::StmtFunctionDef { name, parameters:args, body, decorator_list, returns, type_params, is_async: is_async.is_some(), range: (location..end_location).into() }.into() + ast::StmtFunctionDef { + name, + parameters, + body, + decorator_list, + returns, + type_params, + is_async: is_async.is_some(), + range: (location..end_location).into(), + }.into() } } @@ -33406,9 +33448,11 @@ fn __action163< (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Expr { - ast::Expr::Name( - ast::ExprName { id: name.into(), ctx: ast::ExprContext::Store, range: (location..end_location).into() }, - ) + ast::ExprName { + id: name.into(), + ctx: ast::ExprContext::Store, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -33421,7 +33465,7 @@ fn __action164< (_, name, _): (TextSize, ast::Expr, TextSize), (_, type_params, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, value, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -33429,7 +33473,7 @@ fn __action164< ast::Stmt::TypeAlias( ast::StmtTypeAlias { name: Box::new(name), - value: Box::new(value), + value: Box::new(value.into()), type_params, range: (location..end_location).into() }, @@ -33469,13 +33513,13 @@ fn __action166< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, arg, _): (TextSize, ast::Identifier, TextSize), + (_, name, _): (TextSize, ast::Identifier, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::ParameterWithDefault { { - let def = ast::Parameter { name:arg, annotation: None, range: (location..end_location).into() }; - ast::ParameterWithDefault { parameter:def, default: None, range: (location..end_location).into() } + let parameter = ast::Parameter { name, annotation: None, range: (location..end_location).into() }; + ast::ParameterWithDefault { parameter, default: None, range: (location..end_location).into() } } } @@ -33498,15 +33542,15 @@ fn __action168< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, arg, _): (TextSize, ast::Identifier, TextSize), - (_, a, _): (TextSize, core::option::Option, TextSize), + (_, name, _): (TextSize, ast::Identifier, TextSize), + (_, annotation, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::ParameterWithDefault { { - let annotation = a.map(Box::new); - let def = ast::Parameter { name:arg, annotation, range: (location..end_location).into() }; - ast::ParameterWithDefault { parameter:def, default: None, range: (location..end_location).into() } + let annotation = annotation.map(ast::Expr::from).map(Box::new); + let parameter = ast::Parameter { name, annotation, range: (location..end_location).into() }; + ast::ParameterWithDefault { parameter, default: None, range: (location..end_location).into() } } } @@ -33516,14 +33560,14 @@ fn __action169< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, arg, _): (TextSize, ast::Identifier, TextSize), - (_, a, _): (TextSize, core::option::Option, TextSize), + (_, name, _): (TextSize, ast::Identifier, TextSize), + (_, annotation, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Parameter { { - let annotation = a.map(Box::new); - ast::Parameter { name:arg, annotation, range: (location..end_location).into() } + let annotation = annotation.map(ast::Expr::from).map(Box::new); + ast::Parameter { name, annotation, range: (location..end_location).into() } } } @@ -33533,14 +33577,14 @@ fn __action170< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, arg, _): (TextSize, ast::Identifier, TextSize), - (_, a, _): (TextSize, core::option::Option, TextSize), + (_, name, _): (TextSize, ast::Identifier, TextSize), + (_, annotation, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Parameter { { - let annotation = a.map(Box::new); - ast::Parameter { name:arg, annotation, range: (location..end_location).into() } + let annotation = annotation.map(ast::Expr::from).map(Box::new); + ast::Parameter { name, annotation, range: (location..end_location).into() } } } @@ -33602,13 +33646,13 @@ fn __action173< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, name, _): (TextSize, ast::Identifier, TextSize), - (_, bound, _): (TextSize, core::option::Option, TextSize), + (_, bound, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::TypeParam { { ast::TypeParam::TypeVar( - ast::TypeParamTypeVar { name, bound: bound.map(Box::new), range: (location..end_location).into() } + ast::TypeParamTypeVar { name, bound: bound.map(ast::Expr::from).map(Box::new), range: (location..end_location).into() } ) } } @@ -33656,13 +33700,13 @@ fn __action176< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, p, _): (TextSize, ast::Expr, TextSize), + (_, expression, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), ) -> ast::Decorator { { - ast::Decorator { range: (location..end_location).into(), expression: p } + ast::Decorator { range: (location..end_location).into(), expression: expression.into() } } } @@ -33673,13 +33717,14 @@ fn __action177< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, value, _): (TextSize, core::option::Option, TextSize), + (_, value, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Yield( - ast::ExprYield { value: value.map(Box::new), range: (location..end_location).into() } - ) + ast::ExprYield { + value: value.map(ast::Expr::from).map(Box::new), + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -33690,13 +33735,14 @@ fn __action178< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::YieldFrom( - ast::ExprYieldFrom { value: Box::new(e), range: (location..end_location).into() } - ) + ast::ExprYieldFrom { + value: Box::new(value.into()), + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -33704,8 +33750,8 @@ fn __action178< fn __action179< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -33715,8 +33761,8 @@ fn __action179< fn __action180< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -33729,11 +33775,13 @@ fn __action181< (_, location, _): (TextSize, TextSize, TextSize), (_, id, _): (TextSize, ast::Identifier, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Name( - ast::ExprName { id: id.into(), ctx: ast::ExprContext::Store, range: (location..end_location).into() }, - ) + ast::ExprName { + id: id.into(), + ctx: ast::ExprContext::Store, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -33742,20 +33790,18 @@ fn __action182< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, target, _): (TextSize, ast::Expr, TextSize), + (_, target, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, value, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - ast::Expr::NamedExpr( - ast::ExprNamedExpr { - target: Box::new(target), - value: Box::new(value), - range: (location..end_location).into(), - } - ) + ast::ExprNamedExpr { + target: Box::new(target.into()), + value: Box::new(value.into()), + range: (location..end_location).into(), + }.into() } } @@ -33770,20 +33816,18 @@ fn __action183< (_, parameters, _): (TextSize, core::option::Option, TextSize), (_, end_location_args, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, body, _): (TextSize, ast::Expr, TextSize), + (_, body, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { parameters.as_ref().map(validate_arguments).transpose()?; - Ok(ast::Expr::Lambda( - ast::ExprLambda { - parameters: parameters.map(Box::new), - body: Box::new(body), - range: (location..end_location).into() - } - )) + Ok(ast::ExprLambda { + parameters: parameters.map(Box::new), + body: Box::new(body.into()), + range: (location..end_location).into() + }.into()) } } @@ -34036,14 +34080,10 @@ fn __action205< fn __action206< >( mode: Mode, - (_, location, _): (TextSize, TextSize, TextSize), - (_, s1, _): (TextSize, ast::Expr, TextSize), - (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { - { - s1 - } + __0 } #[allow(unused_variables)] @@ -34052,15 +34092,17 @@ fn __action207< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, s1, _): (TextSize, ast::Expr, TextSize), + (_, s1, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - ast::Expr::Tuple( - ast::ExprTuple { elts: vec![s1], ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - ) + ast::ExprTuple { + elts: vec![s1.into()], + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } } @@ -34070,15 +34112,18 @@ fn __action208< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, elts, _): (TextSize, Vec, TextSize), + (_, elts, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - ) + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprTuple { + elts, + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } } @@ -34087,8 +34132,8 @@ fn __action208< fn __action209< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -34099,20 +34144,20 @@ fn __action210< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e1, _): (TextSize, core::option::Option, TextSize), + (_, lower, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, core::option::Option, TextSize), - (_, e3, _): (TextSize, core::option::Option>, TextSize), + (_, upper, _): (TextSize, core::option::Option, TextSize), + (_, step, _): (TextSize, core::option::Option>, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - let lower = e1.map(Box::new); - let upper = e2.map(Box::new); - let step = e3.flatten().map(Box::new); + let lower = lower.map(ast::Expr::from).map(Box::new); + let upper = upper.map(ast::Expr::from).map(Box::new); + let step = step.flatten().map(ast::Expr::from).map(Box::new); ast::Expr::Slice( ast::ExprSlice { lower, upper, step, range: (location..end_location).into() } - ) + ).into() } } @@ -34123,8 +34168,8 @@ fn __action211< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, core::option::Option, TextSize), -) -> Option + (_, e, _): (TextSize, core::option::Option, TextSize), +) -> Option { e } @@ -34134,9 +34179,9 @@ fn __action211< fn __action212< >( mode: Mode, - (_, e, _): (TextSize, Vec, TextSize), + (_, e, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), -) -> Vec +) -> Vec { e } @@ -34146,9 +34191,9 @@ fn __action212< fn __action213< >( mode: Mode, - (_, elements, _): (TextSize, Vec<(Option>, ast::Expr)>, TextSize), + (_, elements, _): (TextSize, Vec<(Option>, ast::ParenthesizedExpr)>, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), -) -> Vec<(Option>, ast::Expr)> +) -> Vec<(Option>, ast::ParenthesizedExpr)> { elements } @@ -34158,10 +34203,10 @@ fn __action213< fn __action214< >( mode: Mode, - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, e1, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), -) -> (ast::Expr, ast::Expr) + (_, e2, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> (ast::ParenthesizedExpr, ast::ParenthesizedExpr) { (e1, e2) } @@ -34171,8 +34216,8 @@ fn __action214< fn __action215< >( mode: Mode, - (_, e, _): (TextSize, (ast::Expr, ast::Expr), TextSize), -) -> (Option>, ast::Expr) + (_, e, _): (TextSize, (ast::ParenthesizedExpr, ast::ParenthesizedExpr), TextSize), +) -> (Option>, ast::ParenthesizedExpr) { (Some(Box::new(e.0)), e.1) } @@ -34183,8 +34228,8 @@ fn __action216< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> (Option>, ast::Expr) + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> (Option>, ast::ParenthesizedExpr) { (None, e) } @@ -34194,9 +34239,9 @@ fn __action216< fn __action217< >( mode: Mode, - (_, e1, _): (TextSize, Vec, TextSize), + (_, e1, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), -) -> Vec +) -> Vec { e1 } @@ -34206,8 +34251,8 @@ fn __action217< fn __action218< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -34217,8 +34262,8 @@ fn __action218< fn __action219< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -34228,8 +34273,8 @@ fn __action219< fn __action220< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -34239,9 +34284,9 @@ fn __action220< fn __action221< >( mode: Mode, - (_, elements, _): (TextSize, Vec, TextSize), + (_, elements, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, core::option::Option, TextSize), -) -> Vec +) -> Vec { elements } @@ -34251,8 +34296,8 @@ fn __action221< fn __action222< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -34264,13 +34309,15 @@ fn __action223< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Starred( - ast::ExprStarred { value: Box::new(e), ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - ) + ast::ExprStarred { + value: Box::new(value.into()), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -34292,18 +34339,19 @@ fn __action225< (_, location, _): (TextSize, TextSize, TextSize), (_, is_async, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, target, _): (TextSize, ast::Expr, TextSize), + (_, target, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, iter, _): (TextSize, ast::Expr, TextSize), - (_, ifs, _): (TextSize, alloc::vec::Vec, TextSize), + (_, iter, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, ifs, _): (TextSize, alloc::vec::Vec, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::Comprehension { { let is_async = is_async.is_some(); + let ifs = ifs.into_iter().map(ast::Expr::from).collect(); ast::Comprehension { - target: set_context(target, ast::ExprContext::Store), - iter, + target: set_context(target.into(), ast::ExprContext::Store), + iter: iter.into(), ifs, is_async, range: (location..end_location).into() @@ -34316,8 +34364,8 @@ fn __action225< fn __action226< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -34328,8 +34376,8 @@ fn __action227< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, c, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, c, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { c } @@ -34362,21 +34410,21 @@ fn __action229< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), - (_, c, _): (TextSize, core::option::Option>, TextSize), + (_, elt, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, generators, _): (TextSize, core::option::Option>, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { { - let expr = match c { - Some(c) => ast::Expr::GeneratorExp( + let expr = match generators { + Some(generators) => ast::Expr::GeneratorExp( ast::ExprGeneratorExp { - elt: Box::new(e), - generators: c, + elt: Box::new(elt.into()), + generators, range: (location..end_location).into() } ), - None => e, + None => elt.into(), }; (None, expr) } @@ -34390,11 +34438,11 @@ fn __action230< (_, location, _): (TextSize, TextSize, TextSize), (_, i, _): (TextSize, ast::Identifier, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { - (Some((location, end_location, Some(i))), e) + (Some((location, end_location, Some(i))), e.into()) } #[allow(unused_variables)] @@ -34404,14 +34452,14 @@ fn __action231< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { { - let expr = ast::Expr::Starred( - ast::ExprStarred { value: Box::new(e), ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - ); + let expr = ast::Expr::Starred(ast::ExprStarred { + value: Box::new(value.into()), ctx: ast::ExprContext::Load, range: (location..end_location).into(), + }); (None, expr) } } @@ -34423,11 +34471,11 @@ fn __action232< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { - (Some((location, end_location, None)), e) + (Some((location, end_location, None)), e.into()) } #[allow(unused_variables)] @@ -34523,7 +34571,7 @@ fn __action240< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> alloc::vec::Vec +) -> alloc::vec::Vec { alloc::vec![] } @@ -34533,8 +34581,8 @@ fn __action240< fn __action241< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), +) -> alloc::vec::Vec { v } @@ -34545,16 +34593,14 @@ fn __action242< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, mut values, _): (TextSize, alloc::vec::Vec, TextSize), - (_, last, _): (TextSize, ast::Expr, TextSize), + (_, values, _): (TextSize, alloc::vec::Vec, TextSize), + (_, last, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - values.push(last); - ast::Expr::BoolOp( - ast::ExprBoolOp { op: ast::BoolOp::Or, values, range: (location..end_location).into() } - ) + let values = values.into_iter().chain(std::iter::once(last)).map(ast::Expr::from).collect(); + ast::ExprBoolOp { op: ast::BoolOp::Or, values, range: (location..end_location).into() }.into() } } @@ -34563,8 +34609,8 @@ fn __action242< fn __action243< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -34598,18 +34644,20 @@ fn __action246< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, elts, _): (TextSize, Vec, TextSize), + (_, elts, _): (TextSize, Vec, TextSize), (_, trailing_comma, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { if elts.len() == 1 && trailing_comma.is_none() { - elts.into_iter().next().unwrap() + ast::ParenthesizedExpr { + expr: elts.into_iter().next().unwrap().into(), + range: (location..end_location).into(), + } } else { - ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into() } } } @@ -34619,8 +34667,8 @@ fn __action246< fn __action247< >( mode: Mode, - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { vec![e] } @@ -34630,10 +34678,10 @@ fn __action247< fn __action248< >( mode: Mode, - (_, mut v, _): (TextSize, Vec, TextSize), + (_, mut v, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { { v.push(e); @@ -34647,18 +34695,20 @@ fn __action249< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, elts, _): (TextSize, Vec, TextSize), + (_, elts, _): (TextSize, Vec, TextSize), (_, trailing_comma, _): (TextSize, core::option::Option, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { if elts.len() == 1 && trailing_comma.is_none() { - elts.into_iter().next().unwrap() + ast::ParenthesizedExpr { + expr: elts.into_iter().next().unwrap().into(), + range: (location..end_location).into(), + } } else { - ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into() } } } @@ -34668,8 +34718,8 @@ fn __action249< fn __action250< >( mode: Mode, - (_, e, _): (TextSize, (Option>, ast::Expr), TextSize), -) -> Vec<(Option>, ast::Expr)> + (_, e, _): (TextSize, (Option>, ast::ParenthesizedExpr), TextSize), +) -> Vec<(Option>, ast::ParenthesizedExpr)> { vec![e] } @@ -34679,10 +34729,10 @@ fn __action250< fn __action251< >( mode: Mode, - (_, mut v, _): (TextSize, Vec<(Option>, ast::Expr)>, TextSize), + (_, mut v, _): (TextSize, Vec<(Option>, ast::ParenthesizedExpr)>, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, (Option>, ast::Expr), TextSize), -) -> Vec<(Option>, ast::Expr)> + (_, e, _): (TextSize, (Option>, ast::ParenthesizedExpr), TextSize), +) -> Vec<(Option>, ast::ParenthesizedExpr)> { { v.push(e); @@ -34695,8 +34745,8 @@ fn __action251< fn __action252< >( mode: Mode, - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { vec![e] } @@ -34706,10 +34756,10 @@ fn __action252< fn __action253< >( mode: Mode, - (_, mut v, _): (TextSize, Vec, TextSize), + (_, mut v, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { { v.push(e); @@ -34722,8 +34772,8 @@ fn __action253< fn __action254< >( mode: Mode, - (_, __0, _): (TextSize, Option, TextSize), -) -> core::option::Option> + (_, __0, _): (TextSize, Option, TextSize), +) -> core::option::Option> { Some(__0) } @@ -34735,7 +34785,7 @@ fn __action255< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option> +) -> core::option::Option> { None } @@ -34745,10 +34795,10 @@ fn __action255< fn __action256< >( mode: Mode, - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, e1, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e2, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { vec![e1, e2] } @@ -34758,10 +34808,10 @@ fn __action256< fn __action257< >( mode: Mode, - (_, mut v, _): (TextSize, Vec, TextSize), + (_, mut v, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { { v.push(e); @@ -34956,8 +35006,8 @@ fn __action267< fn __action268< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { Some(__0) } @@ -34969,7 +35019,7 @@ fn __action269< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -34980,8 +35030,8 @@ fn __action270< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -34991,8 +35041,8 @@ fn __action270< fn __action271< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { Some(__0) } @@ -35004,7 +35054,7 @@ fn __action272< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -35015,8 +35065,8 @@ fn __action273< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -35169,8 +35219,8 @@ fn __action280< fn __action281< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { Some(__0) } @@ -35182,7 +35232,7 @@ fn __action282< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -35193,8 +35243,8 @@ fn __action283< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -35250,8 +35300,8 @@ fn __action287< fn __action288< >( mode: Mode, - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { vec![e] } @@ -35261,10 +35311,10 @@ fn __action288< fn __action289< >( mode: Mode, - (_, mut v, _): (TextSize, Vec, TextSize), + (_, mut v, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { { v.push(e); @@ -35300,12 +35350,16 @@ fn __action291< fn __action292< >( mode: Mode, - (_, location, _): (TextSize, TextSize, TextSize), - (_, context_expr, _): (TextSize, ast::Expr, TextSize), - (_, end_location, _): (TextSize, TextSize, TextSize), + (_, context_expr, _): (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::WithItem { - ast::WithItem { context_expr, optional_vars: None, range: (location..end_location).into() } + { + ast::WithItem { + range: context_expr.range(), + context_expr: context_expr.into(), + optional_vars: None, + } + } } #[allow(unused_variables)] @@ -35359,12 +35413,16 @@ fn __action296< fn __action297< >( mode: Mode, - (_, location, _): (TextSize, TextSize, TextSize), - (_, context_expr, _): (TextSize, ast::Expr, TextSize), - (_, end_location, _): (TextSize, TextSize, TextSize), + (_, context_expr, _): (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::WithItem { - ast::WithItem { context_expr, optional_vars: None, range: (location..end_location).into() } + { + ast::WithItem { + range: context_expr.range(), + context_expr: context_expr.into(), + optional_vars: None, + } + } } #[allow(unused_variables)] @@ -35418,8 +35476,8 @@ fn __action301< fn __action302< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { Some(__0) } @@ -35431,7 +35489,7 @@ fn __action303< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -35441,10 +35499,10 @@ fn __action303< fn __action304< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, __1, _): (TextSize, ast::Identifier, TextSize), -) -> (ast::Expr, ast::Identifier) +) -> (ast::ParenthesizedExpr, ast::Identifier) { (__0, __1) } @@ -35634,7 +35692,7 @@ fn __action320< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)> +) -> alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)> { alloc::vec![] } @@ -35644,8 +35702,8 @@ fn __action320< fn __action321< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>, TextSize), -) -> alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)> + (_, v, _): (TextSize, alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>, TextSize), +) -> alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)> { v } @@ -35657,10 +35715,10 @@ fn __action322< mode: Mode, (_, __0, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, __1, _): (TextSize, ast::Expr, TextSize), + (_, __1, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, __2, _): (TextSize, ast::Suite, TextSize), -) -> (TextSize, ast::Expr, ast::Suite) +) -> (TextSize, ast::ParenthesizedExpr, ast::Suite) { (__0, __1, __2) } @@ -35931,10 +35989,10 @@ fn __action342< fn __action343< >( mode: Mode, - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, e1, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e2, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { vec![e1, e2] } @@ -35944,10 +36002,10 @@ fn __action343< fn __action344< >( mode: Mode, - (_, mut v, _): (TextSize, Vec, TextSize), + (_, mut v, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { { v.push(e); @@ -36018,15 +36076,18 @@ fn __action350< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op: ast::Operator::BitOr, right: Box::new(e2), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::BitOr, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -36034,8 +36095,8 @@ fn __action350< fn __action351< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -36045,8 +36106,8 @@ fn __action351< fn __action352< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { Some(__0) } @@ -36058,7 +36119,7 @@ fn __action353< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -36069,8 +36130,8 @@ fn __action354< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -36293,8 +36354,8 @@ fn __action371< fn __action372< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { Some(__0) } @@ -36306,7 +36367,7 @@ fn __action373< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -36317,8 +36378,8 @@ fn __action374< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -36328,8 +36389,8 @@ fn __action374< fn __action375< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { Some(__0) } @@ -36341,7 +36402,7 @@ fn __action376< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -36351,8 +36412,8 @@ fn __action376< fn __action377< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> core::option::Option + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { Some(__0) } @@ -36364,7 +36425,7 @@ fn __action378< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option +) -> core::option::Option { None } @@ -36375,22 +36436,20 @@ fn __action379< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, body, _): (TextSize, ast::Expr, TextSize), + (_, body, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, test, _): (TextSize, ast::Expr, TextSize), + (_, test, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, orelse, _): (TextSize, ast::Expr, TextSize), + (_, orelse, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::IfExp( - ast::ExprIfExp { - test: Box::new(test), - body: Box::new(body), - orelse: Box::new(orelse), - range: (location..end_location).into() - } - ) + ast::ExprIfExp { + test: Box::new(test.into()), + body: Box::new(body.into()), + orelse: Box::new(orelse.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -36398,8 +36457,8 @@ fn __action379< fn __action380< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -36409,8 +36468,8 @@ fn __action380< fn __action381< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -36422,7 +36481,7 @@ fn __action382< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> alloc::vec::Vec +) -> alloc::vec::Vec { alloc::vec![] } @@ -36432,8 +36491,8 @@ fn __action382< fn __action383< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), +) -> alloc::vec::Vec { v } @@ -36603,8 +36662,8 @@ fn __action397< fn __action398< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { alloc::vec![__0] } @@ -36614,9 +36673,9 @@ fn __action398< fn __action399< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { { let mut v = v; v.push(e); v } } @@ -36662,15 +36721,18 @@ fn __action403< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op: ast::Operator::BitXor, right: Box::new(e2), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::BitXor, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -36678,8 +36740,8 @@ fn __action403< fn __action404< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -36735,8 +36797,8 @@ fn __action408< fn __action409< >( mode: Mode, - (_, __0, _): (TextSize, (TextSize, ast::Expr, ast::Suite), TextSize), -) -> alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)> + (_, __0, _): (TextSize, (TextSize, ast::ParenthesizedExpr, ast::Suite), TextSize), +) -> alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)> { alloc::vec![__0] } @@ -36746,9 +36808,9 @@ fn __action409< fn __action410< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>, TextSize), - (_, e, _): (TextSize, (TextSize, ast::Expr, ast::Suite), TextSize), -) -> alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)> + (_, v, _): (TextSize, alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>, TextSize), + (_, e, _): (TextSize, (TextSize, ast::ParenthesizedExpr, ast::Suite), TextSize), +) -> alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)> { { let mut v = v; v.push(e); v } } @@ -36759,22 +36821,20 @@ fn __action411< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, body, _): (TextSize, ast::Expr, TextSize), + (_, body, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, test, _): (TextSize, ast::Expr, TextSize), + (_, test, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, orelse, _): (TextSize, ast::Expr, TextSize), + (_, orelse, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::IfExp( - ast::ExprIfExp { - test: Box::new(test), - body: Box::new(body), - orelse: Box::new(orelse), - range: (location..end_location).into() - } - ) + ast::ExprIfExp { + test: Box::new(test.into()), + body: Box::new(body.into()), + orelse: Box::new(orelse.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -36782,8 +36842,8 @@ fn __action411< fn __action412< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -36793,8 +36853,8 @@ fn __action412< fn __action413< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37061,8 +37121,8 @@ fn __action431< fn __action432< >( mode: Mode, - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { vec![e] } @@ -37072,10 +37132,10 @@ fn __action432< fn __action433< >( mode: Mode, - (_, mut v, _): (TextSize, Vec, TextSize), + (_, mut v, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> Vec + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Vec { { v.push(e); @@ -37088,8 +37148,8 @@ fn __action433< fn __action434< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { alloc::vec![__0] } @@ -37099,9 +37159,9 @@ fn __action434< fn __action435< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { { let mut v = v; v.push(e); v } } @@ -37111,9 +37171,9 @@ fn __action435< fn __action436< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { __0 } @@ -37124,16 +37184,14 @@ fn __action437< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, mut values, _): (TextSize, alloc::vec::Vec, TextSize), - (_, last, _): (TextSize, ast::Expr, TextSize), + (_, values, _): (TextSize, alloc::vec::Vec, TextSize), + (_, last, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - values.push(last); - ast::Expr::BoolOp( - ast::ExprBoolOp { op: ast::BoolOp::And, values, range: (location..end_location).into() } - ) + let values = values.into_iter().chain(std::iter::once(last)).map(ast::Expr::from).collect(); + ast::ExprBoolOp { op: ast::BoolOp::And, values, range: (location..end_location).into() }.into() } } @@ -37142,8 +37200,8 @@ fn __action437< fn __action438< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37153,8 +37211,8 @@ fn __action438< fn __action439< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { alloc::vec![__0] } @@ -37164,9 +37222,9 @@ fn __action439< fn __action440< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { { let mut v = v; v.push(e); v } } @@ -37257,8 +37315,8 @@ fn __action447< fn __action448< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { alloc::vec![__0] } @@ -37268,9 +37326,9 @@ fn __action448< fn __action449< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { { let mut v = v; v.push(e); v } } @@ -37280,9 +37338,9 @@ fn __action449< fn __action450< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { __0 } @@ -37294,13 +37352,15 @@ fn __action451< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, operand, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::UnaryOp( - ast::ExprUnaryOp { operand: Box::new(e), op: ast::UnaryOp::Not, range: (location..end_location).into() } - ) + ast::ExprUnaryOp { + operand: Box::new(operand.into()), + op: ast::UnaryOp::Not, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -37308,8 +37368,8 @@ fn __action451< fn __action452< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37417,12 +37477,12 @@ fn __action461< mode: Mode, (_, mut i, _): (TextSize, ast::ParameterWithDefault, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, default, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::ParameterWithDefault { { - i.default = Some(Box::new(e)); + i.default = Some(Box::new(default.into())); i.range = (i.range.start()..end_location).into(); i } @@ -37554,12 +37614,12 @@ fn __action472< mode: Mode, (_, mut i, _): (TextSize, ast::ParameterWithDefault, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, default, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), ) -> ast::ParameterWithDefault { { - i.default = Some(Box::new(e)); + i.default = Some(Box::new(default.into())); i.range = (i.range.start()..end_location).into(); i } @@ -37617,16 +37677,14 @@ fn __action477< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, mut values, _): (TextSize, alloc::vec::Vec, TextSize), - (_, last, _): (TextSize, ast::Expr, TextSize), + (_, values, _): (TextSize, alloc::vec::Vec, TextSize), + (_, last, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - values.push(last); - ast::Expr::BoolOp( - ast::ExprBoolOp { op: ast::BoolOp::Or, values, range: (location..end_location).into() } - ) + let values = values.into_iter().chain(std::iter::once(last)).map(ast::Expr::from).collect(); + ast::ExprBoolOp { op: ast::BoolOp::Or, values, range: (location..end_location).into() }.into() } } @@ -37635,8 +37693,8 @@ fn __action477< fn __action478< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37647,15 +37705,18 @@ fn __action479< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op: ast::Operator::BitAnd, right: Box::new(e2), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::BitAnd, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -37663,8 +37724,8 @@ fn __action479< fn __action480< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37675,15 +37736,18 @@ fn __action481< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, op, _): (TextSize, ast::Operator, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op, right: Box::new(e2), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -37691,8 +37755,8 @@ fn __action481< fn __action482< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37703,16 +37767,14 @@ fn __action483< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, mut values, _): (TextSize, alloc::vec::Vec, TextSize), - (_, last, _): (TextSize, ast::Expr, TextSize), + (_, values, _): (TextSize, alloc::vec::Vec, TextSize), + (_, last, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - values.push(last); - ast::Expr::BoolOp( - ast::ExprBoolOp { op: ast::BoolOp::And, values, range: (location..end_location).into() } - ) + let values = values.into_iter().chain(std::iter::once(last)).map(ast::Expr::from).collect(); + ast::ExprBoolOp { op: ast::BoolOp::And, values, range: (location..end_location).into() }.into() } } @@ -37721,8 +37783,8 @@ fn __action483< fn __action484< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37779,16 +37841,14 @@ fn __action489< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, left, _): (TextSize, ast::Expr, TextSize), - (_, comparisons, _): (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::Expr)>, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, comparisons, _): (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - let (ops, comparators) = comparisons.into_iter().unzip(); - ast::Expr::Compare( - ast::ExprCompare { left: Box::new(left), ops, comparators, range: (location..end_location).into() } - ) + let (ops, comparators) = comparisons.into_iter().map(|(op, comparator)| (op, ast::Expr::from(comparator))).unzip(); + ast::ExprCompare { left: Box::new(left.into()), ops, comparators, range: (location..end_location).into() }.into() } } @@ -37797,8 +37857,8 @@ fn __action489< fn __action490< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37808,8 +37868,8 @@ fn __action490< fn __action491< >( mode: Mode, - (_, __0, _): (TextSize, (ast::CmpOp, ast::Expr), TextSize), -) -> alloc::vec::Vec<(ast::CmpOp, ast::Expr)> + (_, __0, _): (TextSize, (ast::CmpOp, ast::ParenthesizedExpr), TextSize), +) -> alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)> { alloc::vec![__0] } @@ -37819,9 +37879,9 @@ fn __action491< fn __action492< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::Expr)>, TextSize), - (_, e, _): (TextSize, (ast::CmpOp, ast::Expr), TextSize), -) -> alloc::vec::Vec<(ast::CmpOp, ast::Expr)> + (_, v, _): (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>, TextSize), + (_, e, _): (TextSize, (ast::CmpOp, ast::ParenthesizedExpr), TextSize), +) -> alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)> { { let mut v = v; v.push(e); v } } @@ -37832,8 +37892,8 @@ fn __action493< >( mode: Mode, (_, __0, _): (TextSize, ast::CmpOp, TextSize), - (_, __1, _): (TextSize, ast::Expr, TextSize), -) -> (ast::CmpOp, ast::Expr) + (_, __1, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> (ast::CmpOp, ast::ParenthesizedExpr) { (__0, __1) } @@ -37845,13 +37905,15 @@ fn __action494< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, operand, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::UnaryOp( - ast::ExprUnaryOp { operand: Box::new(e), op: ast::UnaryOp::Not, range: (location..end_location).into() } - ) + ast::ExprUnaryOp { + operand: Box::new(operand.into()), + op: ast::UnaryOp::Not, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -37859,8 +37921,8 @@ fn __action494< fn __action495< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37871,15 +37933,18 @@ fn __action496< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, a, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, op, _): (TextSize, ast::Operator, TextSize), - (_, b, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(a), op, right: Box::new(b), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -37887,8 +37952,8 @@ fn __action496< fn __action497< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37899,15 +37964,18 @@ fn __action498< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, a, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, op, _): (TextSize, ast::Operator, TextSize), - (_, b, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(a), op, right: Box::new(b), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -37915,8 +37983,8 @@ fn __action498< fn __action499< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37927,16 +37995,14 @@ fn __action500< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, left, _): (TextSize, ast::Expr, TextSize), - (_, comparisons, _): (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::Expr)>, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, comparisons, _): (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - let (ops, comparators) = comparisons.into_iter().unzip(); - ast::Expr::Compare( - ast::ExprCompare { left: Box::new(left), ops, comparators, range: (location..end_location).into() } - ) + let (ops, comparators) = comparisons.into_iter().map(|(op, comparator)| (op, ast::Expr::from(comparator))).unzip(); + ast::ExprCompare { left: Box::new(left.into()), ops, comparators, range: (location..end_location).into() }.into() } } @@ -37945,8 +38011,8 @@ fn __action500< fn __action501< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37957,15 +38023,18 @@ fn __action502< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op: ast::Operator::BitOr, right: Box::new(e2), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::BitOr, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -37973,8 +38042,8 @@ fn __action502< fn __action503< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -37986,13 +38055,15 @@ fn __action504< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, op, _): (TextSize, ast::UnaryOp, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, operand, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::UnaryOp( - ast::ExprUnaryOp { operand: Box::new(e), op, range: (location..end_location).into() } - ) + ast::ExprUnaryOp { + operand: Box::new(operand.into()), + op, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38000,8 +38071,8 @@ fn __action504< fn __action505< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38012,15 +38083,18 @@ fn __action506< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, b, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e), op: ast::Operator::Pow, right: Box::new(b), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::Pow, + right: Box::new(right.into()), + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38028,8 +38102,8 @@ fn __action506< fn __action507< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38040,15 +38114,18 @@ fn __action508< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op: ast::Operator::BitXor, right: Box::new(e2), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::BitXor, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -38056,8 +38133,8 @@ fn __action508< fn __action509< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38068,15 +38145,18 @@ fn __action510< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op: ast::Operator::BitAnd, right: Box::new(e2), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::BitAnd, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -38084,8 +38164,8 @@ fn __action510< fn __action511< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38097,14 +38177,12 @@ fn __action512< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, atom, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - ast::Expr::Await( - ast::ExprAwait { value: Box::new(atom), range: (location..end_location).into() } - ) + ast::ExprAwait { value: Box::new(value.into()), range: (location..end_location).into() }.into() } } @@ -38113,8 +38191,8 @@ fn __action512< fn __action513< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38124,8 +38202,8 @@ fn __action513< fn __action514< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38136,16 +38214,16 @@ fn __action515< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, f, _): (TextSize, ast::Expr, TextSize), + (_, func, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, arguments, _): (TextSize, ast::Arguments, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - { - ast::Expr::Call( - ast::ExprCall { func: Box::new(f), arguments, range: (location..end_location).into() } - ) - } + ast::ExprCall { + func: Box::new(func.into()), + arguments, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38154,16 +38232,19 @@ fn __action516< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, s, _): (TextSize, ast::Expr, TextSize), + (_, slice, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Subscript( - ast::ExprSubscript { value: Box::new(e), slice: Box::new(s), ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + ast::ExprSubscript { + value: Box::new(value.into()), + slice: Box::new(slice.into()), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38172,15 +38253,18 @@ fn __action517< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, attr, _): (TextSize, ast::Identifier, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Attribute( - ast::ExprAttribute { value: Box::new(e), attr, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + ast::ExprAttribute { + value: Box::new(value.into()), + attr, + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38189,15 +38273,18 @@ fn __action518< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e1, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, op, _): (TextSize, ast::Operator, TextSize), - (_, e2, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e1), op, right: Box::new(e2), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into() + }.into() } #[allow(unused_variables)] @@ -38205,8 +38292,8 @@ fn __action518< fn __action519< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38217,15 +38304,18 @@ fn __action520< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, a, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, op, _): (TextSize, ast::Operator, TextSize), - (_, b, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(a), op, right: Box::new(b), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38233,8 +38323,8 @@ fn __action520< fn __action521< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38246,9 +38336,9 @@ fn __action522< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, s, _): (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), -) -> Result> +) -> Result> { - Ok(parse_strings(s)?) + Ok(parse_strings(s)?.into()) } #[allow(unused_variables)] @@ -38259,11 +38349,13 @@ fn __action523< (_, location, _): (TextSize, TextSize, TextSize), (_, value, _): (TextSize, ast::Constant, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant( - ast::ExprConstant { value, kind: None, range: (location..end_location).into() } - ) + ast::ExprConstant { + value, + kind: None, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38274,11 +38366,13 @@ fn __action524< (_, location, _): (TextSize, TextSize, TextSize), (_, id, _): (TextSize, ast::Identifier, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Name( - ast::ExprName { id: id.into(), ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + ast::ExprName { + id: id.into(), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38288,16 +38382,14 @@ fn __action525< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, core::option::Option>, TextSize), + (_, elts, _): (TextSize, core::option::Option>, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - let elts = e.unwrap_or_default(); - ast::Expr::List( - ast::ExprList { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + let elts = elts.into_iter().flatten().map(ast::Expr::from).collect(); + ast::ExprList { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into() } } @@ -38308,16 +38400,14 @@ fn __action526< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, elt, _): (TextSize, ast::Expr, TextSize), + (_, elt, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, generators, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - ast::Expr::ListComp( - ast::ExprListComp { elt: Box::new(elt), generators, range: (location..end_location).into() } - ) + ast::ExprListComp { elt: Box::new(elt.into()), generators, range: (location..end_location).into() }.into() } } @@ -38328,19 +38418,21 @@ fn __action527< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, elts, _): (TextSize, Vec, TextSize), + (_, elts, _): (TextSize, Vec, TextSize), (_, trailing_comma, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { if elts.len() == 1 && trailing_comma.is_none() { - elts.into_iter().next().unwrap() + ast::ParenthesizedExpr { + expr: elts.into_iter().next().unwrap().into(), + range: (location..end_location).into(), + } } else { - ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into() } } } @@ -38352,28 +38444,29 @@ fn __action528< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, left, _): (TextSize, core::option::Option>, TextSize), - (_, mid, _): (TextSize, ast::Expr, TextSize), - (_, right, _): (TextSize, alloc::vec::Vec, TextSize), + (_, left, _): (TextSize, core::option::Option>, TextSize), + (_, mid, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, right, _): (TextSize, alloc::vec::Vec, TextSize), (_, trailing_comma, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { if left.is_none() && right.is_empty() && trailing_comma.is_none() { - if mid.is_starred_expr() { + if mid.expr.is_starred_expr() { return Err(LexicalError{ error: LexicalErrorType::OtherError("cannot use starred expression here".to_string()), location: mid.start(), })?; } - Ok(mid) + Ok(ast::ParenthesizedExpr { + expr: mid.into(), + range: (location..end_location).into(), + }) } else { - let elts = left.into_iter().flatten().chain([mid]).chain(right).collect(); - Ok(ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - )) + let elts = left.into_iter().flatten().chain([mid]).chain(right).map(ast::Expr::from).collect(); + Ok(ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into()) } } } @@ -38387,11 +38480,13 @@ fn __action529< (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Tuple( - ast::ExprTuple { elts: Vec::new(), ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + ast::ExprTuple { + elts: Vec::new(), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38399,12 +38494,17 @@ fn __action529< fn __action530< >( mode: Mode, + (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), -) -> ast::Expr + (_, end_location, _): (TextSize, TextSize, TextSize), +) -> ast::ParenthesizedExpr { - e + ast::ParenthesizedExpr { + expr: e.into(), + range: (location..end_location).into(), + } } #[allow(unused_variables)] @@ -38414,17 +38514,17 @@ fn __action531< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, elt, _): (TextSize, ast::Expr, TextSize), + (_, elt, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, generators, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - { - ast::Expr::GeneratorExp( - ast::ExprGeneratorExp { elt: Box::new(elt), generators, range: (location..end_location).into() } - ) - } + ast::ExprGeneratorExp { + elt: Box::new(elt.into()), + generators, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38435,10 +38535,10 @@ fn __action532< (_, _, _): (TextSize, token::Tok, TextSize), (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { Err(LexicalError{ @@ -38455,20 +38555,18 @@ fn __action533< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, core::option::Option>, ast::Expr)>>, TextSize), + (_, e, _): (TextSize, core::option::Option>, ast::ParenthesizedExpr)>>, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { let (keys, values) = e .unwrap_or_default() .into_iter() - .map(|(k, v)| (k.map(|x| *x), v)) + .map(|(k, v)| (k.map(|x| ast::Expr::from(*x)), ast::Expr::from(v))) .unzip(); - ast::Expr::Dict( - ast::ExprDict { keys, values, range: (location..end_location).into() } - ) + ast::ExprDict { keys, values, range: (location..end_location).into() }.into() } } @@ -38479,21 +38577,19 @@ fn __action534< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e1, _): (TextSize, (ast::Expr, ast::Expr), TextSize), + (_, e1, _): (TextSize, (ast::ParenthesizedExpr, ast::ParenthesizedExpr), TextSize), (_, generators, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - ast::Expr::DictComp( - ast::ExprDictComp { - key: Box::new(e1.0), - value: Box::new(e1.1), - generators, - range: (location..end_location).into() - } - ) + ast::ExprDictComp { + key: Box::new(e1.0.into()), + value: Box::new(e1.1.into()), + generators, + range: (location..end_location).into() + }.into() } } @@ -38504,14 +38600,18 @@ fn __action535< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, elts, _): (TextSize, Vec, TextSize), + (_, elts, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Set( - ast::ExprSet { elts, range: (location..end_location).into() } - ) + { + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprSet { + elts, + range: (location..end_location).into(), + }.into() + } } #[allow(unused_variables)] @@ -38521,17 +38621,17 @@ fn __action536< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, elt, _): (TextSize, ast::Expr, TextSize), + (_, elt, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, generators, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - { - ast::Expr::SetComp( - ast::ExprSetComp { elt: Box::new(elt), generators, range: (location..end_location).into() } - ) - } + ast::ExprSetComp { + elt: Box::new(elt.into()), + generators, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38542,9 +38642,9 @@ fn __action537< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant(ast::ExprConstant { value: true.into(), kind: None, range: (location..end_location).into() }) + ast::ExprConstant { value: true.into(), kind: None, range: (location..end_location).into() }.into() } #[allow(unused_variables)] @@ -38555,9 +38655,9 @@ fn __action538< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant(ast::ExprConstant { value: false.into(), kind: None, range: (location..end_location).into() }) + ast::ExprConstant { value: false.into(), kind: None, range: (location..end_location).into() }.into() } #[allow(unused_variables)] @@ -38568,9 +38668,9 @@ fn __action539< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant(ast::ExprConstant { value: ast::Constant::None, kind: None, range: (location..end_location).into() }) + ast::ExprConstant { value: ast::Constant::None, kind: None, range: (location..end_location).into() }.into() } #[allow(unused_variables)] @@ -38581,9 +38681,9 @@ fn __action540< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant(ast::ExprConstant { value: ast::Constant::Ellipsis, kind: None, range: (location..end_location).into() }) + ast::ExprConstant { value: ast::Constant::Ellipsis, kind: None, range: (location..end_location).into() }.into() } #[allow(unused_variables)] @@ -38591,8 +38691,8 @@ fn __action540< fn __action541< >( mode: Mode, - (_, __0, _): (TextSize, Vec<(Option>, ast::Expr)>, TextSize), -) -> core::option::Option>, ast::Expr)>> + (_, __0, _): (TextSize, Vec<(Option>, ast::ParenthesizedExpr)>, TextSize), +) -> core::option::Option>, ast::ParenthesizedExpr)>> { Some(__0) } @@ -38604,7 +38704,7 @@ fn __action542< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option>, ast::Expr)>> +) -> core::option::Option>, ast::ParenthesizedExpr)>> { None } @@ -38616,7 +38716,7 @@ fn __action543< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> alloc::vec::Vec +) -> alloc::vec::Vec { alloc::vec![] } @@ -38626,8 +38726,8 @@ fn __action543< fn __action544< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), +) -> alloc::vec::Vec { v } @@ -38638,8 +38738,8 @@ fn __action545< >( mode: Mode, (_, _, _): (TextSize, token::Tok, TextSize), - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38649,8 +38749,8 @@ fn __action545< fn __action546< >( mode: Mode, - (_, __0, _): (TextSize, Vec, TextSize), -) -> core::option::Option> + (_, __0, _): (TextSize, Vec, TextSize), +) -> core::option::Option> { Some(__0) } @@ -38662,7 +38762,7 @@ fn __action547< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option> +) -> core::option::Option> { None } @@ -38672,9 +38772,9 @@ fn __action547< fn __action548< >( mode: Mode, - (_, __0, _): (TextSize, Vec, TextSize), + (_, __0, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), -) -> Vec +) -> Vec { __0 } @@ -38684,8 +38784,8 @@ fn __action548< fn __action549< >( mode: Mode, - (_, __0, _): (TextSize, Vec, TextSize), -) -> core::option::Option> + (_, __0, _): (TextSize, Vec, TextSize), +) -> core::option::Option> { Some(__0) } @@ -38697,7 +38797,7 @@ fn __action550< mode: Mode, __lookbehind: &TextSize, __lookahead: &TextSize, -) -> core::option::Option> +) -> core::option::Option> { None } @@ -38708,15 +38808,18 @@ fn __action551< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, a, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, op, _): (TextSize, ast::Operator, TextSize), - (_, b, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(a), op, right: Box::new(b), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op, + right: Box::new(right.into()), + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38724,8 +38827,8 @@ fn __action551< fn __action552< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38737,13 +38840,15 @@ fn __action553< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, op, _): (TextSize, ast::UnaryOp, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, operand, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::UnaryOp( - ast::ExprUnaryOp { operand: Box::new(e), op, range: (location..end_location).into() } - ) + ast::ExprUnaryOp { + operand: Box::new(operand.into()), + op, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38751,8 +38856,8 @@ fn __action553< fn __action554< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38762,8 +38867,8 @@ fn __action554< fn __action555< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { alloc::vec![__0] } @@ -38773,9 +38878,9 @@ fn __action555< fn __action556< >( mode: Mode, - (_, v, _): (TextSize, alloc::vec::Vec, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + (_, v, _): (TextSize, alloc::vec::Vec, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { { let mut v = v; v.push(e); v } } @@ -38786,15 +38891,18 @@ fn __action557< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, left, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, b, _): (TextSize, ast::Expr, TextSize), + (_, right, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::BinOp( - ast::ExprBinOp { left: Box::new(e), op: ast::Operator::Pow, right: Box::new(b), range: (location..end_location).into() } - ) + ast::ExprBinOp { + left: Box::new(left.into()), + op: ast::Operator::Pow, + right: Box::new(right.into()), + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38802,8 +38910,8 @@ fn __action557< fn __action558< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38815,14 +38923,12 @@ fn __action559< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, atom, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - ast::Expr::Await( - ast::ExprAwait { value: Box::new(atom), range: (location..end_location).into() } - ) + ast::ExprAwait { value: Box::new(value.into()), range: (location..end_location).into() }.into() } } @@ -38831,8 +38937,8 @@ fn __action559< fn __action560< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38842,8 +38948,8 @@ fn __action560< fn __action561< >( mode: Mode, - (_, __0, _): (TextSize, ast::Expr, TextSize), -) -> ast::Expr + (_, __0, _): (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { __0 } @@ -38854,16 +38960,16 @@ fn __action562< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, f, _): (TextSize, ast::Expr, TextSize), + (_, func, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, arguments, _): (TextSize, ast::Arguments, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - { - ast::Expr::Call( - ast::ExprCall { func: Box::new(f), arguments, range: (location..end_location).into() } - ) - } + ast::ExprCall { + func: Box::new(func.into()), + arguments, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38872,16 +38978,19 @@ fn __action563< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, s, _): (TextSize, ast::Expr, TextSize), + (_, slice, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Subscript( - ast::ExprSubscript { value: Box::new(e), slice: Box::new(s), ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + ast::ExprSubscript { + value: Box::new(value.into()), + slice: Box::new(slice.into()), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38890,15 +38999,18 @@ fn __action564< >( mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, value, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, attr, _): (TextSize, ast::Identifier, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Attribute( - ast::ExprAttribute { value: Box::new(e), attr, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + ast::ExprAttribute { + value: Box::new(value.into()), + attr, + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38908,9 +39020,9 @@ fn __action565< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, s, _): (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), -) -> Result> +) -> Result> { - Ok(parse_strings(s)?) + Ok(parse_strings(s)?.into()) } #[allow(unused_variables)] @@ -38921,11 +39033,13 @@ fn __action566< (_, location, _): (TextSize, TextSize, TextSize), (_, value, _): (TextSize, ast::Constant, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant( - ast::ExprConstant { value, kind: None, range: (location..end_location).into() } - ) + ast::ExprConstant { + value, + kind: None, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38936,11 +39050,13 @@ fn __action567< (_, location, _): (TextSize, TextSize, TextSize), (_, id, _): (TextSize, ast::Identifier, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Name( - ast::ExprName { id: id.into(), ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + ast::ExprName { + id: id.into(), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -38950,16 +39066,14 @@ fn __action568< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, core::option::Option>, TextSize), + (_, elts, _): (TextSize, core::option::Option>, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - let elts = e.unwrap_or_default(); - ast::Expr::List( - ast::ExprList { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + let elts = elts.into_iter().flatten().map(ast::Expr::from).collect(); + ast::ExprList { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into() } } @@ -38970,16 +39084,14 @@ fn __action569< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, elt, _): (TextSize, ast::Expr, TextSize), + (_, elt, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, generators, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - ast::Expr::ListComp( - ast::ExprListComp { elt: Box::new(elt), generators, range: (location..end_location).into() } - ) + ast::ExprListComp { elt: Box::new(elt.into()), generators, range: (location..end_location).into() }.into() } } @@ -38990,28 +39102,29 @@ fn __action570< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, left, _): (TextSize, core::option::Option>, TextSize), - (_, mid, _): (TextSize, ast::Expr, TextSize), - (_, right, _): (TextSize, alloc::vec::Vec, TextSize), + (_, left, _): (TextSize, core::option::Option>, TextSize), + (_, mid, _): (TextSize, ast::ParenthesizedExpr, TextSize), + (_, right, _): (TextSize, alloc::vec::Vec, TextSize), (_, trailing_comma, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { if left.is_none() && right.is_empty() && trailing_comma.is_none() { - if mid.is_starred_expr() { + if mid.expr.is_starred_expr() { return Err(LexicalError{ error: LexicalErrorType::OtherError("cannot use starred expression here".to_string()), location: mid.start(), })?; } - Ok(mid) + Ok(ast::ParenthesizedExpr { + expr: mid.into(), + range: (location..end_location).into(), + }) } else { - let elts = left.into_iter().flatten().chain([mid]).chain(right).collect(); - Ok(ast::Expr::Tuple( - ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }, - )) + let elts = left.into_iter().flatten().chain([mid]).chain(right).map(ast::Expr::from).collect(); + Ok(ast::ExprTuple { elts, ctx: ast::ExprContext::Load, range: (location..end_location).into() }.into()) } } } @@ -39025,11 +39138,13 @@ fn __action571< (_, _, _): (TextSize, token::Tok, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Tuple( - ast::ExprTuple { elts: Vec::new(), ctx: ast::ExprContext::Load, range: (location..end_location).into() } - ) + ast::ExprTuple { + elts: Vec::new(), + ctx: ast::ExprContext::Load, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -39037,12 +39152,17 @@ fn __action571< fn __action572< >( mode: Mode, + (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), -) -> ast::Expr + (_, end_location, _): (TextSize, TextSize, TextSize), +) -> ast::ParenthesizedExpr { - e + ast::ParenthesizedExpr { + expr: e.into(), + range: (location..end_location).into(), + } } #[allow(unused_variables)] @@ -39052,17 +39172,17 @@ fn __action573< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, elt, _): (TextSize, ast::Expr, TextSize), + (_, elt, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, generators, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - { - ast::Expr::GeneratorExp( - ast::ExprGeneratorExp { elt: Box::new(elt), generators, range: (location..end_location).into() } - ) - } + ast::ExprGeneratorExp { + elt: Box::new(elt.into()), + generators, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -39073,10 +39193,10 @@ fn __action574< (_, _, _): (TextSize, token::Tok, TextSize), (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, ast::Expr, TextSize), + (_, e, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { { Err(LexicalError{ @@ -39093,20 +39213,18 @@ fn __action575< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e, _): (TextSize, core::option::Option>, ast::Expr)>>, TextSize), + (_, e, _): (TextSize, core::option::Option>, ast::ParenthesizedExpr)>>, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { let (keys, values) = e .unwrap_or_default() .into_iter() - .map(|(k, v)| (k.map(|x| *x), v)) + .map(|(k, v)| (k.map(|x| ast::Expr::from(*x)), ast::Expr::from(v))) .unzip(); - ast::Expr::Dict( - ast::ExprDict { keys, values, range: (location..end_location).into() } - ) + ast::ExprDict { keys, values, range: (location..end_location).into() }.into() } } @@ -39117,21 +39235,19 @@ fn __action576< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, e1, _): (TextSize, (ast::Expr, ast::Expr), TextSize), + (_, e1, _): (TextSize, (ast::ParenthesizedExpr, ast::ParenthesizedExpr), TextSize), (_, generators, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { { - ast::Expr::DictComp( - ast::ExprDictComp { - key: Box::new(e1.0), - value: Box::new(e1.1), - generators, - range: (location..end_location).into() - } - ) + ast::ExprDictComp { + key: Box::new(e1.0.into()), + value: Box::new(e1.1.into()), + generators, + range: (location..end_location).into() + }.into() } } @@ -39142,14 +39258,18 @@ fn __action577< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, elts, _): (TextSize, Vec, TextSize), + (_, elts, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Set( - ast::ExprSet { elts, range: (location..end_location).into() } - ) + { + let elts = elts.into_iter().map(ast::Expr::from).collect(); + ast::ExprSet { + elts, + range: (location..end_location).into(), + }.into() + } } #[allow(unused_variables)] @@ -39159,17 +39279,17 @@ fn __action578< mode: Mode, (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), - (_, elt, _): (TextSize, ast::Expr, TextSize), + (_, elt, _): (TextSize, ast::ParenthesizedExpr, TextSize), (_, generators, _): (TextSize, Vec, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - { - ast::Expr::SetComp( - ast::ExprSetComp { elt: Box::new(elt), generators, range: (location..end_location).into() } - ) - } + ast::ExprSetComp { + elt: Box::new(elt.into()), + generators, + range: (location..end_location).into(), + }.into() } #[allow(unused_variables)] @@ -39180,9 +39300,9 @@ fn __action579< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant(ast::ExprConstant { value: true.into(), kind: None, range: (location..end_location).into() }) + ast::ExprConstant { value: true.into(), kind: None, range: (location..end_location).into() }.into() } #[allow(unused_variables)] @@ -39193,9 +39313,9 @@ fn __action580< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant(ast::ExprConstant { value: false.into(), kind: None, range: (location..end_location).into() }) + ast::ExprConstant { value: false.into(), kind: None, range: (location..end_location).into() }.into() } #[allow(unused_variables)] @@ -39206,9 +39326,9 @@ fn __action581< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant(ast::ExprConstant { value: ast::Constant::None, kind: None, range: (location..end_location).into() }) + ast::ExprConstant { value: ast::Constant::None, kind: None, range: (location..end_location).into() }.into() } #[allow(unused_variables)] @@ -39219,9 +39339,9 @@ fn __action582< (_, location, _): (TextSize, TextSize, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, end_location, _): (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { - ast::Expr::Constant(ast::ExprConstant { value: ast::Constant::Ellipsis, kind: None, range: (location..end_location).into() }) + ast::ExprConstant { value: ast::Constant::Ellipsis, kind: None, range: (location..end_location).into() }.into() } #[allow(unused_variables)] @@ -39231,11 +39351,11 @@ fn __action583< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Vec, TextSize), + __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __3.0; let __end0 = __3.2; @@ -39262,10 +39382,10 @@ fn __action584< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Vec, TextSize), + __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __3.0; @@ -39293,13 +39413,13 @@ fn __action585< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option>, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, core::option::Option>, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.0; let __end0 = __5.2; @@ -39328,12 +39448,12 @@ fn __action586< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option>, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, core::option::Option>, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __5.0; @@ -39363,13 +39483,13 @@ fn __action587< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option>, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, core::option::Option>, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.0; let __end0 = __5.2; @@ -39398,12 +39518,12 @@ fn __action588< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option>, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, core::option::Option>, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __4.2; let __end0 = __5.0; @@ -39431,9 +39551,9 @@ fn __action588< fn __action589< >( mode: Mode, - __0: (TextSize, Vec<(Option>, ast::Expr)>, TextSize), + __0: (TextSize, Vec<(Option>, ast::ParenthesizedExpr)>, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Vec<(Option>, ast::Expr)> +) -> Vec<(Option>, ast::ParenthesizedExpr)> { let __start0 = __1.0; let __end0 = __1.2; @@ -39454,8 +39574,8 @@ fn __action589< fn __action590< >( mode: Mode, - __0: (TextSize, Vec<(Option>, ast::Expr)>, TextSize), -) -> Vec<(Option>, ast::Expr)> + __0: (TextSize, Vec<(Option>, ast::ParenthesizedExpr)>, TextSize), +) -> Vec<(Option>, ast::ParenthesizedExpr)> { let __start0 = __0.2; let __end0 = __0.2; @@ -39477,9 +39597,9 @@ fn __action590< fn __action591< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Vec +) -> Vec { let __start0 = __1.0; let __end0 = __1.2; @@ -39500,8 +39620,8 @@ fn __action591< fn __action592< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> Vec + __0: (TextSize, Vec, TextSize), +) -> Vec { let __start0 = __0.2; let __end0 = __0.2; @@ -39524,10 +39644,10 @@ fn __action593< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __2.0; let __end0 = __2.2; @@ -39551,9 +39671,9 @@ fn __action594< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __2.0; @@ -39578,10 +39698,10 @@ fn __action595< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __2.0; let __end0 = __2.2; @@ -39605,9 +39725,9 @@ fn __action596< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __2.0; @@ -39693,9 +39813,9 @@ fn __action598< fn __action599< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Vec +) -> Vec { let __start0 = __1.0; let __end0 = __1.2; @@ -39716,8 +39836,8 @@ fn __action599< fn __action600< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> Vec + __0: (TextSize, Vec, TextSize), +) -> Vec { let __start0 = __0.2; let __end0 = __0.2; @@ -39943,7 +40063,7 @@ fn __action607< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Vec, TextSize), + __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), @@ -39980,7 +40100,7 @@ fn __action608< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Vec, TextSize), + __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), @@ -40777,9 +40897,9 @@ fn __action634< fn __action635< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> Vec +) -> Vec { let __start0 = __1.0; let __end0 = __1.2; @@ -40800,8 +40920,8 @@ fn __action635< fn __action636< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> Vec + __0: (TextSize, Vec, TextSize), +) -> Vec { let __start0 = __0.2; let __end0 = __0.2; @@ -40824,10 +40944,10 @@ fn __action637< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __2.0; let __end0 = __2.2; @@ -40851,9 +40971,9 @@ fn __action638< >( mode: Mode, __0: (TextSize, TextSize, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __2.0; @@ -41282,9 +41402,9 @@ fn __action653< __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Expr, TextSize), + __5: (TextSize, ast::ParenthesizedExpr, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), __8: (TextSize, core::option::Option, TextSize), @@ -41318,9 +41438,9 @@ fn __action654< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), __7: (TextSize, core::option::Option, TextSize), @@ -41360,7 +41480,7 @@ fn __action655< __4: (TextSize, ast::Identifier, TextSize), __5: (TextSize, core::option::Option, TextSize), __6: (TextSize, ast::Parameters, TextSize), - __7: (TextSize, core::option::Option, TextSize), + __7: (TextSize, core::option::Option, TextSize), __8: (TextSize, token::Tok, TextSize), __9: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -41398,7 +41518,7 @@ fn __action656< __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, core::option::Option, TextSize), __5: (TextSize, ast::Parameters, TextSize), - __6: (TextSize, core::option::Option, TextSize), + __6: (TextSize, core::option::Option, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -41434,10 +41554,10 @@ fn __action657< __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Expr, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, ast::ParenthesizedExpr, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), __7: (TextSize, TextSize, TextSize), ) -> ast::Comprehension { @@ -41468,10 +41588,10 @@ fn __action658< mode: Mode, __0: (TextSize, TextSize, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), __6: (TextSize, TextSize, TextSize), ) -> ast::Comprehension { @@ -42510,10 +42630,10 @@ fn __action695< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), -) -> (TextSize, ast::Expr, ast::Suite) +) -> (TextSize, ast::ParenthesizedExpr, ast::Suite) { let __start0 = __0.0; let __end0 = __0.0; @@ -42590,11 +42710,11 @@ fn __action697< fn __action698< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42619,11 +42739,11 @@ fn __action698< fn __action699< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42648,11 +42768,11 @@ fn __action699< fn __action700< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42677,10 +42797,10 @@ fn __action700< fn __action701< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42704,10 +42824,10 @@ fn __action701< fn __action702< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42760,11 +42880,11 @@ fn __action703< fn __action704< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42789,11 +42909,11 @@ fn __action704< fn __action705< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42848,8 +42968,8 @@ fn __action707< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, core::option::Option, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, core::option::Option, TextSize), __3: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -42877,7 +42997,7 @@ fn __action708< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -42901,7 +43021,7 @@ fn __action709< mode: Mode, __0: (TextSize, ast::Constant, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42926,7 +43046,7 @@ fn __action710< mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42950,10 +43070,10 @@ fn __action711< >( 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), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -42979,11 +43099,11 @@ fn __action712< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43010,11 +43130,11 @@ fn __action713< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43041,10 +43161,10 @@ fn __action714< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43070,13 +43190,13 @@ fn __action715< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -43105,12 +43225,12 @@ fn __action716< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -43140,7 +43260,7 @@ fn __action717< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43165,11 +43285,40 @@ fn __action718< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, TextSize, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.0; + let __end0 = __0.0; + let __temp0 = __action393( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action530( + mode, + __temp0, + __0, + __1, + __2, + __3, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action719< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43192,15 +43341,15 @@ fn __action718< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action719< +fn __action720< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -43223,14 +43372,14 @@ fn __action719< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action720< +fn __action721< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, ast::Expr)>>, TextSize), + __1: (TextSize, core::option::Option>, ast::ParenthesizedExpr)>>, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43252,15 +43401,15 @@ fn __action720< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action721< +fn __action722< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, (ast::Expr, ast::Expr), TextSize), + __1: (TextSize, (ast::ParenthesizedExpr, ast::ParenthesizedExpr), TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43283,14 +43432,14 @@ fn __action721< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action722< +fn __action723< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43312,15 +43461,15 @@ fn __action722< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action723< +fn __action724< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43343,12 +43492,12 @@ fn __action723< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action724< +fn __action725< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43368,12 +43517,12 @@ fn __action724< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action725< +fn __action726< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43393,12 +43542,12 @@ fn __action725< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action726< +fn __action727< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43418,12 +43567,12 @@ fn __action726< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action727< +fn __action728< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43443,11 +43592,11 @@ fn __action727< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action728< +fn __action729< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -43466,12 +43615,12 @@ fn __action728< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action729< +fn __action730< >( mode: Mode, __0: (TextSize, ast::Constant, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43491,12 +43640,12 @@ fn __action729< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action730< +fn __action731< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43516,14 +43665,14 @@ fn __action730< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action731< +fn __action732< >( 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), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43545,15 +43694,15 @@ fn __action731< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action732< +fn __action733< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43576,17 +43725,17 @@ fn __action732< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action733< +fn __action734< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -43611,16 +43760,16 @@ fn __action733< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action734< +fn __action735< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -43644,13 +43793,13 @@ fn __action734< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action735< +fn __action736< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43671,15 +43820,44 @@ fn __action735< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action736< +fn __action737< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, TextSize, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.0; + let __end0 = __0.0; + let __temp0 = __action393( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action572( + mode, + __temp0, + __0, + __1, + __2, + __3, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action738< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43702,15 +43880,15 @@ fn __action736< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action737< +fn __action739< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -43733,14 +43911,14 @@ fn __action737< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action738< +fn __action740< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, ast::Expr)>>, TextSize), + __1: (TextSize, core::option::Option>, ast::ParenthesizedExpr)>>, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43762,15 +43940,15 @@ fn __action738< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action739< +fn __action741< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, (ast::Expr, ast::Expr), TextSize), + __1: (TextSize, (ast::ParenthesizedExpr, ast::ParenthesizedExpr), TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43793,14 +43971,14 @@ fn __action739< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action740< +fn __action742< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43822,15 +44000,15 @@ fn __action740< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action741< +fn __action743< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43853,12 +44031,12 @@ fn __action741< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action742< +fn __action744< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43878,12 +44056,12 @@ fn __action742< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action743< +fn __action745< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43903,12 +44081,12 @@ fn __action743< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action744< +fn __action746< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43928,12 +44106,12 @@ fn __action744< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action745< +fn __action747< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43953,13 +44131,13 @@ fn __action745< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action746< +fn __action748< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Arguments, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -43980,15 +44158,15 @@ fn __action746< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action747< +fn __action749< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44011,14 +44189,14 @@ fn __action747< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action748< +fn __action750< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44040,13 +44218,13 @@ fn __action748< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action749< +fn __action751< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Arguments, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44067,15 +44245,15 @@ fn __action749< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action750< +fn __action752< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44098,14 +44276,14 @@ fn __action750< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action751< +fn __action753< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44127,13 +44305,13 @@ fn __action751< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action752< +fn __action754< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44154,13 +44332,13 @@ fn __action752< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action753< +fn __action755< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44181,7 +44359,7 @@ fn __action753< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action754< +fn __action756< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -44206,7 +44384,7 @@ fn __action754< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action755< +fn __action757< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -44241,7 +44419,7 @@ fn __action755< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action756< +fn __action758< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), @@ -44268,7 +44446,7 @@ fn __action756< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action757< +fn __action759< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), @@ -44295,13 +44473,13 @@ fn __action757< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action758< +fn __action760< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::Expr)>, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44322,13 +44500,13 @@ fn __action758< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action759< +fn __action761< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::Expr)>, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44349,12 +44527,12 @@ fn __action759< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action760< +fn __action762< >( mode: Mode, __0: (TextSize, ast::Constant, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44374,13 +44552,13 @@ fn __action760< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action761< +fn __action763< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44401,11 +44579,11 @@ fn __action761< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action762< +fn __action764< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), __3: (TextSize, token::Tok, TextSize), ) -> ast::Decorator @@ -44430,11 +44608,11 @@ fn __action762< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action763< +fn __action765< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -44457,7 +44635,7 @@ fn __action763< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action764< +fn __action766< >( mode: Mode, __0: (TextSize, String, TextSize), @@ -44482,7 +44660,7 @@ fn __action764< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action765< +fn __action767< >( mode: Mode, __0: (TextSize, String, TextSize), @@ -44509,11 +44687,11 @@ fn __action765< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action766< +fn __action768< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::Parameter { @@ -44536,11 +44714,11 @@ fn __action766< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action767< +fn __action769< >( 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::Suite, TextSize), ) -> ast::ExceptHandler @@ -44565,11 +44743,11 @@ fn __action767< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action768< +fn __action770< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, (ast::Expr, ast::Identifier), TextSize), + __1: (TextSize, (ast::ParenthesizedExpr, ast::Identifier), TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), ) -> ast::ExceptHandler @@ -44594,12 +44772,12 @@ fn __action768< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action769< +fn __action771< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, ast::Suite, TextSize), ) -> ast::ExceptHandler @@ -44625,12 +44803,12 @@ fn __action769< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action770< +fn __action772< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, (ast::Expr, ast::Identifier), TextSize), + __2: (TextSize, (ast::ParenthesizedExpr, ast::Identifier), TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, ast::Suite, TextSize), ) -> ast::ExceptHandler @@ -44656,14 +44834,14 @@ fn __action770< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action771< +fn __action773< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44685,14 +44863,14 @@ fn __action771< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action772< +fn __action774< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44714,11 +44892,11 @@ fn __action772< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action773< +fn __action775< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -44741,12 +44919,12 @@ fn __action773< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action774< +fn __action776< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -44770,13 +44948,13 @@ fn __action774< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action775< +fn __action777< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, core::option::Option, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, core::option::Option, TextSize), __4: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -44801,13 +44979,13 @@ fn __action775< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action776< +fn __action778< >( mode: Mode, __0: (TextSize, ast::UnaryOp, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44828,13 +45006,13 @@ fn __action776< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action777< +fn __action779< >( mode: Mode, __0: (TextSize, ast::UnaryOp, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -44855,7 +45033,7 @@ fn __action777< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action778< +fn __action780< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -44880,7 +45058,7 @@ fn __action778< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action779< +fn __action781< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -44905,11 +45083,11 @@ fn __action779< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action780< +fn __action782< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -44932,10 +45110,10 @@ fn __action780< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action781< +fn __action783< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -44957,14 +45135,14 @@ fn __action781< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action782< +fn __action784< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), __7: (TextSize, core::option::Option, TextSize), @@ -44994,13 +45172,13 @@ fn __action782< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action783< +fn __action785< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Suite, TextSize), __6: (TextSize, core::option::Option, TextSize), @@ -45029,7 +45207,7 @@ fn __action783< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action784< +fn __action786< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -45038,7 +45216,7 @@ fn __action784< __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, core::option::Option, TextSize), __5: (TextSize, ast::Parameters, TextSize), - __6: (TextSize, core::option::Option, TextSize), + __6: (TextSize, core::option::Option, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -45068,7 +45246,7 @@ fn __action784< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action785< +fn __action787< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -45076,7 +45254,7 @@ fn __action785< __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, core::option::Option, TextSize), __4: (TextSize, ast::Parameters, TextSize), - __5: (TextSize, core::option::Option, TextSize), + __5: (TextSize, core::option::Option, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -45105,10 +45283,10 @@ fn __action785< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action786< +fn __action788< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, core::option::Option>, TextSize), __2: (TextSize, TextSize, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) @@ -45132,12 +45310,12 @@ fn __action786< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action787< +fn __action789< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { @@ -45161,11 +45339,11 @@ fn __action787< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action788< +fn __action790< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { @@ -45188,11 +45366,11 @@ fn __action788< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action789< +fn __action791< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { @@ -45215,13 +45393,13 @@ fn __action789< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action790< +fn __action792< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -45242,12 +45420,12 @@ fn __action790< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action791< +fn __action793< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -45267,13 +45445,13 @@ fn __action791< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action792< +fn __action794< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -45294,12 +45472,12 @@ fn __action792< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action793< +fn __action795< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -45319,7 +45497,7 @@ fn __action793< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action794< +fn __action796< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45346,7 +45524,7 @@ fn __action794< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action795< +fn __action797< >( mode: Mode, __0: (TextSize, String, TextSize), @@ -45371,14 +45549,14 @@ fn __action795< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action796< +fn __action798< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), - __4: (TextSize, alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>, TextSize), + __4: (TextSize, alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>, TextSize), __5: (TextSize, core::option::Option<(TextSize, ast::Suite)>, TextSize), ) -> ast::Stmt { @@ -45404,7 +45582,7 @@ fn __action796< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action797< +fn __action799< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -45431,7 +45609,7 @@ fn __action797< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action798< +fn __action800< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -45458,7 +45636,7 @@ fn __action798< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action799< +fn __action801< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -45483,7 +45661,7 @@ fn __action799< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action800< +fn __action802< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45514,7 +45692,7 @@ fn __action800< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action801< +fn __action803< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45543,7 +45721,7 @@ fn __action801< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action802< +fn __action804< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45568,7 +45746,7 @@ fn __action802< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action803< +fn __action805< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45595,7 +45773,7 @@ fn __action803< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action804< +fn __action806< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45626,12 +45804,12 @@ fn __action804< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action805< +fn __action807< >( mode: Mode, __0: (TextSize, (IpyEscapeKind, String), TextSize), __1: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -45651,7 +45829,7 @@ fn __action805< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action806< +fn __action808< >( mode: Mode, __0: (TextSize, (IpyEscapeKind, String), TextSize), @@ -45676,10 +45854,10 @@ fn __action806< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action807< +fn __action809< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, TextSize, TextSize), ) -> Result> @@ -45703,16 +45881,16 @@ fn __action807< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action808< +fn __action810< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.0; let __end0 = __0.0; @@ -45745,7 +45923,7 @@ fn __action808< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action809< +fn __action811< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45770,7 +45948,7 @@ fn __action809< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action810< +fn __action812< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45795,7 +45973,7 @@ fn __action810< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action811< +fn __action813< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45820,10 +45998,10 @@ fn __action811< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action812< +fn __action814< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, TextSize, TextSize), ) -> ast::Pattern { @@ -45845,10 +46023,10 @@ fn __action812< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action813< +fn __action815< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, TextSize, TextSize), ) -> ast::Pattern { @@ -45870,7 +46048,7 @@ fn __action813< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action814< +fn __action816< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), @@ -45895,7 +46073,7 @@ fn __action814< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action815< +fn __action817< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45920,7 +46098,7 @@ fn __action815< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action816< +fn __action818< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45945,7 +46123,7 @@ fn __action816< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action817< +fn __action819< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -45970,7 +46148,7 @@ fn __action817< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action818< +fn __action820< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), @@ -45993,7 +46171,7 @@ fn __action818< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action819< +fn __action821< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -46020,7 +46198,7 @@ fn __action819< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action820< +fn __action822< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -46051,7 +46229,7 @@ fn __action820< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action821< +fn __action823< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -46080,7 +46258,7 @@ fn __action821< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action822< +fn __action824< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -46113,7 +46291,7 @@ fn __action822< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action823< +fn __action825< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -46144,7 +46322,7 @@ fn __action823< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action824< +fn __action826< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -46181,7 +46359,7 @@ fn __action824< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action825< +fn __action827< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -46216,7 +46394,7 @@ fn __action825< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action826< +fn __action828< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -46247,7 +46425,7 @@ fn __action826< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action827< +fn __action829< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -46276,7 +46454,7 @@ fn __action827< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action828< +fn __action830< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -46301,7 +46479,7 @@ fn __action828< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action829< +fn __action831< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), @@ -46330,7 +46508,7 @@ fn __action829< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action830< +fn __action832< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), @@ -46359,11 +46537,11 @@ fn __action830< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action831< +fn __action833< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), @@ -46394,11 +46572,11 @@ fn __action831< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action832< +fn __action834< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), @@ -46431,11 +46609,11 @@ fn __action832< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action833< +fn __action835< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), @@ -46468,11 +46646,11 @@ fn __action833< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action834< +fn __action836< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), @@ -46503,14 +46681,14 @@ fn __action834< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action835< +fn __action837< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -46532,12 +46710,12 @@ fn __action835< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action836< +fn __action838< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -46557,7 +46735,7 @@ fn __action836< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action837< +fn __action839< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -46584,13 +46762,13 @@ fn __action837< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action838< +fn __action840< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -46611,13 +46789,13 @@ fn __action838< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action839< +fn __action841< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -46638,7 +46816,7 @@ fn __action839< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action840< +fn __action842< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -46663,13 +46841,13 @@ fn __action840< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action841< +fn __action843< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -46690,13 +46868,13 @@ fn __action841< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action842< +fn __action844< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -46717,7 +46895,7 @@ fn __action842< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action843< +fn __action845< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -46746,7 +46924,7 @@ fn __action843< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action844< +fn __action846< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -46773,7 +46951,7 @@ fn __action844< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action845< +fn __action847< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -46804,7 +46982,7 @@ fn __action845< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action846< +fn __action848< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -46833,7 +47011,7 @@ fn __action846< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action847< +fn __action849< >( mode: Mode, __0: (TextSize, (Option>, Vec, Option>), TextSize), @@ -46860,7 +47038,7 @@ fn __action847< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action848< +fn __action850< >( mode: Mode, __0: (TextSize, (Option>, Vec, Option>), TextSize), @@ -46885,7 +47063,7 @@ fn __action848< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action849< +fn __action851< >( mode: Mode, __0: (TextSize, Option>, TextSize), @@ -46912,7 +47090,7 @@ fn __action849< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action850< +fn __action852< >( mode: Mode, __0: (TextSize, Option>, TextSize), @@ -46937,7 +47115,7 @@ fn __action850< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action851< +fn __action853< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -46966,7 +47144,7 @@ fn __action851< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action852< +fn __action854< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -46993,7 +47171,7 @@ fn __action852< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action853< +fn __action855< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -47024,7 +47202,7 @@ fn __action853< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action854< +fn __action856< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -47053,7 +47231,7 @@ fn __action854< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action855< +fn __action857< >( mode: Mode, __0: (TextSize, (Option>, Vec, Option>), TextSize), @@ -47080,7 +47258,7 @@ fn __action855< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action856< +fn __action858< >( mode: Mode, __0: (TextSize, (Option>, Vec, Option>), TextSize), @@ -47105,7 +47283,7 @@ fn __action856< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action857< +fn __action859< >( mode: Mode, __0: (TextSize, Option>, TextSize), @@ -47132,7 +47310,7 @@ fn __action857< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action858< +fn __action860< >( mode: Mode, __0: (TextSize, Option>, TextSize), @@ -47157,7 +47335,7 @@ fn __action858< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action859< +fn __action861< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47186,7 +47364,7 @@ fn __action859< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action860< +fn __action862< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47213,7 +47391,7 @@ fn __action860< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action861< +fn __action863< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47244,7 +47422,7 @@ fn __action861< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action862< +fn __action864< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47273,7 +47451,7 @@ fn __action862< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action863< +fn __action865< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47298,7 +47476,7 @@ fn __action863< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action864< +fn __action866< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47321,7 +47499,7 @@ fn __action864< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action865< +fn __action867< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47348,7 +47526,7 @@ fn __action865< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action866< +fn __action868< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47373,7 +47551,7 @@ fn __action866< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action867< +fn __action869< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47402,7 +47580,7 @@ fn __action867< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action868< +fn __action870< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47433,7 +47611,7 @@ fn __action868< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action869< +fn __action871< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47458,7 +47636,7 @@ fn __action869< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action870< +fn __action872< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47485,7 +47663,7 @@ fn __action870< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action871< +fn __action873< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47514,7 +47692,7 @@ fn __action871< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action872< +fn __action874< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47539,7 +47717,7 @@ fn __action872< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action873< +fn __action875< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47574,7 +47752,7 @@ fn __action873< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action874< +fn __action876< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47607,7 +47785,7 @@ fn __action874< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action875< +fn __action877< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47638,7 +47816,7 @@ fn __action875< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action876< +fn __action878< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47667,7 +47845,7 @@ fn __action876< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action877< +fn __action879< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47698,7 +47876,7 @@ fn __action877< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action878< +fn __action880< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47727,7 +47905,7 @@ fn __action878< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action879< +fn __action881< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47754,7 +47932,7 @@ fn __action879< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action880< +fn __action882< >( mode: Mode, __0: (TextSize, ast::Pattern, TextSize), @@ -47781,7 +47959,7 @@ fn __action880< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action881< +fn __action883< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -47808,7 +47986,7 @@ fn __action881< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action882< +fn __action884< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -47833,14 +48011,14 @@ fn __action882< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action883< +fn __action885< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -47862,14 +48040,14 @@ fn __action883< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action884< +fn __action886< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -47891,7 +48069,7 @@ fn __action884< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action885< +fn __action887< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47916,12 +48094,12 @@ fn __action885< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action886< +fn __action888< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, core::option::Option, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, core::option::Option, TextSize), __3: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -47945,7 +48123,7 @@ fn __action886< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action887< +fn __action889< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -47974,7 +48152,7 @@ fn __action887< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action888< +fn __action890< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48001,7 +48179,7 @@ fn __action888< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action889< +fn __action891< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48032,7 +48210,7 @@ fn __action889< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action890< +fn __action892< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48065,7 +48243,7 @@ fn __action890< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action891< +fn __action893< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48096,7 +48274,7 @@ fn __action891< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action892< +fn __action894< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48125,14 +48303,14 @@ fn __action892< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action893< +fn __action895< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48154,14 +48332,14 @@ fn __action893< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action894< +fn __action896< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48183,15 +48361,15 @@ fn __action894< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action895< +fn __action897< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), __6: (TextSize, TextSize, TextSize), ) -> ast::Comprehension { @@ -48218,14 +48396,14 @@ fn __action895< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action896< +fn __action898< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, TextSize, TextSize), ) -> ast::Comprehension { @@ -48251,12 +48429,12 @@ fn __action896< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action897< +fn __action899< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), -) -> Option + __1: (TextSize, core::option::Option, TextSize), +) -> Option { let __start0 = __0.0; let __end0 = __0.0; @@ -48276,13 +48454,13 @@ fn __action897< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action898< +fn __action900< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48303,7 +48481,7 @@ fn __action898< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action899< +fn __action901< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48330,11 +48508,11 @@ fn __action899< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action900< +fn __action902< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::Parameter { @@ -48357,7 +48535,7 @@ fn __action900< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action901< +fn __action903< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -48382,15 +48560,15 @@ fn __action901< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action902< +fn __action904< >( mode: Mode, - __0: (TextSize, core::option::Option, TextSize), + __0: (TextSize, core::option::Option, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, core::option::Option>, TextSize), __4: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48413,38 +48591,13 @@ fn __action902< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action903< +fn __action905< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, TextSize, TextSize), -) -> ast::Expr -{ - let __start0 = __0.0; - let __end0 = __0.0; - let __temp0 = __action393( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action206( - mode, - __temp0, - __0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action904< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48465,13 +48618,13 @@ fn __action904< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action905< +fn __action906< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48492,12 +48645,12 @@ fn __action905< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action906< +fn __action907< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48517,14 +48670,14 @@ fn __action906< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action907< +fn __action908< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48546,14 +48699,14 @@ fn __action907< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action908< +fn __action909< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48575,16 +48728,16 @@ fn __action908< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action909< +fn __action910< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48608,16 +48761,16 @@ fn __action909< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action910< +fn __action911< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -48641,7 +48794,7 @@ fn __action910< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action911< +fn __action912< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48668,11 +48821,11 @@ fn __action911< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action912< +fn __action913< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, TextSize, TextSize), ) -> ast::Mod @@ -48697,7 +48850,7 @@ fn __action912< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action913< +fn __action914< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48732,7 +48885,7 @@ fn __action913< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action914< +fn __action915< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48767,7 +48920,7 @@ fn __action914< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action915< +fn __action916< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48796,7 +48949,7 @@ fn __action915< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action916< +fn __action917< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -48821,14 +48974,14 @@ fn __action916< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action917< +fn __action918< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), __2: (TextSize, core::option::Option, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -48854,11 +49007,11 @@ fn __action917< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action918< +fn __action919< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::TypeParam { @@ -48879,33 +49032,6 @@ fn __action918< ) } -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action919< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Identifier, TextSize), - __2: (TextSize, TextSize, TextSize), -) -> ast::TypeParam -{ - let __start0 = __0.0; - let __end0 = __0.0; - let __temp0 = __action393( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action174( - mode, - __temp0, - __0, - __1, - __2, - ) -} - #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action920< @@ -48924,7 +49050,7 @@ fn __action920< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action175( + __action174( mode, __temp0, __0, @@ -48936,6 +49062,33 @@ fn __action920< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action921< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::Identifier, TextSize), + __2: (TextSize, TextSize, TextSize), +) -> ast::TypeParam +{ + let __start0 = __0.0; + let __end0 = __0.0; + let __temp0 = __action393( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action175( + mode, + __temp0, + __0, + __1, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action922< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48966,7 +49119,7 @@ fn __action921< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action922< +fn __action923< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -48995,11 +49148,11 @@ fn __action922< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action923< +fn __action924< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::ParameterWithDefault { @@ -49022,7 +49175,7 @@ fn __action923< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action924< +fn __action925< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -49047,7 +49200,7 @@ fn __action924< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action925< +fn __action926< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), @@ -49072,11 +49225,11 @@ fn __action925< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action926< +fn __action927< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), __4: (TextSize, core::option::Option, TextSize), @@ -49101,64 +49254,14 @@ fn __action926< ) } -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action927< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, TextSize, TextSize), -) -> ast::WithItem -{ - let __start0 = __0.0; - let __end0 = __0.0; - let __temp0 = __action393( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action297( - mode, - __temp0, - __0, - __1, - ) -} - #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action928< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, TextSize, TextSize), -) -> ast::WithItem -{ - let __start0 = __0.0; - let __end0 = __0.0; - let __temp0 = __action393( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action292( - mode, - __temp0, - __0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action929< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), ) -> ast::WithItem { @@ -49182,32 +49285,7 @@ fn __action929< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action930< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, TextSize, TextSize), -) -> Vec -{ - let __start0 = __0.0; - let __end0 = __0.0; - let __temp0 = __action393( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action160( - mode, - __temp0, - __0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action931< +fn __action929< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49238,7 +49316,7 @@ fn __action931< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action932< +fn __action930< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49267,14 +49345,14 @@ fn __action932< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action933< +fn __action931< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -49296,14 +49374,14 @@ fn __action933< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action934< +fn __action932< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -49325,13 +49403,13 @@ fn __action934< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action935< +fn __action933< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), + __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -49352,14 +49430,14 @@ fn __action935< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action936< +fn __action934< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -49381,7 +49459,7 @@ fn __action936< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action937< +fn __action935< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49393,7 +49471,7 @@ fn __action937< { let __start0 = __1.0; let __end0 = __4.2; - let __temp0 = __action859( + let __temp0 = __action861( mode, __1, __2, @@ -49410,7 +49488,7 @@ fn __action937< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action938< +fn __action936< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49421,7 +49499,7 @@ fn __action938< { let __start0 = __1.0; let __end0 = __3.2; - let __temp0 = __action860( + let __temp0 = __action862( mode, __1, __2, @@ -49435,6 +49513,66 @@ fn __action938< )) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action937< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, 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> +{ + let __start0 = __1.0; + let __end0 = __5.2; + let __temp0 = __action863( + mode, + __1, + __2, + __3, + __4, + __5, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action420( + mode, + __0, + __temp0, + )) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action938< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> +{ + let __start0 = __1.0; + let __end0 = __4.2; + let __temp0 = __action864( + mode, + __1, + __2, + __3, + __4, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action420( + mode, + __0, + __temp0, + )) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action939< @@ -49443,20 +49581,14 @@ fn __action939< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, 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> { let __start0 = __1.0; - let __end0 = __5.2; - let __temp0 = __action861( + let __end0 = __2.2; + let __temp0 = __action865( mode, __1, __2, - __3, - __4, - __5, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action420( @@ -49473,19 +49605,13 @@ fn __action940< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), ) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; - let __end0 = __4.2; - let __temp0 = __action862( + let __end0 = __1.2; + let __temp0 = __action866( mode, __1, - __2, - __3, - __4, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action420( @@ -49503,14 +49629,16 @@ fn __action941< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), ) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action863( + let __end0 = __3.2; + let __temp0 = __action867( mode, __1, __2, + __3, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action420( @@ -49527,13 +49655,15 @@ fn __action942< 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> { let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action864( + let __end0 = __2.2; + let __temp0 = __action868( mode, __1, + __2, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action420( @@ -49546,58 +49676,6 @@ fn __action942< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action943< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __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; - let __temp0 = __action865( - mode, - __1, - __2, - __3, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action420( - mode, - __0, - __temp0, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action944< ->( - 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> -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action866( - mode, - __1, - __2, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action420( - mode, - __0, - __temp0, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action945< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49610,7 +49688,7 @@ fn __action945< { let __start0 = __0.0; let __end0 = __3.2; - let __temp0 = __action859( + let __temp0 = __action861( mode, __0, __1, @@ -49618,7 +49696,7 @@ fn __action945< __3, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action847( + Ok(__action849( mode, __temp0, __4, @@ -49628,7 +49706,7 @@ fn __action945< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action946< +fn __action944< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49640,14 +49718,14 @@ fn __action946< { let __start0 = __0.0; let __end0 = __2.2; - let __temp0 = __action860( + let __temp0 = __action862( mode, __0, __1, __2, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action847( + Ok(__action849( mode, __temp0, __3, @@ -49657,7 +49735,7 @@ fn __action946< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action947< +fn __action945< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49671,7 +49749,7 @@ fn __action947< { let __start0 = __0.0; let __end0 = __4.2; - let __temp0 = __action861( + let __temp0 = __action863( mode, __0, __1, @@ -49680,7 +49758,7 @@ fn __action947< __4, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action847( + Ok(__action849( mode, __temp0, __5, @@ -49690,7 +49768,7 @@ fn __action947< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action948< +fn __action946< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49703,7 +49781,7 @@ fn __action948< { let __start0 = __0.0; let __end0 = __3.2; - let __temp0 = __action862( + let __temp0 = __action864( mode, __0, __1, @@ -49711,7 +49789,7 @@ fn __action948< __3, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action847( + Ok(__action849( mode, __temp0, __4, @@ -49721,7 +49799,7 @@ fn __action948< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action949< +fn __action947< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49732,13 +49810,13 @@ fn __action949< { let __start0 = __0.0; let __end0 = __1.2; - let __temp0 = __action863( + let __temp0 = __action865( mode, __0, __1, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action847( + Ok(__action849( mode, __temp0, __2, @@ -49748,7 +49826,7 @@ fn __action949< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action950< +fn __action948< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49758,12 +49836,12 @@ fn __action950< { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action864( + let __temp0 = __action866( mode, __0, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action847( + Ok(__action849( mode, __temp0, __1, @@ -49773,7 +49851,7 @@ fn __action950< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action951< +fn __action949< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49785,14 +49863,14 @@ fn __action951< { let __start0 = __0.0; let __end0 = __2.2; - let __temp0 = __action865( + let __temp0 = __action867( mode, __0, __1, __2, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action847( + Ok(__action849( mode, __temp0, __3, @@ -49802,7 +49880,7 @@ fn __action951< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action952< +fn __action950< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49813,13 +49891,13 @@ fn __action952< { let __start0 = __0.0; let __end0 = __1.2; - let __temp0 = __action866( + let __temp0 = __action868( mode, __0, __1, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action847( + Ok(__action849( mode, __temp0, __2, @@ -49829,7 +49907,7 @@ fn __action952< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action953< +fn __action951< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49841,7 +49919,7 @@ fn __action953< { let __start0 = __0.0; let __end0 = __3.2; - let __temp0 = __action859( + let __temp0 = __action861( mode, __0, __1, @@ -49849,7 +49927,7 @@ fn __action953< __3, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action848( + Ok(__action850( mode, __temp0, __4, @@ -49858,7 +49936,7 @@ fn __action953< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action954< +fn __action952< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49869,14 +49947,14 @@ fn __action954< { let __start0 = __0.0; let __end0 = __2.2; - let __temp0 = __action860( + let __temp0 = __action862( mode, __0, __1, __2, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action848( + Ok(__action850( mode, __temp0, __3, @@ -49885,7 +49963,7 @@ fn __action954< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action955< +fn __action953< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49898,7 +49976,7 @@ fn __action955< { let __start0 = __0.0; let __end0 = __4.2; - let __temp0 = __action861( + let __temp0 = __action863( mode, __0, __1, @@ -49907,7 +49985,7 @@ fn __action955< __4, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action848( + Ok(__action850( mode, __temp0, __5, @@ -49916,7 +49994,7 @@ fn __action955< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action956< +fn __action954< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -49928,7 +50006,7 @@ fn __action956< { let __start0 = __0.0; let __end0 = __3.2; - let __temp0 = __action862( + let __temp0 = __action864( mode, __0, __1, @@ -49936,13 +50014,61 @@ fn __action956< __3, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action848( + Ok(__action850( mode, __temp0, __4, )) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action955< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __1.2; + let __temp0 = __action865( + mode, + __0, + __1, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action850( + mode, + __temp0, + __2, + )) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action956< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action866( + mode, + __0, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action850( + mode, + __temp0, + __1, + )) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action957< @@ -49950,77 +50076,29 @@ fn __action957< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Parameter, TextSize), - __2: (TextSize, TextSize, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, TextSize, TextSize), ) -> Result> { let __start0 = __0.0; - let __end0 = __1.2; - let __temp0 = __action863( + let __end0 = __2.2; + let __temp0 = __action867( mode, __0, __1, + __2, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action848( + Ok(__action850( mode, __temp0, - __2, + __3, )) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action958< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action864( - mode, - __0, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action848( - mode, - __temp0, - __1, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action959< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Parameter, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action865( - mode, - __0, - __1, - __2, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action848( - mode, - __temp0, - __3, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action960< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50030,13 +50108,13 @@ fn __action960< { let __start0 = __0.0; let __end0 = __1.2; - let __temp0 = __action866( + let __temp0 = __action868( mode, __0, __1, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action848( + Ok(__action850( mode, __temp0, __2, @@ -50045,7 +50123,7 @@ fn __action960< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action961< +fn __action959< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50057,7 +50135,7 @@ fn __action961< { let __start0 = __0.0; let __end0 = __4.2; - let __temp0 = __action937( + let __temp0 = __action935( mode, __0, __1, @@ -50074,7 +50152,7 @@ fn __action961< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action962< +fn __action960< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50085,12 +50163,72 @@ fn __action962< { let __start0 = __0.0; let __end0 = __3.2; + let __temp0 = __action936( + mode, + __0, + __1, + __2, + __3, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action418( + mode, + __temp0, + )) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action961< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, 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> +{ + let __start0 = __0.0; + let __end0 = __5.2; + let __temp0 = __action937( + mode, + __0, + __1, + __2, + __3, + __4, + __5, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action418( + mode, + __temp0, + )) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action962< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> +{ + let __start0 = __0.0; + let __end0 = __4.2; let __temp0 = __action938( mode, __0, __1, __2, __3, + __4, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action418( @@ -50107,21 +50245,15 @@ fn __action963< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, 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> { let __start0 = __0.0; - let __end0 = __5.2; + let __end0 = __2.2; let __temp0 = __action939( mode, __0, __1, __2, - __3, - __4, - __5, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action418( @@ -50137,20 +50269,14 @@ fn __action964< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), ) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; - let __end0 = __4.2; + let __end0 = __1.2; let __temp0 = __action940( mode, __0, __1, - __2, - __3, - __4, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action418( @@ -50167,15 +50293,17 @@ fn __action965< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), ) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; - let __end0 = __2.2; + let __end0 = __3.2; let __temp0 = __action941( mode, __0, __1, __2, + __3, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action418( @@ -50191,14 +50319,16 @@ fn __action966< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), ) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; - let __end0 = __1.2; + let __end0 = __2.2; let __temp0 = __action942( mode, __0, __1, + __2, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action418( @@ -50210,58 +50340,6 @@ fn __action966< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action967< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __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; - let __temp0 = __action943( - mode, - __0, - __1, - __2, - __3, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action418( - mode, - __temp0, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action968< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action944( - mode, - __0, - __1, - __2, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action418( - mode, - __temp0, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action969< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50276,7 +50354,7 @@ fn __action969< { let __start0 = __1.0; let __end0 = __5.2; - let __temp0 = __action961( + let __temp0 = __action959( mode, __1, __2, @@ -50285,7 +50363,7 @@ fn __action969< __5, )?; let __temp0 = (__start0, __temp0, __end0); - __action843( + __action845( mode, __0, __temp0, @@ -50296,7 +50374,7 @@ fn __action969< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action970< +fn __action968< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50310,7 +50388,7 @@ fn __action970< { let __start0 = __1.0; let __end0 = __4.2; - let __temp0 = __action962( + let __temp0 = __action960( mode, __1, __2, @@ -50318,7 +50396,7 @@ fn __action970< __4, )?; let __temp0 = (__start0, __temp0, __end0); - __action843( + __action845( mode, __0, __temp0, @@ -50329,7 +50407,7 @@ fn __action970< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action971< +fn __action969< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50345,7 +50423,7 @@ fn __action971< { let __start0 = __1.0; let __end0 = __6.2; - let __temp0 = __action963( + let __temp0 = __action961( mode, __1, __2, @@ -50355,7 +50433,7 @@ fn __action971< __6, )?; let __temp0 = (__start0, __temp0, __end0); - __action843( + __action845( mode, __0, __temp0, @@ -50366,7 +50444,7 @@ fn __action971< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action972< +fn __action970< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50381,7 +50459,7 @@ fn __action972< { let __start0 = __1.0; let __end0 = __5.2; - let __temp0 = __action964( + let __temp0 = __action962( mode, __1, __2, @@ -50390,7 +50468,7 @@ fn __action972< __5, )?; let __temp0 = (__start0, __temp0, __end0); - __action843( + __action845( mode, __0, __temp0, @@ -50401,7 +50479,7 @@ fn __action972< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action973< +fn __action971< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50414,14 +50492,14 @@ fn __action973< { let __start0 = __1.0; let __end0 = __3.2; - let __temp0 = __action965( + let __temp0 = __action963( mode, __1, __2, __3, )?; let __temp0 = (__start0, __temp0, __end0); - __action843( + __action845( mode, __0, __temp0, @@ -50432,7 +50510,7 @@ fn __action973< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action974< +fn __action972< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50444,13 +50522,13 @@ fn __action974< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action966( + let __temp0 = __action964( mode, __1, __2, )?; let __temp0 = (__start0, __temp0, __end0); - __action843( + __action845( mode, __0, __temp0, @@ -50461,7 +50539,7 @@ fn __action974< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action975< +fn __action973< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50475,7 +50553,7 @@ fn __action975< { let __start0 = __1.0; let __end0 = __4.2; - let __temp0 = __action967( + let __temp0 = __action965( mode, __1, __2, @@ -50483,7 +50561,7 @@ fn __action975< __4, )?; let __temp0 = (__start0, __temp0, __end0); - __action843( + __action845( mode, __0, __temp0, @@ -50494,7 +50572,7 @@ fn __action975< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action976< +fn __action974< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50507,14 +50585,14 @@ fn __action976< { let __start0 = __1.0; let __end0 = __3.2; - let __temp0 = __action968( + let __temp0 = __action966( mode, __1, __2, __3, )?; let __temp0 = (__start0, __temp0, __end0); - __action843( + __action845( mode, __0, __temp0, @@ -50525,7 +50603,7 @@ fn __action976< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action977< +fn __action975< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50541,7 +50619,7 @@ fn __action977< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action843( + __action845( mode, __0, __temp0, @@ -50552,7 +50630,7 @@ fn __action977< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action978< +fn __action976< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50566,7 +50644,7 @@ fn __action978< { let __start0 = __1.0; let __end0 = __5.2; - let __temp0 = __action961( + let __temp0 = __action959( mode, __1, __2, @@ -50575,7 +50653,7 @@ fn __action978< __5, )?; let __temp0 = (__start0, __temp0, __end0); - __action844( + __action846( mode, __0, __temp0, @@ -50585,7 +50663,7 @@ fn __action978< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action979< +fn __action977< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50598,7 +50676,7 @@ fn __action979< { let __start0 = __1.0; let __end0 = __4.2; - let __temp0 = __action962( + let __temp0 = __action960( mode, __1, __2, @@ -50606,7 +50684,7 @@ fn __action979< __4, )?; let __temp0 = (__start0, __temp0, __end0); - __action844( + __action846( mode, __0, __temp0, @@ -50616,7 +50694,7 @@ fn __action979< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action980< +fn __action978< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50631,7 +50709,7 @@ fn __action980< { let __start0 = __1.0; let __end0 = __6.2; - let __temp0 = __action963( + let __temp0 = __action961( mode, __1, __2, @@ -50641,7 +50719,7 @@ fn __action980< __6, )?; let __temp0 = (__start0, __temp0, __end0); - __action844( + __action846( mode, __0, __temp0, @@ -50651,7 +50729,7 @@ fn __action980< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action981< +fn __action979< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50665,7 +50743,7 @@ fn __action981< { let __start0 = __1.0; let __end0 = __5.2; - let __temp0 = __action964( + let __temp0 = __action962( mode, __1, __2, @@ -50674,7 +50752,7 @@ fn __action981< __5, )?; let __temp0 = (__start0, __temp0, __end0); - __action844( + __action846( mode, __0, __temp0, @@ -50682,6 +50760,62 @@ fn __action981< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action980< +>( + mode: Mode, + __0: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __1.0; + let __end0 = __3.2; + let __temp0 = __action963( + mode, + __1, + __2, + __3, + )?; + let __temp0 = (__start0, __temp0, __end0); + __action846( + mode, + __0, + __temp0, + __4, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action981< +>( + mode: Mode, + __0: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action964( + mode, + __1, + __2, + )?; + let __temp0 = (__start0, __temp0, __end0); + __action846( + mode, + __0, + __temp0, + __3, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action982< @@ -50691,87 +50825,31 @@ fn __action982< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Parameter, TextSize), - __4: (TextSize, TextSize, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, TextSize, TextSize), ) -> Result> { let __start0 = __1.0; - let __end0 = __3.2; + let __end0 = __4.2; let __temp0 = __action965( mode, __1, __2, __3, + __4, )?; let __temp0 = (__start0, __temp0, __end0); - __action844( + __action846( mode, __0, __temp0, - __4, + __5, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action983< ->( - mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action966( - mode, - __1, - __2, - )?; - let __temp0 = (__start0, __temp0, __end0); - __action844( - mode, - __0, - __temp0, - __3, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action984< ->( - mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Parameter, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), - __5: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __1.0; - let __end0 = __4.2; - let __temp0 = __action967( - mode, - __1, - __2, - __3, - __4, - )?; - let __temp0 = (__start0, __temp0, __end0); - __action844( - mode, - __0, - __temp0, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action985< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50783,14 +50861,14 @@ fn __action985< { let __start0 = __1.0; let __end0 = __3.2; - let __temp0 = __action968( + let __temp0 = __action966( mode, __1, __2, __3, )?; let __temp0 = (__start0, __temp0, __end0); - __action844( + __action846( mode, __0, __temp0, @@ -50800,7 +50878,7 @@ fn __action985< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action986< +fn __action984< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -50815,7 +50893,7 @@ fn __action986< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action844( + __action846( mode, __0, __temp0, @@ -50825,7 +50903,7 @@ fn __action986< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action987< +fn __action985< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50848,7 +50926,7 @@ fn __action987< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action988< +fn __action986< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50871,7 +50949,7 @@ fn __action988< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action989< +fn __action987< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50887,7 +50965,7 @@ fn __action989< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action867( + __action869( mode, __0, __temp0, @@ -50898,7 +50976,7 @@ fn __action989< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action990< +fn __action988< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50914,7 +50992,7 @@ fn __action990< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action867( + __action869( mode, __0, __temp0, @@ -50925,7 +51003,7 @@ fn __action990< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action991< +fn __action989< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50942,7 +51020,7 @@ fn __action991< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action868( + __action870( mode, __0, __temp0, @@ -50954,7 +51032,7 @@ fn __action991< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action992< +fn __action990< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50971,7 +51049,7 @@ fn __action992< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action868( + __action870( mode, __0, __temp0, @@ -50983,7 +51061,7 @@ fn __action992< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action993< +fn __action991< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -50997,7 +51075,7 @@ fn __action993< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action869( + __action871( mode, __0, __temp0, @@ -51006,7 +51084,7 @@ fn __action993< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action994< +fn __action992< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51020,7 +51098,7 @@ fn __action994< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action869( + __action871( mode, __0, __temp0, @@ -51029,7 +51107,7 @@ fn __action994< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action995< +fn __action993< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51044,7 +51122,7 @@ fn __action995< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action870( + __action872( mode, __0, __temp0, @@ -51054,7 +51132,7 @@ fn __action995< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action996< +fn __action994< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51069,7 +51147,7 @@ fn __action996< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action870( + __action872( mode, __0, __temp0, @@ -51079,7 +51157,7 @@ fn __action996< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action997< +fn __action995< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51091,7 +51169,7 @@ fn __action997< { let __start0 = __1.0; let __end0 = __4.2; - let __temp0 = __action989( + let __temp0 = __action987( mode, __1, __2, @@ -51108,7 +51186,7 @@ fn __action997< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action998< +fn __action996< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51119,11 +51197,71 @@ fn __action998< { let __start0 = __1.0; let __end0 = __3.2; + let __temp0 = __action988( + mode, + __1, + __2, + __3, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action428( + mode, + __0, + __temp0, + )) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action997< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, 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> +{ + let __start0 = __1.0; + let __end0 = __5.2; + let __temp0 = __action989( + mode, + __1, + __2, + __3, + __4, + __5, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action428( + mode, + __0, + __temp0, + )) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action998< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, Option>, TextSize), +) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> +{ + let __start0 = __1.0; + let __end0 = __4.2; let __temp0 = __action990( mode, __1, __2, __3, + __4, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action428( @@ -51141,20 +51279,14 @@ fn __action999< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, 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> { let __start0 = __1.0; - let __end0 = __5.2; + let __end0 = __2.2; let __temp0 = __action991( mode, __1, __2, - __3, - __4, - __5, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action428( @@ -51171,19 +51303,13 @@ fn __action1000< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), ) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; - let __end0 = __4.2; + let __end0 = __1.2; let __temp0 = __action992( mode, __1, - __2, - __3, - __4, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action428( @@ -51201,14 +51327,16 @@ fn __action1001< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), ) -> Result<(Option>, Vec, Option>),__lalrpop_util::ParseError> { let __start0 = __1.0; - let __end0 = __2.2; + let __end0 = __3.2; let __temp0 = __action993( mode, __1, __2, + __3, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action428( @@ -51225,13 +51353,15 @@ fn __action1002< 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> { let __start0 = __1.0; - let __end0 = __1.2; + let __end0 = __2.2; let __temp0 = __action994( mode, __1, + __2, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action428( @@ -51244,58 +51374,6 @@ fn __action1002< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1003< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __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; - let __temp0 = __action995( - mode, - __1, - __2, - __3, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action428( - mode, - __0, - __temp0, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1004< ->( - 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> -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action996( - mode, - __1, - __2, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action428( - mode, - __0, - __temp0, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1005< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51308,7 +51386,7 @@ fn __action1005< { let __start0 = __0.0; let __end0 = __3.2; - let __temp0 = __action989( + let __temp0 = __action987( mode, __0, __1, @@ -51316,7 +51394,7 @@ fn __action1005< __3, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action855( + Ok(__action857( mode, __temp0, __4, @@ -51326,7 +51404,7 @@ fn __action1005< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1006< +fn __action1004< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51338,14 +51416,14 @@ fn __action1006< { let __start0 = __0.0; let __end0 = __2.2; - let __temp0 = __action990( + let __temp0 = __action988( mode, __0, __1, __2, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action855( + Ok(__action857( mode, __temp0, __3, @@ -51355,7 +51433,7 @@ fn __action1006< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1007< +fn __action1005< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51369,7 +51447,7 @@ fn __action1007< { let __start0 = __0.0; let __end0 = __4.2; - let __temp0 = __action991( + let __temp0 = __action989( mode, __0, __1, @@ -51378,7 +51456,7 @@ fn __action1007< __4, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action855( + Ok(__action857( mode, __temp0, __5, @@ -51388,7 +51466,7 @@ fn __action1007< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1008< +fn __action1006< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51401,7 +51479,7 @@ fn __action1008< { let __start0 = __0.0; let __end0 = __3.2; - let __temp0 = __action992( + let __temp0 = __action990( mode, __0, __1, @@ -51409,7 +51487,7 @@ fn __action1008< __3, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action855( + Ok(__action857( mode, __temp0, __4, @@ -51419,7 +51497,7 @@ fn __action1008< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1009< +fn __action1007< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51430,13 +51508,13 @@ fn __action1009< { let __start0 = __0.0; let __end0 = __1.2; - let __temp0 = __action993( + let __temp0 = __action991( mode, __0, __1, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action855( + Ok(__action857( mode, __temp0, __2, @@ -51446,7 +51524,7 @@ fn __action1009< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1010< +fn __action1008< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51456,12 +51534,12 @@ fn __action1010< { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action994( + let __temp0 = __action992( mode, __0, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action855( + Ok(__action857( mode, __temp0, __1, @@ -51471,7 +51549,7 @@ fn __action1010< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1011< +fn __action1009< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51483,14 +51561,14 @@ fn __action1011< { let __start0 = __0.0; let __end0 = __2.2; - let __temp0 = __action995( + let __temp0 = __action993( mode, __0, __1, __2, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action855( + Ok(__action857( mode, __temp0, __3, @@ -51500,7 +51578,7 @@ fn __action1011< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1012< +fn __action1010< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51511,13 +51589,13 @@ fn __action1012< { let __start0 = __0.0; let __end0 = __1.2; - let __temp0 = __action996( + let __temp0 = __action994( mode, __0, __1, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action855( + Ok(__action857( mode, __temp0, __2, @@ -51527,7 +51605,7 @@ fn __action1012< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1013< +fn __action1011< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51539,7 +51617,7 @@ fn __action1013< { let __start0 = __0.0; let __end0 = __3.2; - let __temp0 = __action989( + let __temp0 = __action987( mode, __0, __1, @@ -51547,7 +51625,7 @@ fn __action1013< __3, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action856( + Ok(__action858( mode, __temp0, __4, @@ -51556,7 +51634,7 @@ fn __action1013< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1014< +fn __action1012< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51567,14 +51645,14 @@ fn __action1014< { let __start0 = __0.0; let __end0 = __2.2; - let __temp0 = __action990( + let __temp0 = __action988( mode, __0, __1, __2, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action856( + Ok(__action858( mode, __temp0, __3, @@ -51583,7 +51661,7 @@ fn __action1014< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1015< +fn __action1013< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51596,7 +51674,7 @@ fn __action1015< { let __start0 = __0.0; let __end0 = __4.2; - let __temp0 = __action991( + let __temp0 = __action989( mode, __0, __1, @@ -51605,7 +51683,7 @@ fn __action1015< __4, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action856( + Ok(__action858( mode, __temp0, __5, @@ -51614,7 +51692,7 @@ fn __action1015< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1016< +fn __action1014< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51626,7 +51704,7 @@ fn __action1016< { let __start0 = __0.0; let __end0 = __3.2; - let __temp0 = __action992( + let __temp0 = __action990( mode, __0, __1, @@ -51634,13 +51712,61 @@ fn __action1016< __3, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action856( + Ok(__action858( mode, __temp0, __4, )) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1015< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __1.2; + let __temp0 = __action991( + mode, + __0, + __1, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action858( + mode, + __temp0, + __2, + )) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1016< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action992( + mode, + __0, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action858( + mode, + __temp0, + __1, + )) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1017< @@ -51648,77 +51774,29 @@ fn __action1017< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Parameter, TextSize), - __2: (TextSize, TextSize, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, TextSize, TextSize), ) -> Result> { let __start0 = __0.0; - let __end0 = __1.2; + let __end0 = __2.2; let __temp0 = __action993( mode, __0, __1, + __2, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action856( + Ok(__action858( mode, __temp0, - __2, + __3, )) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1018< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action994( - mode, - __0, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action856( - mode, - __temp0, - __1, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1019< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Parameter, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action995( - mode, - __0, - __1, - __2, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action856( - mode, - __temp0, - __3, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1020< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51728,13 +51806,13 @@ fn __action1020< { let __start0 = __0.0; let __end0 = __1.2; - let __temp0 = __action996( + let __temp0 = __action994( mode, __0, __1, )?; let __temp0 = (__start0, __temp0, __end0); - Ok(__action856( + Ok(__action858( mode, __temp0, __2, @@ -51743,7 +51821,7 @@ fn __action1020< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1021< +fn __action1019< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51755,7 +51833,7 @@ fn __action1021< { let __start0 = __0.0; let __end0 = __4.2; - let __temp0 = __action997( + let __temp0 = __action995( mode, __0, __1, @@ -51772,7 +51850,7 @@ fn __action1021< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1022< +fn __action1020< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -51783,12 +51861,72 @@ fn __action1022< { let __start0 = __0.0; let __end0 = __3.2; + let __temp0 = __action996( + mode, + __0, + __1, + __2, + __3, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action426( + mode, + __temp0, + )) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1021< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, 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> +{ + let __start0 = __0.0; + let __end0 = __5.2; + let __temp0 = __action997( + mode, + __0, + __1, + __2, + __3, + __4, + __5, + )?; + let __temp0 = (__start0, __temp0, __end0); + Ok(__action426( + mode, + __temp0, + )) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1022< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, Option>, TextSize), +) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> +{ + let __start0 = __0.0; + let __end0 = __4.2; let __temp0 = __action998( mode, __0, __1, __2, __3, + __4, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action426( @@ -51805,21 +51943,15 @@ fn __action1023< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, 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> { let __start0 = __0.0; - let __end0 = __5.2; + let __end0 = __2.2; let __temp0 = __action999( mode, __0, __1, __2, - __3, - __4, - __5, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action426( @@ -51835,20 +51967,14 @@ fn __action1024< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), ) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; - let __end0 = __4.2; + let __end0 = __1.2; let __temp0 = __action1000( mode, __0, __1, - __2, - __3, - __4, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action426( @@ -51865,15 +51991,17 @@ fn __action1025< __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Parameter, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), ) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; - let __end0 = __2.2; + let __end0 = __3.2; let __temp0 = __action1001( mode, __0, __1, __2, + __3, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action426( @@ -51889,14 +52017,16 @@ fn __action1026< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), ) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> { let __start0 = __0.0; - let __end0 = __1.2; + let __end0 = __2.2; let __temp0 = __action1002( mode, __0, __1, + __2, )?; let __temp0 = (__start0, __temp0, __end0); Ok(__action426( @@ -51908,58 +52038,6 @@ fn __action1026< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1027< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __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; - let __temp0 = __action1003( - mode, - __0, - __1, - __2, - __3, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action426( - mode, - __temp0, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1028< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> Result>, Vec, Option>)>,__lalrpop_util::ParseError> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action1004( - mode, - __0, - __1, - __2, - )?; - let __temp0 = (__start0, __temp0, __end0); - Ok(__action426( - mode, - __temp0, - )) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1029< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -51974,7 +52052,7 @@ fn __action1029< { let __start0 = __1.0; let __end0 = __5.2; - let __temp0 = __action1021( + let __temp0 = __action1019( mode, __1, __2, @@ -51983,7 +52061,7 @@ fn __action1029< __5, )?; let __temp0 = (__start0, __temp0, __end0); - __action851( + __action853( mode, __0, __temp0, @@ -51994,7 +52072,7 @@ fn __action1029< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1030< +fn __action1028< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52008,7 +52086,7 @@ fn __action1030< { let __start0 = __1.0; let __end0 = __4.2; - let __temp0 = __action1022( + let __temp0 = __action1020( mode, __1, __2, @@ -52016,7 +52094,7 @@ fn __action1030< __4, )?; let __temp0 = (__start0, __temp0, __end0); - __action851( + __action853( mode, __0, __temp0, @@ -52027,7 +52105,7 @@ fn __action1030< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1031< +fn __action1029< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52043,7 +52121,7 @@ fn __action1031< { let __start0 = __1.0; let __end0 = __6.2; - let __temp0 = __action1023( + let __temp0 = __action1021( mode, __1, __2, @@ -52053,7 +52131,7 @@ fn __action1031< __6, )?; let __temp0 = (__start0, __temp0, __end0); - __action851( + __action853( mode, __0, __temp0, @@ -52064,7 +52142,7 @@ fn __action1031< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1032< +fn __action1030< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52079,7 +52157,7 @@ fn __action1032< { let __start0 = __1.0; let __end0 = __5.2; - let __temp0 = __action1024( + let __temp0 = __action1022( mode, __1, __2, @@ -52088,7 +52166,7 @@ fn __action1032< __5, )?; let __temp0 = (__start0, __temp0, __end0); - __action851( + __action853( mode, __0, __temp0, @@ -52099,7 +52177,7 @@ fn __action1032< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1033< +fn __action1031< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52112,14 +52190,14 @@ fn __action1033< { let __start0 = __1.0; let __end0 = __3.2; - let __temp0 = __action1025( + let __temp0 = __action1023( mode, __1, __2, __3, )?; let __temp0 = (__start0, __temp0, __end0); - __action851( + __action853( mode, __0, __temp0, @@ -52130,7 +52208,7 @@ fn __action1033< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1034< +fn __action1032< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52142,13 +52220,13 @@ fn __action1034< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1026( + let __temp0 = __action1024( mode, __1, __2, )?; let __temp0 = (__start0, __temp0, __end0); - __action851( + __action853( mode, __0, __temp0, @@ -52159,7 +52237,7 @@ fn __action1034< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1035< +fn __action1033< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52173,7 +52251,7 @@ fn __action1035< { let __start0 = __1.0; let __end0 = __4.2; - let __temp0 = __action1027( + let __temp0 = __action1025( mode, __1, __2, @@ -52181,7 +52259,7 @@ fn __action1035< __4, )?; let __temp0 = (__start0, __temp0, __end0); - __action851( + __action853( mode, __0, __temp0, @@ -52192,7 +52270,7 @@ fn __action1035< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1036< +fn __action1034< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52205,14 +52283,14 @@ fn __action1036< { let __start0 = __1.0; let __end0 = __3.2; - let __temp0 = __action1028( + let __temp0 = __action1026( mode, __1, __2, __3, )?; let __temp0 = (__start0, __temp0, __end0); - __action851( + __action853( mode, __0, __temp0, @@ -52223,7 +52301,7 @@ fn __action1036< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1037< +fn __action1035< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52239,7 +52317,7 @@ fn __action1037< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action851( + __action853( mode, __0, __temp0, @@ -52250,7 +52328,7 @@ fn __action1037< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1038< +fn __action1036< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52264,7 +52342,7 @@ fn __action1038< { let __start0 = __1.0; let __end0 = __5.2; - let __temp0 = __action1021( + let __temp0 = __action1019( mode, __1, __2, @@ -52273,7 +52351,7 @@ fn __action1038< __5, )?; let __temp0 = (__start0, __temp0, __end0); - __action852( + __action854( mode, __0, __temp0, @@ -52283,7 +52361,7 @@ fn __action1038< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1039< +fn __action1037< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52296,7 +52374,7 @@ fn __action1039< { let __start0 = __1.0; let __end0 = __4.2; - let __temp0 = __action1022( + let __temp0 = __action1020( mode, __1, __2, @@ -52304,7 +52382,7 @@ fn __action1039< __4, )?; let __temp0 = (__start0, __temp0, __end0); - __action852( + __action854( mode, __0, __temp0, @@ -52314,7 +52392,7 @@ fn __action1039< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1040< +fn __action1038< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52329,7 +52407,7 @@ fn __action1040< { let __start0 = __1.0; let __end0 = __6.2; - let __temp0 = __action1023( + let __temp0 = __action1021( mode, __1, __2, @@ -52339,7 +52417,7 @@ fn __action1040< __6, )?; let __temp0 = (__start0, __temp0, __end0); - __action852( + __action854( mode, __0, __temp0, @@ -52349,7 +52427,7 @@ fn __action1040< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1041< +fn __action1039< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52363,7 +52441,7 @@ fn __action1041< { let __start0 = __1.0; let __end0 = __5.2; - let __temp0 = __action1024( + let __temp0 = __action1022( mode, __1, __2, @@ -52372,7 +52450,7 @@ fn __action1041< __5, )?; let __temp0 = (__start0, __temp0, __end0); - __action852( + __action854( mode, __0, __temp0, @@ -52380,6 +52458,62 @@ fn __action1041< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1040< +>( + mode: Mode, + __0: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::Parameter, TextSize), + __4: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __1.0; + let __end0 = __3.2; + let __temp0 = __action1023( + mode, + __1, + __2, + __3, + )?; + let __temp0 = (__start0, __temp0, __end0); + __action854( + mode, + __0, + __temp0, + __4, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1041< +>( + mode: Mode, + __0: (TextSize, (Vec, Vec), TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1024( + mode, + __1, + __2, + )?; + let __temp0 = (__start0, __temp0, __end0); + __action854( + mode, + __0, + __temp0, + __3, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1042< @@ -52389,87 +52523,31 @@ fn __action1042< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Parameter, TextSize), - __4: (TextSize, TextSize, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, TextSize, TextSize), ) -> Result> { let __start0 = __1.0; - let __end0 = __3.2; + let __end0 = __4.2; let __temp0 = __action1025( mode, __1, __2, __3, + __4, )?; let __temp0 = (__start0, __temp0, __end0); - __action852( + __action854( mode, __0, __temp0, - __4, + __5, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1043< ->( - mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1026( - mode, - __1, - __2, - )?; - let __temp0 = (__start0, __temp0, __end0); - __action852( - mode, - __0, - __temp0, - __3, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1044< ->( - mode: Mode, - __0: (TextSize, (Vec, Vec), TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Parameter, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), - __5: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __1.0; - let __end0 = __4.2; - let __temp0 = __action1027( - mode, - __1, - __2, - __3, - __4, - )?; - let __temp0 = (__start0, __temp0, __end0); - __action852( - mode, - __0, - __temp0, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1045< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52481,14 +52559,14 @@ fn __action1045< { let __start0 = __1.0; let __end0 = __3.2; - let __temp0 = __action1028( + let __temp0 = __action1026( mode, __1, __2, __3, )?; let __temp0 = (__start0, __temp0, __end0); - __action852( + __action854( mode, __0, __temp0, @@ -52498,7 +52576,7 @@ fn __action1045< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1046< +fn __action1044< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -52513,7 +52591,7 @@ fn __action1046< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action852( + __action854( mode, __0, __temp0, @@ -52523,12 +52601,12 @@ fn __action1046< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1047< +fn __action1045< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> core::option::Option + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { let __start0 = __0.0; let __end0 = __1.2; @@ -52546,19 +52624,19 @@ fn __action1047< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1048< +fn __action1046< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, TextSize, TextSize), ) -> ast::Stmt { let __start0 = __2.0; let __end0 = __3.2; - let __temp0 = __action1047( + let __temp0 = __action1045( mode, __2, __3, @@ -52575,11 +52653,11 @@ fn __action1048< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1049< +fn __action1047< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -52602,12 +52680,12 @@ fn __action1049< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1050< +fn __action1048< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { let __start0 = __0.0; let __end0 = __1.2; @@ -52625,13 +52703,13 @@ fn __action1050< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1051< +fn __action1049< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec { let __start0 = __1.0; let __end0 = __2.2; @@ -52650,16 +52728,16 @@ fn __action1051< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1052< +fn __action1050< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __3.0; @@ -52681,19 +52759,82 @@ fn __action1052< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1051< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __3.0; + let __end0 = __3.2; + let __temp0 = __action544( + mode, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action715( + mode, + __0, + __1, + __2, + __temp0, + __4, + __5, + __6, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1052< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __2.2; + let __end0 = __3.0; + let __temp0 = __action543( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action716( + mode, + __0, + __1, + __2, + __temp0, + __3, + __4, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1053< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, TextSize, TextSize), -) -> Result> + __5: (TextSize, TextSize, TextSize), +) -> Result> { let __start0 = __3.0; let __end0 = __3.2; @@ -52702,7 +52843,7 @@ fn __action1053< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action715( + __action716( mode, __0, __1, @@ -52710,7 +52851,6 @@ fn __action1053< __temp0, __4, __5, - __6, ) } @@ -52720,11 +52860,12 @@ fn __action1054< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, TextSize, TextSize), -) -> Result> + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, TextSize, TextSize), +) -> Result> { let __start0 = __2.2; let __end0 = __3.0; @@ -52734,7 +52875,7 @@ fn __action1054< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action716( + __action734( mode, __0, __1, @@ -52742,6 +52883,7 @@ fn __action1054< __temp0, __3, __4, + __5, ) } @@ -52751,77 +52893,13 @@ fn __action1055< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __3.0; - let __end0 = __3.2; - let __temp0 = __action544( - mode, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action716( - mode, - __0, - __1, - __2, - __temp0, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1056< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __2.2; - let __end0 = __3.0; - let __temp0 = __action543( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action733( - mode, - __0, - __1, - __2, - __temp0, - __3, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1057< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.0; let __end0 = __3.2; @@ -52830,7 +52908,7 @@ fn __action1057< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action733( + __action734( mode, __0, __1, @@ -52844,15 +52922,15 @@ fn __action1057< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1058< +fn __action1056< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __2.2; let __end0 = __3.0; @@ -52862,7 +52940,7 @@ fn __action1058< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action734( + __action735( mode, __0, __1, @@ -52875,16 +52953,16 @@ fn __action1058< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1059< +fn __action1057< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.0; let __end0 = __3.2; @@ -52893,7 +52971,7 @@ fn __action1059< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action734( + __action735( mode, __0, __1, @@ -52906,7 +52984,7 @@ fn __action1059< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1060< +fn __action1058< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -52929,7 +53007,7 @@ fn __action1060< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1061< +fn __action1059< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -52954,7 +53032,7 @@ fn __action1061< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1062< +fn __action1060< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -52985,7 +53063,7 @@ fn __action1062< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1063< +fn __action1061< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -53016,7 +53094,7 @@ fn __action1063< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1064< +fn __action1062< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -53045,7 +53123,7 @@ fn __action1064< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1065< +fn __action1063< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -53074,12 +53152,12 @@ fn __action1065< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1066< +fn __action1064< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> core::option::Option + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { let __start0 = __0.0; let __end0 = __1.2; @@ -53097,7 +53175,7 @@ fn __action1066< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1067< +fn __action1065< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -53107,20 +53185,20 @@ fn __action1067< __4: (TextSize, core::option::Option, TextSize), __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, ast::Expr, TextSize), + __7: (TextSize, ast::ParenthesizedExpr, TextSize), __8: (TextSize, token::Tok, TextSize), __9: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt { let __start0 = __6.0; let __end0 = __7.2; - let __temp0 = __action1066( + let __temp0 = __action1064( mode, __6, __7, ); let __temp0 = (__start0, __temp0, __end0); - __action784( + __action786( mode, __0, __1, @@ -53136,7 +53214,7 @@ fn __action1067< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1068< +fn __action1066< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -53157,7 +53235,7 @@ fn __action1068< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action784( + __action786( mode, __0, __1, @@ -53173,7 +53251,7 @@ fn __action1068< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1069< +fn __action1067< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -53182,20 +53260,20 @@ fn __action1069< __3: (TextSize, core::option::Option, TextSize), __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Expr, TextSize), + __6: (TextSize, ast::ParenthesizedExpr, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt { let __start0 = __5.0; let __end0 = __6.2; - let __temp0 = __action1066( + let __temp0 = __action1064( mode, __5, __6, ); let __temp0 = (__start0, __temp0, __end0); - __action785( + __action787( mode, __0, __1, @@ -53210,7 +53288,7 @@ fn __action1069< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1070< +fn __action1068< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -53230,7 +53308,7 @@ fn __action1070< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action785( + __action787( mode, __0, __1, @@ -53245,7 +53323,7 @@ fn __action1070< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1071< +fn __action1069< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -53268,7 +53346,7 @@ fn __action1071< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1072< +fn __action1070< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(token::Tok, ast::Identifier)>, TextSize), @@ -53293,12 +53371,12 @@ fn __action1072< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1073< +fn __action1071< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> core::option::Option + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { let __start0 = __0.0; let __end0 = __1.2; @@ -53316,24 +53394,76 @@ fn __action1073< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1074< +fn __action1072< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), ) -> ast::Parameter { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1073( + let __temp0 = __action1071( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action766( + __action768( + mode, + __0, + __temp0, + __3, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1073< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), + __1: (TextSize, TextSize, TextSize), +) -> ast::Parameter +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action272( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action768( + mode, + __0, + __temp0, + __1, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1074< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, TextSize, TextSize), +) -> ast::TypeParam +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1071( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action919( mode, __0, __temp0, @@ -53348,7 +53478,7 @@ fn __action1075< mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::Parameter +) -> ast::TypeParam { let __start0 = __0.2; let __end0 = __1.0; @@ -53358,7 +53488,7 @@ fn __action1075< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action766( + __action919( mode, __0, __temp0, @@ -53373,19 +53503,19 @@ fn __action1076< mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), -) -> ast::TypeParam +) -> ast::ParameterWithDefault { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1073( + let __temp0 = __action1071( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action918( + __action924( mode, __0, __temp0, @@ -53400,7 +53530,7 @@ fn __action1077< mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, TextSize, TextSize), -) -> ast::TypeParam +) -> ast::ParameterWithDefault { let __start0 = __0.2; let __end0 = __1.0; @@ -53410,7 +53540,7 @@ fn __action1077< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action918( + __action924( mode, __0, __temp0, @@ -53421,63 +53551,11 @@ fn __action1077< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1078< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, TextSize, TextSize), -) -> ast::ParameterWithDefault -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1073( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action923( - mode, - __0, - __temp0, - __3, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1079< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, TextSize, TextSize), -) -> ast::ParameterWithDefault -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action272( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action923( - mode, - __0, - __temp0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1080< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> core::option::Option + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { let __start0 = __0.0; let __end0 = __1.2; @@ -53495,24 +53573,24 @@ fn __action1080< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1081< +fn __action1079< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, TextSize, TextSize), ) -> ast::Parameter { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1080( + let __temp0 = __action1078( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action900( + __action902( mode, __0, __temp0, @@ -53522,7 +53600,7 @@ fn __action1081< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1082< +fn __action1080< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -53537,7 +53615,7 @@ fn __action1082< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action900( + __action902( mode, __0, __temp0, @@ -53547,7 +53625,7 @@ fn __action1082< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1083< +fn __action1081< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -53568,7 +53646,7 @@ fn __action1083< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1084< +fn __action1082< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -53591,7 +53669,7 @@ fn __action1084< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1085< +fn __action1083< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -53612,7 +53690,7 @@ fn __action1085< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1086< +fn __action1084< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -53635,11 +53713,11 @@ fn __action1086< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1087< +fn __action1085< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::Mod { @@ -53651,7 +53729,7 @@ fn __action1087< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action912( + __action913( mode, __0, __1, @@ -53662,11 +53740,11 @@ fn __action1087< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1088< +fn __action1086< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, TextSize, TextSize), ) -> ast::Mod @@ -53678,7 +53756,7 @@ fn __action1088< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action912( + __action913( mode, __0, __1, @@ -53689,7 +53767,7 @@ fn __action1088< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1089< +fn __action1087< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -53710,6 +53788,58 @@ fn __action1089< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1088< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Identifier, TextSize), + __3: (TextSize, TextSize, TextSize), +) -> ast::Alias +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1087( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action799( + mode, + __0, + __temp0, + __3, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1089< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), + __1: (TextSize, TextSize, TextSize), +) -> ast::Alias +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action401( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action799( + mode, + __0, + __temp0, + __1, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1090< @@ -53723,13 +53853,13 @@ fn __action1090< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1089( + let __temp0 = __action1087( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action797( + __action800( mode, __0, __temp0, @@ -53754,7 +53884,7 @@ fn __action1091< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action797( + __action800( mode, __0, __temp0, @@ -53765,58 +53895,6 @@ fn __action1091< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1092< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Identifier, TextSize), - __3: (TextSize, TextSize, TextSize), -) -> ast::Alias -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1089( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action798( - mode, - __0, - __temp0, - __3, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1093< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, TextSize, TextSize), -) -> ast::Alias -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action401( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action798( - mode, - __0, - __temp0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1094< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -53841,14 +53919,14 @@ fn __action1094< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1095< +fn __action1093< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), __7: (TextSize, token::Tok, TextSize), @@ -53858,14 +53936,14 @@ fn __action1095< { let __start0 = __7.0; let __end0 = __9.2; - let __temp0 = __action1094( + let __temp0 = __action1092( mode, __7, __8, __9, ); let __temp0 = (__start0, __temp0, __end0); - __action782( + __action784( mode, __0, __1, @@ -53880,14 +53958,14 @@ fn __action1095< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1096< +fn __action1094< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -53900,7 +53978,7 @@ fn __action1096< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action782( + __action784( mode, __0, __1, @@ -53915,13 +53993,13 @@ fn __action1096< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1097< +fn __action1095< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Suite, TextSize), __6: (TextSize, token::Tok, TextSize), @@ -53931,14 +54009,14 @@ fn __action1097< { let __start0 = __6.0; let __end0 = __8.2; - let __temp0 = __action1094( + let __temp0 = __action1092( mode, __6, __7, __8, ); let __temp0 = (__start0, __temp0, __end0); - __action783( + __action785( mode, __0, __1, @@ -53952,13 +54030,13 @@ fn __action1097< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1098< +fn __action1096< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -53971,7 +54049,7 @@ fn __action1098< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action783( + __action785( mode, __0, __1, @@ -53983,6 +54061,76 @@ fn __action1098< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1097< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Suite, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Suite, TextSize), + __7: (TextSize, core::option::Option, TextSize), + __8: (TextSize, TextSize, TextSize), +) -> ast::Stmt +{ + let __start0 = __4.0; + let __end0 = __6.2; + let __temp0 = __action1092( + mode, + __4, + __5, + __6, + ); + let __temp0 = (__start0, __temp0, __end0); + __action914( + mode, + __0, + __1, + __2, + __3, + __temp0, + __7, + __8, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1098< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Suite, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, core::option::Option, TextSize), + __5: (TextSize, TextSize, TextSize), +) -> ast::Stmt +{ + let __start0 = __3.2; + let __end0 = __4.0; + let __temp0 = __action315( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action914( + mode, + __0, + __1, + __2, + __3, + __temp0, + __4, + __5, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1099< @@ -54001,14 +54149,14 @@ fn __action1099< { let __start0 = __4.0; let __end0 = __6.2; - let __temp0 = __action1094( + let __temp0 = __action1092( mode, __4, __5, __6, ); let __temp0 = (__start0, __temp0, __end0); - __action913( + __action915( mode, __0, __1, @@ -54041,7 +54189,7 @@ fn __action1100< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action913( + __action915( mode, __0, __1, @@ -54059,77 +54207,7 @@ fn __action1101< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Suite, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Suite, TextSize), - __7: (TextSize, core::option::Option, TextSize), - __8: (TextSize, TextSize, TextSize), -) -> ast::Stmt -{ - let __start0 = __4.0; - let __end0 = __6.2; - let __temp0 = __action1094( - mode, - __4, - __5, - __6, - ); - let __temp0 = (__start0, __temp0, __end0); - __action914( - mode, - __0, - __1, - __2, - __3, - __temp0, - __7, - __8, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1102< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Suite, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, core::option::Option, TextSize), - __5: (TextSize, TextSize, TextSize), -) -> ast::Stmt -{ - let __start0 = __3.2; - let __end0 = __4.0; - let __temp0 = __action315( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action914( - mode, - __0, - __1, - __2, - __3, - __temp0, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1103< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), __4: (TextSize, token::Tok, TextSize), @@ -54139,14 +54217,14 @@ fn __action1103< { let __start0 = __4.0; let __end0 = __6.2; - let __temp0 = __action1094( + let __temp0 = __action1092( mode, __4, __5, __6, ); let __temp0 = (__start0, __temp0, __end0); - __action926( + __action927( mode, __0, __1, @@ -54158,11 +54236,11 @@ fn __action1103< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1104< +fn __action1102< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -54175,7 +54253,7 @@ fn __action1104< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action926( + __action927( mode, __0, __1, @@ -54187,7 +54265,7 @@ fn __action1104< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1105< +fn __action1103< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -54212,7 +54290,7 @@ fn __action1105< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1106< +fn __action1104< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -54232,7 +54310,7 @@ fn __action1106< __5, ); let __temp0 = (__start0, __temp0, __end0); - __action915( + __action916( mode, __0, __1, @@ -54241,6 +54319,84 @@ fn __action1106< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1105< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Suite, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Suite, TextSize), + __7: (TextSize, token::Tok, TextSize), + __8: (TextSize, token::Tok, TextSize), + __9: (TextSize, ast::Suite, TextSize), + __10: (TextSize, TextSize, TextSize), +) -> ast::Stmt +{ + let __start0 = __7.0; + let __end0 = __9.2; + let __temp0 = __action1103( + mode, + __7, + __8, + __9, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1097( + mode, + __0, + __1, + __2, + __3, + __4, + __5, + __6, + __temp0, + __10, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1106< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Suite, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Suite, TextSize), + __7: (TextSize, TextSize, TextSize), +) -> ast::Stmt +{ + let __start0 = __6.2; + let __end0 = __7.0; + let __temp0 = __action308( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1097( + mode, + __0, + __1, + __2, + __3, + __4, + __5, + __6, + __temp0, + __7, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1107< @@ -54253,32 +54409,26 @@ fn __action1107< __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), - __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, ast::Suite, TextSize), - __10: (TextSize, TextSize, TextSize), + __7: (TextSize, TextSize, TextSize), ) -> ast::Stmt { - let __start0 = __7.0; - let __end0 = __9.2; - let __temp0 = __action1105( + let __start0 = __4.0; + let __end0 = __6.2; + let __temp0 = __action1103( mode, - __7, - __8, - __9, + __4, + __5, + __6, ); let __temp0 = (__start0, __temp0, __end0); - __action1099( + __action1098( mode, __0, __1, __2, __3, - __4, - __5, - __6, __temp0, - __10, + __7, ) } @@ -54291,103 +54441,31 @@ fn __action1108< __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Suite, TextSize), __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Suite, TextSize), - __7: (TextSize, TextSize, TextSize), + __4: (TextSize, TextSize, TextSize), ) -> ast::Stmt { - let __start0 = __6.2; - let __end0 = __7.0; + let __start0 = __3.2; + let __end0 = __4.0; let __temp0 = __action308( mode, &__start0, &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1099( + __action1098( mode, __0, __1, __2, __3, - __4, - __5, - __6, __temp0, - __7, + __4, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1109< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Suite, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Suite, TextSize), - __7: (TextSize, TextSize, TextSize), -) -> ast::Stmt -{ - let __start0 = __4.0; - let __end0 = __6.2; - let __temp0 = __action1105( - mode, - __4, - __5, - __6, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1100( - mode, - __0, - __1, - __2, - __3, - __temp0, - __7, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1110< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Suite, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, TextSize, TextSize), -) -> ast::Stmt -{ - let __start0 = __3.2; - let __end0 = __4.0; - let __temp0 = __action308( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1100( - mode, - __0, - __1, - __2, - __3, - __temp0, - __4, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1111< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -54405,14 +54483,14 @@ fn __action1111< { let __start0 = __7.0; let __end0 = __9.2; - let __temp0 = __action1105( + let __temp0 = __action1103( mode, __7, __8, __9, ); let __temp0 = (__start0, __temp0, __end0); - __action1101( + __action1099( mode, __0, __1, @@ -54428,7 +54506,7 @@ fn __action1111< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1112< +fn __action1110< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -54449,7 +54527,7 @@ fn __action1112< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1101( + __action1099( mode, __0, __1, @@ -54465,7 +54543,7 @@ fn __action1112< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1113< +fn __action1111< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -54480,14 +54558,14 @@ fn __action1113< { let __start0 = __4.0; let __end0 = __6.2; - let __temp0 = __action1105( + let __temp0 = __action1103( mode, __4, __5, __6, ); let __temp0 = (__start0, __temp0, __end0); - __action1102( + __action1100( mode, __0, __1, @@ -54500,7 +54578,7 @@ fn __action1113< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1114< +fn __action1112< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -54518,7 +54596,7 @@ fn __action1114< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1102( + __action1100( mode, __0, __1, @@ -54531,12 +54609,12 @@ fn __action1114< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1115< +fn __action1113< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> core::option::Option + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { let __start0 = __0.0; let __end0 = __1.2; @@ -54554,25 +54632,25 @@ fn __action1115< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1116< +fn __action1114< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, TextSize, TextSize), ) -> ast::Stmt { let __start0 = __2.0; let __end0 = __3.2; - let __temp0 = __action1115( + let __temp0 = __action1113( mode, __2, __3, ); let __temp0 = (__start0, __temp0, __end0); - __action886( + __action888( mode, __0, __1, @@ -54583,11 +54661,11 @@ fn __action1116< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1117< +fn __action1115< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, TextSize, TextSize), ) -> ast::Stmt { @@ -54599,7 +54677,7 @@ fn __action1117< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action886( + __action888( mode, __0, __1, @@ -54610,14 +54688,14 @@ fn __action1117< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1118< +fn __action1116< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), -) -> alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)> +) -> alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)> { let __start0 = __0.0; let __end0 = __3.2; @@ -54637,15 +54715,15 @@ fn __action1118< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1119< +fn __action1117< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>, TextSize), + __0: (TextSize, alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, ast::Suite, TextSize), -) -> alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)> +) -> alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)> { let __start0 = __1.0; let __end0 = __4.2; @@ -54666,11 +54744,11 @@ fn __action1119< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1120< +fn __action1118< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), __4: (TextSize, core::option::Option<(TextSize, ast::Suite)>, TextSize), @@ -54684,7 +54762,7 @@ fn __action1120< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action796( + __action798( mode, __0, __1, @@ -54697,14 +54775,14 @@ fn __action1120< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1121< +fn __action1119< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), - __4: (TextSize, alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>, TextSize), + __4: (TextSize, alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>, TextSize), __5: (TextSize, core::option::Option<(TextSize, ast::Suite)>, TextSize), ) -> ast::Stmt { @@ -54715,7 +54793,7 @@ fn __action1121< __4, ); let __temp0 = (__start0, __temp0, __end0); - __action796( + __action798( mode, __0, __1, @@ -54728,7 +54806,7 @@ fn __action1121< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1122< +fn __action1120< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -54753,11 +54831,11 @@ fn __action1122< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1123< +fn __action1121< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), __4: (TextSize, token::Tok, TextSize), @@ -54767,14 +54845,14 @@ fn __action1123< { let __start0 = __4.0; let __end0 = __6.2; - let __temp0 = __action1122( + let __temp0 = __action1120( mode, __4, __5, __6, ); let __temp0 = (__start0, __temp0, __end0); - __action1120( + __action1118( mode, __0, __1, @@ -54786,11 +54864,11 @@ fn __action1123< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1124< +fn __action1122< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -54803,7 +54881,7 @@ fn __action1124< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1120( + __action1118( mode, __0, __1, @@ -54815,14 +54893,14 @@ fn __action1124< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1125< +fn __action1123< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), - __4: (TextSize, alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>, TextSize), + __4: (TextSize, alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), @@ -54830,14 +54908,14 @@ fn __action1125< { let __start0 = __5.0; let __end0 = __7.2; - let __temp0 = __action1122( + let __temp0 = __action1120( mode, __5, __6, __7, ); let __temp0 = (__start0, __temp0, __end0); - __action1121( + __action1119( mode, __0, __1, @@ -54850,14 +54928,14 @@ fn __action1125< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1126< +fn __action1124< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Suite, TextSize), - __4: (TextSize, alloc::vec::Vec<(TextSize, ast::Expr, ast::Suite)>, TextSize), + __4: (TextSize, alloc::vec::Vec<(TextSize, ast::ParenthesizedExpr, ast::Suite)>, TextSize), ) -> ast::Stmt { let __start0 = __4.2; @@ -54868,7 +54946,7 @@ fn __action1126< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1121( + __action1119( mode, __0, __1, @@ -54881,12 +54959,12 @@ fn __action1126< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1127< +fn __action1125< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> alloc::vec::Vec +) -> alloc::vec::Vec { let __start0 = __0.0; let __end0 = __1.2; @@ -54904,13 +54982,13 @@ fn __action1127< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1128< +fn __action1126< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> alloc::vec::Vec +) -> alloc::vec::Vec { let __start0 = __1.0; let __end0 = __2.2; @@ -54929,7 +55007,7 @@ fn __action1128< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1129< +fn __action1127< >( mode: Mode, __0: (TextSize, (Option<(TextSize, TextSize, Option)>, ast::Expr), TextSize), @@ -54952,7 +55030,7 @@ fn __action1129< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1130< +fn __action1128< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), @@ -54977,7 +55055,7 @@ fn __action1130< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1131< +fn __action1129< >( mode: Mode, __0: (TextSize, core::option::Option<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), @@ -55000,7 +55078,7 @@ fn __action1131< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1132< +fn __action1130< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), @@ -55023,12 +55101,12 @@ fn __action1132< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1133< +fn __action1131< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> alloc::vec::Vec +) -> alloc::vec::Vec { let __start0 = __0.0; let __end0 = __1.2; @@ -55046,13 +55124,13 @@ fn __action1133< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1134< +fn __action1132< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> alloc::vec::Vec +) -> alloc::vec::Vec { let __start0 = __1.0; let __end0 = __2.2; @@ -55071,12 +55149,12 @@ fn __action1134< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1135< +fn __action1133< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> core::option::Option> +) -> core::option::Option> { let __start0 = __0.0; let __end0 = __1.2; @@ -55094,27 +55172,27 @@ fn __action1135< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1136< +fn __action1134< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1135( + let __temp0 = __action1133( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1052( + __action1050( mode, __0, __temp0, @@ -55127,15 +55205,15 @@ fn __action1136< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1137< +fn __action1135< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -55145,7 +55223,7 @@ fn __action1137< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1052( + __action1050( mode, __0, __temp0, @@ -55158,28 +55236,28 @@ fn __action1137< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1138< +fn __action1136< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1135( + let __temp0 = __action1133( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1053( + __action1051( mode, __0, __temp0, @@ -55191,18 +55269,143 @@ fn __action1138< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1137< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action547( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1051( + mode, + __0, + __temp0, + __1, + __2, + __3, + __4, + __5, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1138< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1133( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1052( + mode, + __0, + __temp0, + __3, + __4, + __5, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1139< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action547( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1052( + mode, + __0, + __temp0, + __1, + __2, + __3, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1140< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1133( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1053( + mode, + __0, + __temp0, + __3, + __4, + __5, + __6, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1141< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, TextSize, TextSize), -) -> Result> + __4: (TextSize, TextSize, TextSize), +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -55220,67 +55423,6 @@ fn __action1139< __2, __3, __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1140< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1135( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1054( - mode, - __0, - __temp0, - __3, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1141< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action547( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1054( - mode, - __0, - __temp0, - __1, - __2, - __3, ) } @@ -55290,23 +55432,23 @@ fn __action1142< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1135( + let __temp0 = __action1133( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1055( + __action1054( mode, __0, __temp0, @@ -55323,11 +55465,78 @@ fn __action1143< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, TextSize, TextSize), -) -> Result> +) -> Result> +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action547( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1054( + mode, + __0, + __temp0, + __1, + __2, + __3, + __4, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1144< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, token::Tok, TextSize), + __7: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1133( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1055( + mode, + __0, + __temp0, + __3, + __4, + __5, + __6, + __7, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1145< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, TextSize, TextSize), +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -55345,70 +55554,7 @@ fn __action1143< __2, __3, __4, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1144< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1135( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1056( - mode, - __0, - __temp0, - __3, - __4, __5, - __6, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1145< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action547( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1056( - mode, - __0, - __temp0, - __1, - __2, - __3, - __4, ) } @@ -55418,32 +55564,28 @@ fn __action1146< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, TextSize, TextSize), -) -> Result> + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, TextSize, TextSize), +) -> Result> { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1135( + let __temp0 = __action1133( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1057( + __action1056( mode, __0, __temp0, __3, __4, __5, - __6, - __7, ) } @@ -55453,12 +55595,73 @@ fn __action1147< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action547( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1056( + mode, + __0, + __temp0, + __1, + __2, + __3, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1148< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, TextSize, TextSize), +) -> Result> +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1133( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1057( + mode, + __0, + __temp0, + __3, + __4, + __5, + __6, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1149< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, TextSize, TextSize), -) -> Result> + __4: (TextSize, TextSize, TextSize), +) -> Result> { let __start0 = __0.2; let __end0 = __1.0; @@ -55476,137 +55679,12 @@ fn __action1147< __2, __3, __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1148< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1135( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1058( - mode, - __0, - __temp0, - __3, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1149< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action547( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1058( - mode, - __0, - __temp0, - __1, - __2, - __3, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1150< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1135( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1059( - mode, - __0, - __temp0, - __3, - __4, - __5, - __6, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1151< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, TextSize, TextSize), -) -> Result> -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action547( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1059( - mode, - __0, - __temp0, - __1, - __2, - __3, - __4, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1152< >( mode: Mode, __0: (TextSize, ast::Pattern, TextSize), @@ -55629,7 +55707,7 @@ fn __action1152< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1153< +fn __action1151< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -55654,7 +55732,7 @@ fn __action1153< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1154< +fn __action1152< >( mode: Mode, __0: (TextSize, core::option::Option, TextSize), @@ -55677,7 +55755,7 @@ fn __action1154< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1155< +fn __action1153< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -55700,7 +55778,7 @@ fn __action1155< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1156< +fn __action1154< >( mode: Mode, __0: (TextSize, ast::Stmt, TextSize), @@ -55723,7 +55801,7 @@ fn __action1156< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1157< +fn __action1155< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -55748,7 +55826,7 @@ fn __action1157< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1158< +fn __action1156< >( mode: Mode, __0: (TextSize, ast::Suite, TextSize), @@ -55775,6 +55853,62 @@ fn __action1158< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1157< +>( + mode: Mode, + __0: (TextSize, ast::Suite, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, ast::Stmt, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, token::Tok, TextSize), +) -> ast::Suite +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action387( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action645( + mode, + __0, + __temp0, + __2, + __3, + __4, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1158< +>( + mode: Mode, + __0: (TextSize, ast::Suite, TextSize), + __1: (TextSize, ast::Stmt, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::Suite +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action386( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action646( + mode, + __0, + __temp0, + __1, + __2, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1159< @@ -55784,7 +55918,6 @@ fn __action1159< __1: (TextSize, alloc::vec::Vec, TextSize), __2: (TextSize, ast::Stmt, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, token::Tok, TextSize), ) -> ast::Suite { let __start0 = __1.0; @@ -55794,13 +55927,12 @@ fn __action1159< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action645( + __action646( mode, __0, __temp0, __2, __3, - __4, ) } @@ -55809,23 +55941,23 @@ fn __action1159< fn __action1160< >( mode: Mode, - __0: (TextSize, ast::Suite, TextSize), - __1: (TextSize, ast::Stmt, TextSize), + __0: (TextSize, ast::Stmt, TextSize), + __1: (TextSize, token::Tok, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> ast::Suite +) -> Vec { - let __start0 = __0.2; - let __end0 = __1.0; + let __start0 = __0.0; + let __end0 = __0.0; let __temp0 = __action386( mode, &__start0, &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action646( + __action647( mode, - __0, __temp0, + __0, __1, __2, ) @@ -55836,23 +55968,23 @@ fn __action1160< fn __action1161< >( mode: Mode, - __0: (TextSize, ast::Suite, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), - __2: (TextSize, ast::Stmt, TextSize), + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::Stmt, TextSize), + __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> ast::Suite +) -> Vec { - let __start0 = __1.0; - let __end0 = __1.2; + let __start0 = __0.0; + let __end0 = __0.2; let __temp0 = __action387( mode, - __1, + __0, ); let __temp0 = (__start0, __temp0, __end0); - __action646( + __action647( mode, - __0, __temp0, + __1, __2, __3, ) @@ -55865,7 +55997,6 @@ fn __action1162< mode: Mode, __0: (TextSize, ast::Stmt, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), ) -> Vec { let __start0 = __0.0; @@ -55876,12 +56007,11 @@ fn __action1162< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action647( + __action648( mode, __temp0, __0, __1, - __2, ) } @@ -55893,7 +56023,6 @@ fn __action1163< __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, ast::Stmt, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, token::Tok, TextSize), ) -> Vec { let __start0 = __0.0; @@ -55903,68 +56032,17 @@ fn __action1163< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action647( + __action648( mode, __temp0, __1, __2, - __3, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1164< ->( - mode: Mode, - __0: (TextSize, ast::Stmt, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __0.0; - let __end0 = __0.0; - let __temp0 = __action386( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action648( - mode, - __temp0, - __0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1165< ->( - mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Stmt, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action387( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action648( - mode, - __temp0, - __1, - __2, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1166< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -55993,7 +56071,7 @@ fn __action1166< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1167< +fn __action1165< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -56022,7 +56100,7 @@ fn __action1167< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1168< +fn __action1166< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -56049,7 +56127,7 @@ fn __action1168< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1169< +fn __action1167< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -56076,7 +56154,7 @@ fn __action1169< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1170< +fn __action1168< >( mode: Mode, __0: (TextSize, ast::Stmt, TextSize), @@ -56103,7 +56181,7 @@ fn __action1170< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1171< +fn __action1169< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -56130,7 +56208,7 @@ fn __action1171< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1172< +fn __action1170< >( mode: Mode, __0: (TextSize, ast::Stmt, TextSize), @@ -56155,7 +56233,7 @@ fn __action1172< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1173< +fn __action1171< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -56180,11 +56258,11 @@ fn __action1173< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1174< +fn __action1172< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, token::Tok, TextSize), @@ -56200,7 +56278,7 @@ fn __action1174< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action768( + __action770( mode, __0, __temp0, @@ -56211,12 +56289,12 @@ fn __action1174< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1175< +fn __action1173< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, ast::Identifier, TextSize), __5: (TextSize, token::Tok, TextSize), @@ -56232,7 +56310,7 @@ fn __action1175< __4, ); let __temp0 = (__start0, __temp0, __end0); - __action770( + __action772( mode, __0, __1, @@ -56242,9 +56320,347 @@ fn __action1175< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1174< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action160( + mode, + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action301( + mode, + __temp0, + __1, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1175< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action160( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action641( + mode, + __0, + __temp0, + __2, + __3, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1176< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action160( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action642( + mode, + __0, + __temp0, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1177< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> core::option::Option> +{ + let __start0 = __0.0; + let __end0 = __1.2; + let __temp0 = __action1174( + mode, + __0, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action299( + mode, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1178< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::WithItem, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1177( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1060( + mode, + __0, + __temp0, + __3, + __4, + __5, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1179< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::WithItem, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action300( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1060( + mode, + __0, + __temp0, + __1, + __2, + __3, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1180< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::WithItem, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1177( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1061( + mode, + __0, + __temp0, + __3, + __4, + __5, + __6, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1181< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::WithItem, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action300( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1061( + mode, + __0, + __temp0, + __1, + __2, + __3, + __4, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1182< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::WithItem, TextSize), + __4: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1177( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1062( + mode, + __0, + __temp0, + __3, + __4, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1183< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::WithItem, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action300( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1062( + mode, + __0, + __temp0, + __1, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1184< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::WithItem, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action1177( + mode, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1063( + mode, + __0, + __temp0, + __3, + __4, + __5, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1185< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::WithItem, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> Vec +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action300( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1063( + mode, + __0, + __temp0, + __1, + __2, + __3, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1186< >( mode: Mode, __0: (TextSize, (String, StringKind, bool), TextSize), @@ -56267,13 +56683,13 @@ fn __action1176< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1177< +fn __action1187< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -56294,13 +56710,13 @@ fn __action1177< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1178< +fn __action1188< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -56321,13 +56737,13 @@ fn __action1178< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1179< +fn __action1189< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -56348,12 +56764,12 @@ fn __action1179< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1180< +fn __action1190< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -56373,12 +56789,12 @@ fn __action1180< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1181< +fn __action1191< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -56398,7 +56814,7 @@ fn __action1181< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1182< +fn __action1192< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -56425,13 +56841,13 @@ fn __action1182< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1183< +fn __action1193< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -56452,13 +56868,13 @@ fn __action1183< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1184< +fn __action1194< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -56479,7 +56895,7 @@ fn __action1184< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1185< +fn __action1195< >( mode: Mode, __0: (TextSize, ast::Pattern, TextSize), @@ -56506,13 +56922,13 @@ fn __action1185< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1186< +fn __action1196< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __3.2; @@ -56523,7 +56939,7 @@ fn __action1186< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1048( + __action1046( mode, __0, __1, @@ -56535,11 +56951,11 @@ fn __action1186< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1187< +fn __action1197< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __1.2; @@ -56550,7 +56966,7 @@ fn __action1187< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1049( + __action1047( mode, __0, __1, @@ -56560,11 +56976,11 @@ fn __action1187< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1188< +fn __action1198< >( mode: Mode, __0: (TextSize, ast::Constant, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.2; let __end0 = __0.2; @@ -56583,11 +56999,11 @@ fn __action1188< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1189< +fn __action1199< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.2; let __end0 = __0.2; @@ -56606,13 +57022,13 @@ fn __action1189< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1190< +fn __action1200< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), + __1: (TextSize, core::option::Option>, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -56633,14 +57049,14 @@ fn __action1190< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1191< +fn __action1201< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __3.2; let __end0 = __3.2; @@ -56662,14 +57078,14 @@ fn __action1191< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1192< +fn __action1202< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __3.2; let __end0 = __3.2; @@ -56691,13 +57107,13 @@ fn __action1192< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1193< +fn __action1203< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -56718,16 +57134,16 @@ fn __action1193< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1194< +fn __action1204< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -56737,6 +57153,69 @@ fn __action1194< &__end0, ); let __temp0 = (__start0, __temp0, __end0); + __action1134( + mode, + __0, + __1, + __2, + __3, + __4, + __5, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1205< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __3.2; + let __end0 = __3.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1135( + mode, + __0, + __1, + __2, + __3, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1206< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __6.2; + let __end0 = __6.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); __action1136( mode, __0, @@ -56745,23 +57224,25 @@ fn __action1194< __3, __4, __5, + __6, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1195< +fn __action1207< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> + __4: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __3.2; - let __end0 = __3.2; + let __start0 = __4.2; + let __end0 = __4.2; let __temp0 = __action392( mode, &__start0, @@ -56774,26 +57255,25 @@ fn __action1195< __1, __2, __3, + __4, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1196< +fn __action1208< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, token::Tok, TextSize), -) -> Result> + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __6.2; - let __end0 = __6.2; + let __start0 = __4.2; + let __end0 = __4.2; let __temp0 = __action392( mode, &__start0, @@ -56807,26 +57287,22 @@ fn __action1196< __2, __3, __4, - __5, - __6, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1197< +fn __action1209< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, token::Tok, TextSize), -) -> Result> + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __4.2; - let __end0 = __4.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, @@ -56838,26 +57314,25 @@ fn __action1197< __0, __1, __2, - __3, - __4, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1198< +fn __action1210< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, token::Tok, TextSize), -) -> Result> + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __4.2; - let __end0 = __4.2; + let __start0 = __5.2; + let __end0 = __5.2; let __temp0 = __action392( mode, &__start0, @@ -56871,22 +57346,24 @@ fn __action1198< __2, __3, __4, + __5, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1199< +fn __action1211< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> Result> + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __2.2; - let __end0 = __2.2; + let __start0 = __3.2; + let __end0 = __3.2; let __temp0 = __action392( mode, &__start0, @@ -56898,22 +57375,439 @@ fn __action1199< __0, __1, __2, + __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1200< +fn __action1212< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action717( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1213< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action718( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1214< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __3.2; + let __end0 = __3.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action719( + mode, + __0, + __1, + __2, + __3, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1215< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __3.2; + let __end0 = __3.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action720( + mode, + __0, + __1, + __2, + __3, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1216< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, core::option::Option>, ast::ParenthesizedExpr)>>, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action721( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1217< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, (ast::ParenthesizedExpr, ast::ParenthesizedExpr), TextSize), + __2: (TextSize, Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __3.2; + let __end0 = __3.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action722( + mode, + __0, + __1, + __2, + __3, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1218< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action723( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1219< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __3.2; + let __end0 = __3.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action724( + mode, + __0, + __1, + __2, + __3, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1220< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action725( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1221< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action726( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1222< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action727( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1223< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action728( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1224< +>( + mode: Mode, + __0: (TextSize, ast::Constant, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action730( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1225< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action731( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1226< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, core::option::Option>, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action732( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1227< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __3.2; + let __end0 = __3.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action733( + mode, + __0, + __1, + __2, + __3, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1228< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, token::Tok, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __5.2; let __end0 = __5.2; @@ -56937,14 +57831,14 @@ fn __action1200< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1201< +fn __action1229< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -56966,408 +57860,20 @@ fn __action1201< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1202< +fn __action1230< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __1.2; - let __end0 = __1.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action717( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1203< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action718( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1204< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action719( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1205< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, ast::Expr)>>, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action720( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1206< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, (ast::Expr, ast::Expr), TextSize), - __2: (TextSize, Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action721( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1207< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action722( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1208< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action723( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1209< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action724( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1210< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action725( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1211< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action726( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1212< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action727( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1213< ->( - mode: Mode, - __0: (TextSize, ast::Constant, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action729( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1214< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action730( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1215< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action731( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1216< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action732( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1217< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), __5: (TextSize, token::Tok, TextSize), -) -> Result> + __6: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __5.2; - let __end0 = __5.2; + let __start0 = __6.2; + let __end0 = __6.2; let __temp0 = __action392( mode, &__start0, @@ -57382,23 +57888,25 @@ fn __action1217< __3, __4, __5, + __6, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1218< +fn __action1231< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> Result> + __4: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __3.2; - let __end0 = __3.2; + let __start0 = __4.2; + let __end0 = __4.2; let __temp0 = __action392( mode, &__start0, @@ -57411,26 +57919,25 @@ fn __action1218< __1, __2, __3, + __4, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1219< +fn __action1232< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, token::Tok, TextSize), -) -> Result> + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __6.2; - let __end0 = __6.2; + let __start0 = __4.2; + let __end0 = __4.2; let __temp0 = __action392( mode, &__start0, @@ -57444,26 +57951,22 @@ fn __action1219< __2, __3, __4, - __5, - __6, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1220< +fn __action1233< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, token::Tok, TextSize), -) -> Result> + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __4.2; - let __end0 = __4.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, @@ -57475,26 +57978,25 @@ fn __action1220< __0, __1, __2, - __3, - __4, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1221< +fn __action1234< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, token::Tok, TextSize), -) -> Result> + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), + __5: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __4.2; - let __end0 = __4.2; + let __start0 = __5.2; + let __end0 = __5.2; let __temp0 = __action392( mode, &__start0, @@ -57508,22 +58010,24 @@ fn __action1221< __2, __3, __4, + __5, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1222< +fn __action1235< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> Result> + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> Result> { - let __start0 = __2.2; - let __end0 = __2.2; + let __start0 = __3.2; + let __end0 = __3.2; let __temp0 = __action392( mode, &__start0, @@ -57531,67 +58035,6 @@ fn __action1222< ); let __temp0 = (__start0, __temp0, __end0); __action1149( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1223< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), - __5: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __5.2; - let __end0 = __5.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1150( - mode, - __0, - __1, - __2, - __3, - __4, - __5, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1224< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1151( mode, __0, __1, @@ -57603,12 +58046,12 @@ fn __action1224< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1225< +fn __action1236< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -57618,56 +58061,26 @@ fn __action1225< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action735( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1226< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); __action736( mode, __0, __1, - __2, - __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1227< +fn __action1237< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> Result> + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __3.2; - let __end0 = __3.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, @@ -57679,23 +58092,23 @@ fn __action1227< __0, __1, __2, - __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1228< +fn __action1238< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option>, ast::Expr)>>, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __2.2; - let __end0 = __2.2; + let __start0 = __3.2; + let __end0 = __3.2; let __temp0 = __action392( mode, &__start0, @@ -57707,20 +58120,21 @@ fn __action1228< __0, __1, __2, + __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1229< +fn __action1239< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, (ast::Expr, ast::Expr), TextSize), - __2: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -57742,13 +58156,13 @@ fn __action1229< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1230< +fn __action1240< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, core::option::Option>, ast::ParenthesizedExpr)>>, TextSize), __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -57769,14 +58183,14 @@ fn __action1230< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1231< +fn __action1241< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, (ast::ParenthesizedExpr, ast::ParenthesizedExpr), TextSize), __2: (TextSize, Vec, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __3.2; let __end0 = __3.2; @@ -57798,14 +58212,16 @@ fn __action1231< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1232< +fn __action1242< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __0.2; - let __end0 = __0.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, @@ -57815,20 +58231,25 @@ fn __action1232< __action742( mode, __0, + __1, + __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1233< +fn __action1243< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, Vec, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __0.2; - let __end0 = __0.2; + let __start0 = __3.2; + let __end0 = __3.2; let __temp0 = __action392( mode, &__start0, @@ -57838,17 +58259,20 @@ fn __action1233< __action743( mode, __0, + __1, + __2, + __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1234< +fn __action1244< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.2; let __end0 = __0.2; @@ -57867,11 +58291,11 @@ fn __action1234< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1235< +fn __action1245< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.2; let __end0 = __0.2; @@ -57890,15 +58314,14 @@ fn __action1235< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1236< +fn __action1246< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, ast::Arguments, TextSize), -) -> ast::Expr + __0: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __0.2; + let __end0 = __0.2; let __temp0 = __action392( mode, &__start0, @@ -57906,6 +58329,53 @@ fn __action1236< ); let __temp0 = (__start0, __temp0, __end0); __action746( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1247< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action747( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1248< +>( + mode: Mode, + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, ast::Arguments, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action748( mode, __0, __1, @@ -57915,14 +58385,14 @@ fn __action1236< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1237< +fn __action1249< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __3.2; let __end0 = __3.2; @@ -57932,7 +58402,7 @@ fn __action1237< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action747( + __action749( mode, __0, __1, @@ -57944,13 +58414,13 @@ fn __action1237< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1238< +fn __action1250< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Identifier, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -57960,81 +58430,26 @@ fn __action1238< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action748( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1239< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, ast::Arguments, TextSize), -) -> ast::Expr -{ - let __start0 = __1.2; - let __end0 = __1.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action749( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1240< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); __action750( mode, __0, __1, __2, - __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1241< +fn __action1251< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Identifier, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, ast::Arguments, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __2.2; - let __end0 = __2.2; + let __start0 = __1.2; + let __end0 = __1.2; let __temp0 = __action392( mode, &__start0, @@ -58045,22 +58460,23 @@ fn __action1241< mode, __0, __1, - __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1242< +fn __action1252< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __3.2; + let __end0 = __3.2; let __temp0 = __action392( mode, &__start0, @@ -58071,21 +58487,24 @@ fn __action1242< mode, __0, __1, + __2, + __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1243< +fn __action1253< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Identifier, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, @@ -58096,13 +58515,64 @@ fn __action1243< mode, __0, __1, + __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1244< +fn __action1254< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action754( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1255< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action755( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1256< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -58116,71 +58586,21 @@ fn __action1244< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action754( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1245< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, ast::PatternArguments, TextSize), -) -> ast::Pattern -{ - let __start0 = __1.2; - let __end0 = __1.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); __action756( mode, __0, - __1, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1246< +fn __action1257< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, ast::PatternArguments, TextSize), ) -> ast::Pattern -{ - let __start0 = __1.2; - let __end0 = __1.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action757( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1247< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::Expr)>, TextSize), -) -> ast::Expr { let __start0 = __1.2; let __end0 = __1.2; @@ -58200,12 +58620,12 @@ fn __action1247< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1248< +fn __action1258< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::Expr)>, TextSize), -) -> ast::Expr + __1: (TextSize, ast::PatternArguments, TextSize), +) -> ast::Pattern { let __start0 = __1.2; let __end0 = __1.2; @@ -58225,14 +58645,15 @@ fn __action1248< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1249< +fn __action1259< >( mode: Mode, - __0: (TextSize, ast::Constant, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __0.2; - let __end0 = __0.2; + let __start0 = __1.2; + let __end0 = __1.2; let __temp0 = __action392( mode, &__start0, @@ -58242,18 +58663,19 @@ fn __action1249< __action760( mode, __0, + __1, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1250< +fn __action1260< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -58273,16 +58695,14 @@ fn __action1250< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1251< +fn __action1261< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> ast::Decorator + __0: (TextSize, ast::Constant, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __1.2; - let __end0 = __2.0; + let __start0 = __0.2; + let __end0 = __0.2; let __temp0 = __action392( mode, &__start0, @@ -58292,20 +58712,18 @@ fn __action1251< __action762( mode, __0, - __1, __temp0, - __2, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1252< +fn __action1262< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), -) -> ast::Stmt + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -58325,14 +58743,16 @@ fn __action1252< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1253< +fn __action1263< >( mode: Mode, - __0: (TextSize, String, TextSize), -) -> ast::Identifier + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::Decorator { - let __start0 = __0.2; - let __end0 = __0.2; + let __start0 = __1.2; + let __end0 = __2.0; let __temp0 = __action392( mode, &__start0, @@ -58342,18 +58762,20 @@ fn __action1253< __action764( mode, __0, + __1, __temp0, + __2, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1254< +fn __action1264< >( mode: Mode, - __0: (TextSize, String, TextSize), - __1: (TextSize, alloc::vec::Vec<(token::Tok, ast::Identifier)>, TextSize), -) -> ast::Identifier + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), +) -> ast::Stmt { let __start0 = __1.2; let __end0 = __1.2; @@ -58373,12 +58795,60 @@ fn __action1254< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1255< +fn __action1265< +>( + mode: Mode, + __0: (TextSize, String, TextSize), +) -> ast::Identifier +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action766( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1266< +>( + mode: Mode, + __0: (TextSize, String, TextSize), + __1: (TextSize, alloc::vec::Vec<(token::Tok, ast::Identifier)>, TextSize), +) -> ast::Identifier +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action767( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1267< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Parameter { let __start0 = __2.2; @@ -58389,7 +58859,7 @@ fn __action1255< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1074( + __action1072( mode, __0, __1, @@ -58400,7 +58870,7 @@ fn __action1255< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1256< +fn __action1268< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -58414,7 +58884,7 @@ fn __action1256< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1075( + __action1073( mode, __0, __temp0, @@ -58423,13 +58893,13 @@ fn __action1256< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1257< +fn __action1269< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -58439,76 +58909,24 @@ fn __action1257< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action771( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1258< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action772( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1259< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), -) -> ast::Stmt -{ - let __start0 = __1.2; - let __end0 = __1.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); __action773( mode, __0, __1, + __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1260< +fn __action1270< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Stmt + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -58529,13 +58947,65 @@ fn __action1260< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1261< +fn __action1271< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), +) -> ast::Stmt +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action775( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1272< +>( + mode: Mode, + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, ast::Operator, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::Stmt +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action776( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1273< +>( + mode: Mode, + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, core::option::Option, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, core::option::Option, TextSize), ) -> ast::Stmt { let __start0 = __3.2; @@ -58546,7 +59016,7 @@ fn __action1261< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action775( + __action777( mode, __0, __1, @@ -58558,12 +59028,12 @@ fn __action1261< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1262< +fn __action1274< >( mode: Mode, __0: (TextSize, ast::UnaryOp, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -58573,65 +59043,42 @@ fn __action1262< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action776( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1263< ->( - mode: Mode, - __0: (TextSize, ast::UnaryOp, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr -{ - let __start0 = __1.2; - let __end0 = __1.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action777( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1264< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Stmt -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); __action778( mode, __0, + __1, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1265< +fn __action1275< +>( + mode: Mode, + __0: (TextSize, ast::UnaryOp, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action779( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1276< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -58645,44 +59092,19 @@ fn __action1265< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action779( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1266< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), -) -> ast::Stmt -{ - let __start0 = __1.2; - let __end0 = __1.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); __action780( mode, __0, - __1, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1267< +fn __action1277< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, token::Tok, TextSize), ) -> ast::Stmt { let __start0 = __0.2; @@ -58702,12 +59124,12 @@ fn __action1267< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1268< +fn __action1278< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, core::option::Option>, TextSize), -) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, core::option::Option, TextSize), +) -> ast::Stmt { let __start0 = __1.2; let __end0 = __1.2; @@ -58717,7 +59139,7 @@ fn __action1268< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action786( + __action782( mode, __0, __1, @@ -58727,38 +59149,34 @@ fn __action1268< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1269< +fn __action1279< >( mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) + __0: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::Stmt { - let __start0 = __2.2; - let __end0 = __2.2; + let __start0 = __0.2; + let __end0 = __0.2; let __temp0 = __action392( mode, &__start0, &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action787( + __action783( mode, __0, - __1, - __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1270< +fn __action1280< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, core::option::Option>, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { let __start0 = __1.2; @@ -58779,15 +59197,16 @@ fn __action1270< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1271< +fn __action1281< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::Identifier, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, @@ -58798,18 +59217,19 @@ fn __action1271< mode, __0, __1, + __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1272< +fn __action1282< >( mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { let __start0 = __1.2; let __end0 = __1.2; @@ -58829,14 +59249,15 @@ fn __action1272< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1273< +fn __action1283< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> ast::Expr + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { - let __start0 = __0.2; - let __end0 = __0.2; + let __start0 = __1.2; + let __end0 = __1.2; let __temp0 = __action392( mode, &__start0, @@ -58846,18 +59267,19 @@ fn __action1273< __action791( mode, __0, + __1, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1274< +fn __action1284< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -58877,11 +59299,11 @@ fn __action1274< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1275< +fn __action1285< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> ast::Expr + __0: (TextSize, Vec, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.2; let __end0 = __0.2; @@ -58900,12 +59322,12 @@ fn __action1275< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1276< +fn __action1286< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), -) -> ast::Stmt + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -58925,11 +59347,11 @@ fn __action1276< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1277< +fn __action1287< >( mode: Mode, - __0: (TextSize, String, TextSize), -) -> ast::Identifier + __0: (TextSize, Vec, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.2; let __end0 = __0.2; @@ -58948,7 +59370,105 @@ fn __action1277< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1278< +fn __action1288< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), +) -> ast::Stmt +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action796( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1289< +>( + mode: Mode, + __0: (TextSize, String, TextSize), +) -> ast::Identifier +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action797( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1290< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Identifier, TextSize), +) -> ast::Alias +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1088( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1291< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), +) -> ast::Alias +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1089( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1292< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -58975,7 +59495,7 @@ fn __action1278< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1279< +fn __action1293< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -58998,57 +59518,7 @@ fn __action1279< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1280< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Identifier, TextSize), -) -> ast::Alias -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1092( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1281< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), -) -> ast::Alias -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1093( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1282< +fn __action1294< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -59062,7 +59532,7 @@ fn __action1282< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action799( + __action801( mode, __0, __temp0, @@ -59071,7 +59541,7 @@ fn __action1282< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1283< +fn __action1295< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59088,7 +59558,7 @@ fn __action1283< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action800( + __action802( mode, __0, __1, @@ -59100,7 +59570,7 @@ fn __action1283< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1284< +fn __action1296< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59116,7 +59586,7 @@ fn __action1284< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action801( + __action803( mode, __0, __1, @@ -59127,7 +59597,7 @@ fn __action1284< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1285< +fn __action1297< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59141,7 +59611,7 @@ fn __action1285< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action802( + __action804( mode, __0, __temp0, @@ -59150,7 +59620,7 @@ fn __action1285< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1286< +fn __action1298< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59165,7 +59635,7 @@ fn __action1286< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action803( + __action805( mode, __0, __1, @@ -59175,7 +59645,7 @@ fn __action1286< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1287< +fn __action1299< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59192,7 +59662,7 @@ fn __action1287< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action804( + __action806( mode, __0, __1, @@ -59204,11 +59674,11 @@ fn __action1287< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1288< +fn __action1300< >( mode: Mode, __0: (TextSize, (IpyEscapeKind, String), TextSize), -) -> Result> +) -> Result> { let __start0 = __0.2; let __end0 = __0.2; @@ -59218,7 +59688,7 @@ fn __action1288< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action805( + __action807( mode, __0, __temp0, @@ -59227,7 +59697,7 @@ fn __action1288< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1289< +fn __action1301< >( mode: Mode, __0: (TextSize, (IpyEscapeKind, String), TextSize), @@ -59241,7 +59711,7 @@ fn __action1289< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action806( + __action808( mode, __0, __temp0, @@ -59250,10 +59720,10 @@ fn __action1289< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1290< +fn __action1302< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, alloc::vec::Vec, TextSize), ) -> Result> { @@ -59265,7 +59735,7 @@ fn __action1290< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action807( + __action809( mode, __0, __1, @@ -59275,14 +59745,14 @@ fn __action1290< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1291< +fn __action1303< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, core::option::Option, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), -) -> Result> + __3: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Result> { let __start0 = __1.2; let __end0 = __2.0; @@ -59300,7 +59770,7 @@ fn __action1291< &__end1, ); let __temp1 = (__start1, __temp1, __end1); - __action808( + __action810( mode, __0, __1, @@ -59313,53 +59783,7 @@ fn __action1291< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1292< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Pattern -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action809( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1293< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Pattern -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action810( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1294< +fn __action1304< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59382,10 +59806,10 @@ fn __action1294< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1295< +fn __action1305< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, token::Tok, TextSize), ) -> ast::Pattern { let __start0 = __0.2; @@ -59405,10 +59829,10 @@ fn __action1295< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1296< +fn __action1306< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, token::Tok, TextSize), ) -> ast::Pattern { let __start0 = __0.2; @@ -59428,11 +59852,11 @@ fn __action1296< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1297< +fn __action1307< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), -) -> Result> + __0: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::Pattern { let __start0 = __0.2; let __end0 = __0.2; @@ -59451,11 +59875,11 @@ fn __action1297< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1298< +fn __action1308< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::Pattern { let __start0 = __0.2; let __end0 = __0.2; @@ -59474,11 +59898,11 @@ fn __action1298< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1299< +fn __action1309< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr + __0: (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), +) -> Result> { let __start0 = __0.2; let __end0 = __0.2; @@ -59497,7 +59921,7 @@ fn __action1299< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1300< +fn __action1310< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59520,7 +59944,53 @@ fn __action1300< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1301< +fn __action1311< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), +) -> ast::Expr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action818( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1312< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), +) -> ast::Expr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action819( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1313< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59535,7 +60005,7 @@ fn __action1301< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action819( + __action821( mode, __0, __1, @@ -59545,7 +60015,7 @@ fn __action1301< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1302< +fn __action1314< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59562,7 +60032,7 @@ fn __action1302< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action820( + __action822( mode, __0, __1, @@ -59574,7 +60044,7 @@ fn __action1302< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1303< +fn __action1315< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59590,7 +60060,7 @@ fn __action1303< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action821( + __action823( mode, __0, __1, @@ -59601,7 +60071,7 @@ fn __action1303< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1304< +fn __action1316< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59619,7 +60089,7 @@ fn __action1304< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action822( + __action824( mode, __0, __1, @@ -59632,7 +60102,7 @@ fn __action1304< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1305< +fn __action1317< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59649,7 +60119,7 @@ fn __action1305< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action823( + __action825( mode, __0, __1, @@ -59661,7 +60131,7 @@ fn __action1305< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1306< +fn __action1318< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59681,7 +60151,7 @@ fn __action1306< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action824( + __action826( mode, __0, __1, @@ -59696,7 +60166,7 @@ fn __action1306< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1307< +fn __action1319< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -59715,7 +60185,7 @@ fn __action1307< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action825( + __action827( mode, __0, __1, @@ -59729,63 +60199,13 @@ fn __action1307< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1308< +fn __action1320< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), __2: (TextSize, ast::Pattern, TextSize), ) -> ast::PatternKeyword -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action827( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1309< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action828( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1310< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Identifier, TextSize), -) -> ast::Expr { let __start0 = __2.2; let __end0 = __2.2; @@ -59806,7 +60226,30 @@ fn __action1310< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1311< +fn __action1321< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), +) -> ast::Expr +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action830( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1322< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), @@ -59822,7 +60265,7 @@ fn __action1311< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action830( + __action831( mode, __0, __1, @@ -59833,12 +60276,12 @@ fn __action1311< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1312< +fn __action1323< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::Identifier, TextSize), ) -> ast::Expr { let __start0 = __2.2; @@ -59849,7 +60292,7 @@ fn __action1312< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action835( + __action832( mode, __0, __1, @@ -59860,38 +60303,16 @@ fn __action1312< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1313< +fn __action1324< >( mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action836( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1314< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), -) -> ast::Stmt -{ - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, @@ -59902,21 +60323,21 @@ fn __action1314< mode, __0, __1, + __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1315< +fn __action1325< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, ast::Identifier, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __0.2; + let __end0 = __0.2; let __temp0 = __action392( mode, &__start0, @@ -59926,19 +60347,18 @@ fn __action1315< __action838( mode, __0, - __1, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1316< +fn __action1326< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __1: (TextSize, Vec, TextSize), +) -> ast::Stmt { let __start0 = __1.2; let __end0 = __1.2; @@ -59958,14 +60378,15 @@ fn __action1316< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1317< +fn __action1327< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> ast::Pattern + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __0.2; - let __end0 = __0.2; + let __start0 = __1.2; + let __end0 = __1.2; let __temp0 = __action392( mode, &__start0, @@ -59975,18 +60396,19 @@ fn __action1317< __action840( mode, __0, + __1, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1318< +fn __action1328< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -60006,15 +60428,14 @@ fn __action1318< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1319< +fn __action1329< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, Vec, TextSize), +) -> ast::Pattern { - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __0.2; + let __end0 = __0.2; let __temp0 = __action392( mode, &__start0, @@ -60022,6 +60443,30 @@ fn __action1319< ); let __temp0 = (__start0, __temp0, __end0); __action842( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1330< +>( + mode: Mode, + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action843( mode, __0, __1, @@ -60031,12 +60476,37 @@ fn __action1319< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1320< +fn __action1331< +>( + mode: Mode, + __0: (TextSize, alloc::vec::Vec, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action844( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1332< >( mode: Mode, __0: (TextSize, ast::ParameterWithDefault, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::ParameterWithDefault { let __start0 = __2.2; @@ -60058,12 +60528,12 @@ fn __action1320< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1321< +fn __action1333< >( mode: Mode, __0: (TextSize, ast::ParameterWithDefault, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::ParameterWithDefault { let __start0 = __2.2; @@ -60085,7 +60555,7 @@ fn __action1321< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1322< +fn __action1334< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60105,7 +60575,7 @@ fn __action1322< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action969( + __action967( mode, __0, __1, @@ -60120,7 +60590,7 @@ fn __action1322< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1323< +fn __action1335< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60139,7 +60609,7 @@ fn __action1323< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action970( + __action968( mode, __0, __1, @@ -60153,7 +60623,7 @@ fn __action1323< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1324< +fn __action1336< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60174,7 +60644,7 @@ fn __action1324< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action971( + __action969( mode, __0, __1, @@ -60190,7 +60660,7 @@ fn __action1324< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1325< +fn __action1337< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60210,7 +60680,7 @@ fn __action1325< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action972( + __action970( mode, __0, __1, @@ -60225,7 +60695,7 @@ fn __action1325< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1326< +fn __action1338< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60243,7 +60713,7 @@ fn __action1326< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action973( + __action971( mode, __0, __1, @@ -60256,7 +60726,7 @@ fn __action1326< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1327< +fn __action1339< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60273,7 +60743,7 @@ fn __action1327< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action974( + __action972( mode, __0, __1, @@ -60285,7 +60755,7 @@ fn __action1327< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1328< +fn __action1340< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60304,7 +60774,7 @@ fn __action1328< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action975( + __action973( mode, __0, __1, @@ -60318,7 +60788,7 @@ fn __action1328< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1329< +fn __action1341< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60336,7 +60806,7 @@ fn __action1329< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action976( + __action974( mode, __0, __1, @@ -60349,7 +60819,7 @@ fn __action1329< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1330< +fn __action1342< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60364,7 +60834,7 @@ fn __action1330< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action977( + __action975( mode, __0, __1, @@ -60374,7 +60844,7 @@ fn __action1330< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1331< +fn __action1343< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60393,7 +60863,7 @@ fn __action1331< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action978( + __action976( mode, __0, __1, @@ -60407,7 +60877,7 @@ fn __action1331< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1332< +fn __action1344< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60425,7 +60895,7 @@ fn __action1332< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action979( + __action977( mode, __0, __1, @@ -60438,7 +60908,7 @@ fn __action1332< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1333< +fn __action1345< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60458,7 +60928,7 @@ fn __action1333< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action980( + __action978( mode, __0, __1, @@ -60473,7 +60943,7 @@ fn __action1333< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1334< +fn __action1346< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60492,7 +60962,7 @@ fn __action1334< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action981( + __action979( mode, __0, __1, @@ -60506,7 +60976,7 @@ fn __action1334< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1335< +fn __action1347< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60523,7 +60993,7 @@ fn __action1335< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action982( + __action980( mode, __0, __1, @@ -60535,7 +61005,7 @@ fn __action1335< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1336< +fn __action1348< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60551,7 +61021,7 @@ fn __action1336< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action983( + __action981( mode, __0, __1, @@ -60562,7 +61032,7 @@ fn __action1336< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1337< +fn __action1349< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60580,7 +61050,7 @@ fn __action1337< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action984( + __action982( mode, __0, __1, @@ -60593,7 +61063,7 @@ fn __action1337< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1338< +fn __action1350< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60610,7 +61080,7 @@ fn __action1338< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action985( + __action983( mode, __0, __1, @@ -60622,7 +61092,7 @@ fn __action1338< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1339< +fn __action1351< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60636,7 +61106,7 @@ fn __action1339< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action986( + __action984( mode, __0, __temp0, @@ -60645,7 +61115,7 @@ fn __action1339< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1340< +fn __action1352< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60662,7 +61132,7 @@ fn __action1340< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action845( + __action847( mode, __0, __1, @@ -60674,7 +61144,7 @@ fn __action1340< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1341< +fn __action1353< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -60690,7 +61160,7 @@ fn __action1341< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action846( + __action848( mode, __0, __1, @@ -60701,7 +61171,7 @@ fn __action1341< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1342< +fn __action1354< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -60719,7 +61189,7 @@ fn __action1342< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action945( + __action943( mode, __0, __1, @@ -60732,7 +61202,7 @@ fn __action1342< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1343< +fn __action1355< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -60749,7 +61219,7 @@ fn __action1343< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action946( + __action944( mode, __0, __1, @@ -60761,7 +61231,7 @@ fn __action1343< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1344< +fn __action1356< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -60780,7 +61250,7 @@ fn __action1344< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action947( + __action945( mode, __0, __1, @@ -60794,7 +61264,7 @@ fn __action1344< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1345< +fn __action1357< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -60812,7 +61282,7 @@ fn __action1345< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action948( + __action946( mode, __0, __1, @@ -60825,7 +61295,7 @@ fn __action1345< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1346< +fn __action1358< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -60841,7 +61311,7 @@ fn __action1346< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action949( + __action947( mode, __0, __1, @@ -60852,7 +61322,7 @@ fn __action1346< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1347< +fn __action1359< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -60867,7 +61337,7 @@ fn __action1347< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action950( + __action948( mode, __0, __1, @@ -60877,7 +61347,7 @@ fn __action1347< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1348< +fn __action1360< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -60885,6 +61355,62 @@ fn __action1348< __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), ) -> Result> +{ + let __start0 = __3.2; + let __end0 = __3.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action949( + mode, + __0, + __1, + __2, + __3, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1361< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action950( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1362< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -60906,12 +61432,12 @@ fn __action1348< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1349< +fn __action1363< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, Option>, TextSize), ) -> Result> { let __start0 = __2.2; @@ -60933,63 +61459,7 @@ fn __action1349< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1350< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Parameter, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action953( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1351< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action954( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1352< +fn __action1364< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61007,7 +61477,7 @@ fn __action1352< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action955( + __action953( mode, __0, __1, @@ -61020,7 +61490,7 @@ fn __action1352< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1353< +fn __action1365< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61037,7 +61507,7 @@ fn __action1353< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action956( + __action954( mode, __0, __1, @@ -61049,7 +61519,7 @@ fn __action1353< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1354< +fn __action1366< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61064,7 +61534,7 @@ fn __action1354< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action957( + __action955( mode, __0, __1, @@ -61074,7 +61544,7 @@ fn __action1354< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1355< +fn __action1367< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61088,7 +61558,7 @@ fn __action1355< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action958( + __action956( mode, __0, __temp0, @@ -61097,7 +61567,7 @@ fn __action1355< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1356< +fn __action1368< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61113,7 +61583,7 @@ fn __action1356< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action959( + __action957( mode, __0, __1, @@ -61124,7 +61594,7 @@ fn __action1356< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1357< +fn __action1369< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61139,7 +61609,7 @@ fn __action1357< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action960( + __action958( mode, __0, __1, @@ -61149,7 +61619,7 @@ fn __action1357< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1358< +fn __action1370< >( mode: Mode, __0: (TextSize, Option>, TextSize), @@ -61164,7 +61634,7 @@ fn __action1358< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action849( + __action851( mode, __0, __1, @@ -61174,7 +61644,7 @@ fn __action1358< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1359< +fn __action1371< >( mode: Mode, __0: (TextSize, Option>, TextSize), @@ -61188,7 +61658,7 @@ fn __action1359< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action850( + __action852( mode, __0, __temp0, @@ -61197,7 +61667,7 @@ fn __action1359< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1360< +fn __action1372< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61217,7 +61687,7 @@ fn __action1360< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1029( + __action1027( mode, __0, __1, @@ -61232,7 +61702,7 @@ fn __action1360< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1361< +fn __action1373< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61251,7 +61721,7 @@ fn __action1361< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1030( + __action1028( mode, __0, __1, @@ -61265,7 +61735,7 @@ fn __action1361< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1362< +fn __action1374< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61286,7 +61756,7 @@ fn __action1362< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1031( + __action1029( mode, __0, __1, @@ -61302,7 +61772,7 @@ fn __action1362< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1363< +fn __action1375< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61322,7 +61792,7 @@ fn __action1363< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1032( + __action1030( mode, __0, __1, @@ -61337,7 +61807,7 @@ fn __action1363< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1364< +fn __action1376< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61355,7 +61825,7 @@ fn __action1364< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1033( + __action1031( mode, __0, __1, @@ -61368,7 +61838,7 @@ fn __action1364< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1365< +fn __action1377< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61385,7 +61855,7 @@ fn __action1365< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1034( + __action1032( mode, __0, __1, @@ -61397,7 +61867,7 @@ fn __action1365< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1366< +fn __action1378< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61416,7 +61886,7 @@ fn __action1366< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1035( + __action1033( mode, __0, __1, @@ -61430,7 +61900,7 @@ fn __action1366< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1367< +fn __action1379< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61448,7 +61918,7 @@ fn __action1367< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1036( + __action1034( mode, __0, __1, @@ -61461,7 +61931,7 @@ fn __action1367< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1368< +fn __action1380< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61476,7 +61946,7 @@ fn __action1368< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1037( + __action1035( mode, __0, __1, @@ -61486,7 +61956,7 @@ fn __action1368< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1369< +fn __action1381< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61505,7 +61975,7 @@ fn __action1369< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1038( + __action1036( mode, __0, __1, @@ -61519,7 +61989,7 @@ fn __action1369< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1370< +fn __action1382< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61537,7 +62007,7 @@ fn __action1370< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1039( + __action1037( mode, __0, __1, @@ -61550,7 +62020,7 @@ fn __action1370< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1371< +fn __action1383< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61570,7 +62040,7 @@ fn __action1371< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1040( + __action1038( mode, __0, __1, @@ -61585,7 +62055,7 @@ fn __action1371< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1372< +fn __action1384< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61604,7 +62074,7 @@ fn __action1372< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1041( + __action1039( mode, __0, __1, @@ -61618,7 +62088,7 @@ fn __action1372< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1373< +fn __action1385< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61635,7 +62105,7 @@ fn __action1373< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1042( + __action1040( mode, __0, __1, @@ -61647,7 +62117,7 @@ fn __action1373< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1374< +fn __action1386< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61663,7 +62133,7 @@ fn __action1374< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1043( + __action1041( mode, __0, __1, @@ -61674,7 +62144,7 @@ fn __action1374< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1375< +fn __action1387< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61692,7 +62162,7 @@ fn __action1375< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1044( + __action1042( mode, __0, __1, @@ -61705,7 +62175,7 @@ fn __action1375< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1376< +fn __action1388< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61722,7 +62192,7 @@ fn __action1376< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1045( + __action1043( mode, __0, __1, @@ -61734,7 +62204,7 @@ fn __action1376< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1377< +fn __action1389< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61748,7 +62218,7 @@ fn __action1377< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1046( + __action1044( mode, __0, __temp0, @@ -61757,7 +62227,7 @@ fn __action1377< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1378< +fn __action1390< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61774,7 +62244,7 @@ fn __action1378< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action853( + __action855( mode, __0, __1, @@ -61786,7 +62256,7 @@ fn __action1378< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1379< +fn __action1391< >( mode: Mode, __0: (TextSize, (Vec, Vec), TextSize), @@ -61802,7 +62272,7 @@ fn __action1379< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action854( + __action856( mode, __0, __1, @@ -61813,7 +62283,7 @@ fn __action1379< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1380< +fn __action1392< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61831,7 +62301,7 @@ fn __action1380< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1005( + __action1003( mode, __0, __1, @@ -61844,7 +62314,7 @@ fn __action1380< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1381< +fn __action1393< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61861,7 +62331,7 @@ fn __action1381< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1006( + __action1004( mode, __0, __1, @@ -61873,7 +62343,7 @@ fn __action1381< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1382< +fn __action1394< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61892,7 +62362,7 @@ fn __action1382< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1007( + __action1005( mode, __0, __1, @@ -61906,7 +62376,7 @@ fn __action1382< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1383< +fn __action1395< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61924,7 +62394,7 @@ fn __action1383< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1008( + __action1006( mode, __0, __1, @@ -61937,7 +62407,7 @@ fn __action1383< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1384< +fn __action1396< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61953,7 +62423,7 @@ fn __action1384< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1009( + __action1007( mode, __0, __1, @@ -61964,7 +62434,7 @@ fn __action1384< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1385< +fn __action1397< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61979,7 +62449,7 @@ fn __action1385< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1010( + __action1008( mode, __0, __1, @@ -61989,7 +62459,7 @@ fn __action1385< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1386< +fn __action1398< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -61997,6 +62467,62 @@ fn __action1386< __2: (TextSize, alloc::vec::Vec, TextSize), __3: (TextSize, token::Tok, TextSize), ) -> Result> +{ + let __start0 = __3.2; + let __end0 = __3.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1009( + mode, + __0, + __1, + __2, + __3, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1399< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1010( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1400< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::Parameter, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, Option>, TextSize), +) -> Result> { let __start0 = __3.2; let __end0 = __3.2; @@ -62018,12 +62544,12 @@ fn __action1386< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1387< +fn __action1401< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, Option>, TextSize), ) -> Result> { let __start0 = __2.2; @@ -62045,63 +62571,7 @@ fn __action1387< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1388< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Parameter, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1013( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1389< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1014( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1390< +fn __action1402< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62119,7 +62589,7 @@ fn __action1390< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1015( + __action1013( mode, __0, __1, @@ -62132,7 +62602,7 @@ fn __action1390< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1391< +fn __action1403< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62149,7 +62619,7 @@ fn __action1391< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1016( + __action1014( mode, __0, __1, @@ -62161,7 +62631,7 @@ fn __action1391< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1392< +fn __action1404< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62176,7 +62646,7 @@ fn __action1392< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1017( + __action1015( mode, __0, __1, @@ -62186,7 +62656,7 @@ fn __action1392< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1393< +fn __action1405< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62200,7 +62670,7 @@ fn __action1393< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1018( + __action1016( mode, __0, __temp0, @@ -62209,7 +62679,7 @@ fn __action1393< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1394< +fn __action1406< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62225,7 +62695,7 @@ fn __action1394< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1019( + __action1017( mode, __0, __1, @@ -62236,7 +62706,7 @@ fn __action1394< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1395< +fn __action1407< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62251,7 +62721,7 @@ fn __action1395< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1020( + __action1018( mode, __0, __1, @@ -62261,7 +62731,7 @@ fn __action1395< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1396< +fn __action1408< >( mode: Mode, __0: (TextSize, Option>, TextSize), @@ -62276,7 +62746,7 @@ fn __action1396< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action857( + __action859( mode, __0, __1, @@ -62286,7 +62756,7 @@ fn __action1396< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1397< +fn __action1409< >( mode: Mode, __0: (TextSize, Option>, TextSize), @@ -62300,7 +62770,7 @@ fn __action1397< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action858( + __action860( mode, __0, __temp0, @@ -62309,7 +62779,7 @@ fn __action1397< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1398< +fn __action1410< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62325,7 +62795,7 @@ fn __action1398< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action871( + __action873( mode, __0, __1, @@ -62336,7 +62806,7 @@ fn __action1398< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1399< +fn __action1411< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62350,7 +62820,7 @@ fn __action1399< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action872( + __action874( mode, __0, __temp0, @@ -62359,7 +62829,7 @@ fn __action1399< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1400< +fn __action1412< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62378,7 +62848,7 @@ fn __action1400< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action873( + __action875( mode, __0, __1, @@ -62392,7 +62862,7 @@ fn __action1400< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1401< +fn __action1413< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62410,7 +62880,7 @@ fn __action1401< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action874( + __action876( mode, __0, __1, @@ -62423,7 +62893,7 @@ fn __action1401< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1402< +fn __action1414< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62431,62 +62901,6 @@ fn __action1402< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), ) -> ast::PatternArguments -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action875( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1403< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> ast::PatternArguments -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action876( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1404< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> ast::PatternArguments { let __start0 = __3.2; let __end0 = __3.2; @@ -62508,11 +62922,11 @@ fn __action1404< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1405< +fn __action1415< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), + __1: (TextSize, Vec, TextSize), __2: (TextSize, token::Tok, TextSize), ) -> ast::PatternArguments { @@ -62535,15 +62949,17 @@ fn __action1405< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1406< +fn __action1416< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, token::Tok, TextSize), ) -> ast::PatternArguments { - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __3.2; + let __end0 = __3.2; let __temp0 = __action392( mode, &__start0, @@ -62554,21 +62970,24 @@ fn __action1406< mode, __0, __1, + __2, + __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1407< +fn __action1417< >( mode: Mode, - __0: (TextSize, ast::Pattern, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> ast::Pattern + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::PatternArguments { - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, @@ -62579,18 +62998,19 @@ fn __action1407< mode, __0, __1, + __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1408< +fn __action1418< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> ast::Pattern +) -> ast::PatternArguments { let __start0 = __1.2; let __end0 = __1.2; @@ -62610,7 +63030,57 @@ fn __action1408< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1409< +fn __action1419< +>( + mode: Mode, + __0: (TextSize, ast::Pattern, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::Pattern +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action882( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1420< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::Pattern +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action883( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1421< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -62624,59 +63094,32 @@ fn __action1409< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action882( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1410< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action883( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1411< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); __action884( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1422< +>( + mode: Mode, + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action885( mode, __0, __1, @@ -62687,7 +63130,34 @@ fn __action1411< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1412< +fn __action1423< +>( + mode: Mode, + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action886( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1424< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62701,7 +63171,7 @@ fn __action1412< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action885( + __action887( mode, __0, __temp0, @@ -62710,13 +63180,13 @@ fn __action1412< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1413< +fn __action1425< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __3.2; @@ -62727,7 +63197,7 @@ fn __action1413< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1116( + __action1114( mode, __0, __1, @@ -62739,11 +63209,11 @@ fn __action1413< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1414< +fn __action1426< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __1.2; @@ -62754,7 +63224,7 @@ fn __action1414< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1117( + __action1115( mode, __0, __1, @@ -62764,7 +63234,7 @@ fn __action1414< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1415< +fn __action1427< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62780,7 +63250,7 @@ fn __action1415< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action887( + __action889( mode, __0, __1, @@ -62791,7 +63261,7 @@ fn __action1415< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1416< +fn __action1428< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62806,7 +63276,7 @@ fn __action1416< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action888( + __action890( mode, __0, __1, @@ -62816,7 +63286,7 @@ fn __action1416< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1417< +fn __action1429< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -62824,66 +63294,6 @@ fn __action1417< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, token::Tok, TextSize), ) -> ast::Pattern -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action889( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1418< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), - __2: (TextSize, ast::Pattern, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, token::Tok, TextSize), -) -> ast::Pattern -{ - let __start0 = __4.2; - let __end0 = __4.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action890( - mode, - __0, - __1, - __2, - __3, - __4, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1419< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), - __2: (TextSize, ast::Pattern, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> ast::Pattern { let __start0 = __3.2; let __end0 = __3.2; @@ -62905,16 +63315,18 @@ fn __action1419< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1420< +fn __action1430< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, ast::Pattern, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, token::Tok, TextSize), ) -> ast::Pattern { - let __start0 = __2.2; - let __end0 = __2.2; + let __start0 = __4.2; + let __end0 = __4.2; let __temp0 = __action392( mode, &__start0, @@ -62926,22 +63338,25 @@ fn __action1420< __0, __1, __2, + __3, + __4, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1421< +fn __action1431< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), + __2: (TextSize, ast::Pattern, TextSize), + __3: (TextSize, token::Tok, TextSize), +) -> ast::Pattern { - let __start0 = __2.2; - let __end0 = __2.2; + let __start0 = __3.2; + let __end0 = __3.2; let __temp0 = __action392( mode, &__start0, @@ -62953,19 +63368,20 @@ fn __action1421< __0, __1, __2, + __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1422< +fn __action1432< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::Pattern { let __start0 = __2.2; let __end0 = __2.2; @@ -62986,15 +63402,69 @@ fn __action1422< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1423< +fn __action1433< +>( + mode: Mode, + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, ast::Operator, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action895( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1434< +>( + mode: Mode, + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, ast::Operator, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action896( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1435< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), ) -> ast::Comprehension { let __start0 = __5.2; @@ -63005,7 +63475,7 @@ fn __action1423< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action895( + __action897( mode, __0, __1, @@ -63019,14 +63489,14 @@ fn __action1423< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1424< +fn __action1436< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), ) -> ast::Comprehension { let __start0 = __4.2; @@ -63037,7 +63507,7 @@ fn __action1424< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action896( + __action898( mode, __0, __1, @@ -63050,12 +63520,12 @@ fn __action1424< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1425< +fn __action1437< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -63065,7 +63535,7 @@ fn __action1425< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action898( + __action900( mode, __0, __1, @@ -63075,7 +63545,7 @@ fn __action1425< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1426< +fn __action1438< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63090,7 +63560,7 @@ fn __action1426< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action899( + __action901( mode, __0, __1, @@ -63100,12 +63570,12 @@ fn __action1426< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1427< +fn __action1439< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Parameter { let __start0 = __2.2; @@ -63116,7 +63586,7 @@ fn __action1427< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1081( + __action1079( mode, __0, __1, @@ -63127,7 +63597,7 @@ fn __action1427< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1428< +fn __action1440< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -63141,7 +63611,7 @@ fn __action1428< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1082( + __action1080( mode, __0, __temp0, @@ -63150,63 +63620,11 @@ fn __action1428< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1429< +fn __action1441< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), ) -> ast::Parameter -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action901( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1430< ->( - mode: Mode, - __0: (TextSize, core::option::Option, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, core::option::Option>, TextSize), -) -> ast::Expr -{ - let __start0 = __3.2; - let __end0 = __3.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action902( - mode, - __0, - __1, - __2, - __3, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1431< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), -) -> ast::Expr { let __start0 = __0.2; let __end0 = __0.2; @@ -63225,15 +63643,17 @@ fn __action1431< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1432< +fn __action1442< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, core::option::Option, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, core::option::Option>, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __1.2; - let __end0 = __1.2; + let __start0 = __3.2; + let __end0 = __3.2; let __temp0 = __action392( mode, &__start0, @@ -63244,18 +63664,20 @@ fn __action1432< mode, __0, __1, + __2, + __3, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1433< +fn __action1443< >( mode: Mode, - __0: (TextSize, Vec, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __1.2; let __end0 = __1.2; @@ -63275,14 +63697,15 @@ fn __action1433< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1434< +fn __action1444< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> ast::Expr + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __0.2; - let __end0 = __0.2; + let __start0 = __1.2; + let __end0 = __1.2; let __temp0 = __action392( mode, &__start0, @@ -63292,22 +63715,21 @@ fn __action1434< __action906( mode, __0, + __1, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1435< +fn __action1445< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, Vec, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __2.2; - let __end0 = __2.2; + let __start0 = __0.2; + let __end0 = __0.2; let __temp0 = __action392( mode, &__start0, @@ -63317,21 +63739,19 @@ fn __action1435< __action907( mode, __0, - __1, - __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1436< +fn __action1446< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -63352,18 +63772,16 @@ fn __action1436< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1437< +fn __action1447< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, ast::Operator, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __4.2; - let __end0 = __4.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, @@ -63375,23 +63793,21 @@ fn __action1437< __0, __1, __2, - __3, - __4, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1438< +fn __action1448< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __4: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __4.2; let __end0 = __4.2; @@ -63414,7 +63830,38 @@ fn __action1438< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1439< +fn __action1449< +>( + mode: Mode, + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __4.2; + let __end0 = __4.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action911( + mode, + __0, + __1, + __2, + __3, + __4, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1450< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63429,7 +63876,7 @@ fn __action1439< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action911( + __action912( mode, __0, __1, @@ -63439,11 +63886,11 @@ fn __action1439< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1440< +fn __action1451< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Mod { let __start0 = __1.2; @@ -63454,7 +63901,7 @@ fn __action1440< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1087( + __action1085( mode, __0, __1, @@ -63464,11 +63911,11 @@ fn __action1440< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1441< +fn __action1452< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, alloc::vec::Vec, TextSize), ) -> ast::Mod { @@ -63480,7 +63927,7 @@ fn __action1441< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1088( + __action1086( mode, __0, __1, @@ -63491,7 +63938,7 @@ fn __action1441< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1442< +fn __action1453< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63514,6 +63961,79 @@ fn __action1442< &__end0, ); let __temp0 = (__start0, __temp0, __end0); + __action1105( + mode, + __0, + __1, + __2, + __3, + __4, + __5, + __6, + __7, + __8, + __9, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1454< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Suite, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Suite, TextSize), +) -> ast::Stmt +{ + let __start0 = __6.2; + let __end0 = __6.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1106( + mode, + __0, + __1, + __2, + __3, + __4, + __5, + __6, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1455< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Suite, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Suite, TextSize), +) -> ast::Stmt +{ + let __start0 = __6.2; + let __end0 = __6.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); __action1107( mode, __0, @@ -63523,86 +64043,13 @@ fn __action1442< __4, __5, __6, - __7, - __8, - __9, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1443< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Suite, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Suite, TextSize), -) -> ast::Stmt -{ - let __start0 = __6.2; - let __end0 = __6.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1108( - mode, - __0, - __1, - __2, - __3, - __4, - __5, - __6, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1444< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Suite, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Suite, TextSize), -) -> ast::Stmt -{ - let __start0 = __6.2; - let __end0 = __6.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1109( - mode, - __0, - __1, - __2, - __3, - __4, - __5, - __6, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1445< +fn __action1456< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63619,7 +64066,7 @@ fn __action1445< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1110( + __action1108( mode, __0, __1, @@ -63631,7 +64078,7 @@ fn __action1445< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1446< +fn __action1457< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63654,7 +64101,7 @@ fn __action1446< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1111( + __action1109( mode, __0, __1, @@ -63672,7 +64119,7 @@ fn __action1446< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1447< +fn __action1458< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63692,7 +64139,7 @@ fn __action1447< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1112( + __action1110( mode, __0, __1, @@ -63707,7 +64154,7 @@ fn __action1447< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1448< +fn __action1459< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63727,7 +64174,7 @@ fn __action1448< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1113( + __action1111( mode, __0, __1, @@ -63742,7 +64189,7 @@ fn __action1448< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1449< +fn __action1460< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63759,7 +64206,7 @@ fn __action1449< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1114( + __action1112( mode, __0, __1, @@ -63771,7 +64218,7 @@ fn __action1449< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1450< +fn __action1461< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -63785,7 +64232,7 @@ fn __action1450< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action916( + __action917( mode, __0, __temp0, @@ -63794,14 +64241,14 @@ fn __action1450< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1451< +fn __action1462< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), __2: (TextSize, core::option::Option, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __4.2; @@ -63812,7 +64259,7 @@ fn __action1451< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action917( + __action918( mode, __0, __1, @@ -63825,12 +64272,12 @@ fn __action1451< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1452< +fn __action1463< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::TypeParam { let __start0 = __2.2; @@ -63841,7 +64288,7 @@ fn __action1452< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1076( + __action1074( mode, __0, __1, @@ -63852,7 +64299,7 @@ fn __action1452< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1453< +fn __action1464< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -63866,7 +64313,7 @@ fn __action1453< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1077( + __action1075( mode, __0, __temp0, @@ -63875,32 +64322,7 @@ fn __action1453< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1454< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Identifier, TextSize), -) -> ast::TypeParam -{ - let __start0 = __1.2; - let __end0 = __1.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action919( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1455< +fn __action1465< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63925,7 +64347,32 @@ fn __action1455< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1456< +fn __action1466< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::Identifier, TextSize), +) -> ast::TypeParam +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action921( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1467< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63942,7 +64389,7 @@ fn __action1456< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action921( + __action922( mode, __0, __1, @@ -63954,7 +64401,7 @@ fn __action1456< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1457< +fn __action1468< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -63970,7 +64417,7 @@ fn __action1457< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action922( + __action923( mode, __0, __1, @@ -63981,12 +64428,12 @@ fn __action1457< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1458< +fn __action1469< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::ParameterWithDefault { let __start0 = __2.2; @@ -63997,7 +64444,7 @@ fn __action1458< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1078( + __action1076( mode, __0, __1, @@ -64008,7 +64455,7 @@ fn __action1458< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1459< +fn __action1470< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -64022,7 +64469,7 @@ fn __action1459< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1079( + __action1077( mode, __0, __temp0, @@ -64031,34 +64478,11 @@ fn __action1459< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1460< +fn __action1471< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), ) -> ast::ParameterWithDefault -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action924( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1461< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), -) -> ast::Pattern { let __start0 = __0.2; let __end0 = __0.2; @@ -64077,11 +64501,11 @@ fn __action1461< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1462< +fn __action1472< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), -) -> ast::WithItem +) -> ast::Pattern { let __start0 = __0.2; let __end0 = __0.2; @@ -64091,7 +64515,7 @@ fn __action1462< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action927( + __action926( mode, __0, __temp0, @@ -64100,35 +64524,12 @@ fn __action1462< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1463< +fn __action1473< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), -) -> ast::WithItem -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action928( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1464< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::WithItem { let __start0 = __2.2; @@ -64139,7 +64540,7 @@ fn __action1464< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action929( + __action928( mode, __0, __1, @@ -64150,36 +64551,40 @@ fn __action1464< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1465< +fn __action1474< >( mode: Mode, - __0: (TextSize, Vec, TextSize), -) -> Vec + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { - let __start0 = __0.2; - let __end0 = __0.2; + let __start0 = __2.2; + let __end0 = __2.2; let __temp0 = __action392( mode, &__start0, &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action930( + __action931( mode, __0, + __1, + __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1466< +fn __action1475< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -64189,24 +64594,49 @@ fn __action1466< &__end0, ); let __temp0 = (__start0, __temp0, __end0); + __action932( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1476< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, core::option::Option, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.2; + let __end0 = __1.2; + let __temp0 = __action392( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); __action933( mode, __0, __1, - __2, __temp0, ) } #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1467< +fn __action1477< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __2.2; let __end0 = __2.2; @@ -64225,399 +64655,9 @@ fn __action1467< ) } -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1468< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, core::option::Option, TextSize), -) -> ast::Expr -{ - let __start0 = __1.2; - let __end0 = __1.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action935( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1469< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action392( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action936( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1470< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action1465( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action301( - mode, - __temp0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1471< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action1465( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action641( - mode, - __0, - __temp0, - __2, - __3, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1472< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action1465( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action642( - mode, - __0, - __temp0, - __2, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1473< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> core::option::Option> -{ - let __start0 = __0.0; - let __end0 = __1.2; - let __temp0 = __action1470( - mode, - __0, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action299( - mode, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1474< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::WithItem, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1473( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1062( - mode, - __0, - __temp0, - __3, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1475< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::WithItem, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action300( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1062( - mode, - __0, - __temp0, - __1, - __2, - __3, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1476< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::WithItem, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1473( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1063( - mode, - __0, - __temp0, - __3, - __4, - __5, - __6, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1477< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::WithItem, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action300( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1063( - mode, - __0, - __temp0, - __1, - __2, - __3, - __4, - ) -} - #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1478< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::WithItem, TextSize), - __4: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1473( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1064( - mode, - __0, - __temp0, - __3, - __4, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1479< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::WithItem, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action300( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1064( - mode, - __0, - __temp0, - __1, - __2, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1480< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::WithItem, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), - __5: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action1473( - mode, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1065( - mode, - __0, - __temp0, - __3, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1481< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::WithItem, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), - __3: (TextSize, token::Tok, TextSize), -) -> Vec -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action300( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1065( - mode, - __0, - __temp0, - __1, - __2, - __3, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1482< >( mode: Mode, __0: (TextSize, (String, StringKind, bool), TextSize), @@ -64625,7 +64665,7 @@ fn __action1482< { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action1176( + let __temp0 = __action1186( mode, __0, ); @@ -64638,7 +64678,7 @@ fn __action1482< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1483< +fn __action1479< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), @@ -64647,7 +64687,7 @@ fn __action1483< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1176( + let __temp0 = __action1186( mode, __1, ); @@ -64661,12 +64701,12 @@ fn __action1483< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1484< +fn __action1480< >( mode: Mode, __0: (TextSize, ast::CmpOp, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec<(ast::CmpOp, ast::Expr)> + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)> { let __start0 = __0.0; let __end0 = __1.2; @@ -64684,13 +64724,13 @@ fn __action1484< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1485< +fn __action1481< >( mode: Mode, - __0: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::Expr)>, TextSize), + __0: (TextSize, alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)>, TextSize), __1: (TextSize, ast::CmpOp, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> alloc::vec::Vec<(ast::CmpOp, ast::Expr)> + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> alloc::vec::Vec<(ast::CmpOp, ast::ParenthesizedExpr)> { let __start0 = __1.0; let __end0 = __2.2; @@ -64709,7 +64749,7 @@ fn __action1485< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1486< +fn __action1482< >( mode: Mode, __0: (TextSize, ast::Expr, TextSize), @@ -64730,7 +64770,7 @@ fn __action1486< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1487< +fn __action1483< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -64742,12 +64782,12 @@ fn __action1487< { let __start0 = __2.0; let __end0 = __2.2; - let __temp0 = __action1486( + let __temp0 = __action1482( mode, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action826( + __action828( mode, __0, __1, @@ -64759,7 +64799,7 @@ fn __action1487< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1488< +fn __action1484< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -64776,7 +64816,7 @@ fn __action1488< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action826( + __action828( mode, __0, __1, @@ -64788,7 +64828,7 @@ fn __action1488< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1489< +fn __action1485< >( mode: Mode, __0: (TextSize, ast::Parameters, TextSize), @@ -64809,7 +64849,7 @@ fn __action1489< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1490< +fn __action1486< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -64819,12 +64859,12 @@ fn __action1490< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1489( + let __temp0 = __action1485( mode, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1398( + __action1410( mode, __0, __temp0, @@ -64834,7 +64874,7 @@ fn __action1490< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1491< +fn __action1487< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -64849,7 +64889,7 @@ fn __action1491< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1398( + __action1410( mode, __0, __temp0, @@ -64859,7 +64899,7 @@ fn __action1491< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1492< +fn __action1488< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -64878,7 +64918,7 @@ fn __action1492< __4, ); let __temp0 = (__start0, __temp0, __end0); - __action755( + __action757( mode, __0, __1, @@ -64892,7 +64932,7 @@ fn __action1492< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1493< +fn __action1489< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -64911,7 +64951,7 @@ fn __action1493< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action755( + __action757( mode, __0, __1, @@ -64925,10 +64965,10 @@ fn __action1493< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1494< +fn __action1490< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __0.2; @@ -64939,7 +64979,7 @@ fn __action1494< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1259( + __action1271( mode, __0, __temp0, @@ -64948,11 +64988,11 @@ fn __action1494< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1495< +fn __action1491< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), ) -> ast::Stmt { let __start0 = __1.0; @@ -64962,7 +65002,7 @@ fn __action1495< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1259( + __action1271( mode, __0, __temp0, @@ -64971,13 +65011,13 @@ fn __action1495< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1496< +fn __action1492< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __3.0; @@ -64987,7 +65027,7 @@ fn __action1496< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1261( + __action1273( mode, __0, __1, @@ -64998,12 +65038,12 @@ fn __action1496< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1497< +fn __action1493< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __2.2; @@ -65014,7 +65054,7 @@ fn __action1497< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1261( + __action1273( mode, __0, __1, @@ -65025,7 +65065,7 @@ fn __action1497< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1498< +fn __action1494< >( mode: Mode, __0: (TextSize, (Option<(TextSize, TextSize, Option)>, ast::Expr), TextSize), @@ -65038,7 +65078,7 @@ fn __action1498< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1131( + __action1129( mode, __temp0, ) @@ -65046,7 +65086,7 @@ fn __action1498< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1499< +fn __action1495< >( mode: Mode, __lookbehind: &TextSize, @@ -65061,7 +65101,7 @@ fn __action1499< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1131( + __action1129( mode, __temp0, ) @@ -65069,7 +65109,7 @@ fn __action1499< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1500< +fn __action1496< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), @@ -65083,7 +65123,7 @@ fn __action1500< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1132( + __action1130( mode, __0, __temp0, @@ -65092,7 +65132,7 @@ fn __action1500< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1501< +fn __action1497< >( mode: Mode, __0: (TextSize, alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), @@ -65106,7 +65146,7 @@ fn __action1501< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1132( + __action1130( mode, __0, __temp0, @@ -65115,7 +65155,7 @@ fn __action1501< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1502< +fn __action1498< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65125,12 +65165,12 @@ fn __action1502< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1498( + let __temp0 = __action1494( mode, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1182( + __action1192( mode, __0, __temp0, @@ -65140,7 +65180,7 @@ fn __action1502< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1503< +fn __action1499< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65149,13 +65189,13 @@ fn __action1503< { let __start0 = __0.2; let __end0 = __1.0; - let __temp0 = __action1499( + let __temp0 = __action1495( mode, &__start0, &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1182( + __action1192( mode, __0, __temp0, @@ -65165,7 +65205,7 @@ fn __action1503< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1504< +fn __action1500< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65176,13 +65216,13 @@ fn __action1504< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1500( + let __temp0 = __action1496( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1182( + __action1192( mode, __0, __temp0, @@ -65192,7 +65232,7 @@ fn __action1504< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1505< +fn __action1501< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65202,12 +65242,12 @@ fn __action1505< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1501( + let __temp0 = __action1497( mode, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1182( + __action1192( mode, __0, __temp0, @@ -65217,7 +65257,7 @@ fn __action1505< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1506< +fn __action1502< >( mode: Mode, __0: (TextSize, ast::Pattern, TextSize), @@ -65230,7 +65270,7 @@ fn __action1506< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1154( + __action1152( mode, __temp0, ) @@ -65238,7 +65278,7 @@ fn __action1506< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1507< +fn __action1503< >( mode: Mode, __lookbehind: &TextSize, @@ -65253,7 +65293,7 @@ fn __action1507< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1154( + __action1152( mode, __temp0, ) @@ -65261,7 +65301,7 @@ fn __action1507< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1508< +fn __action1504< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -65275,7 +65315,7 @@ fn __action1508< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1155( + __action1153( mode, __0, __temp0, @@ -65284,7 +65324,7 @@ fn __action1508< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1509< +fn __action1505< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -65298,7 +65338,7 @@ fn __action1509< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1155( + __action1153( mode, __0, __temp0, @@ -65307,7 +65347,7 @@ fn __action1509< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1510< +fn __action1506< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65317,12 +65357,12 @@ fn __action1510< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1506( + let __temp0 = __action1502( mode, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1420( + __action1432( mode, __0, __temp0, @@ -65332,7 +65372,7 @@ fn __action1510< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1511< +fn __action1507< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65341,13 +65381,13 @@ fn __action1511< { let __start0 = __0.2; let __end0 = __1.0; - let __temp0 = __action1507( + let __temp0 = __action1503( mode, &__start0, &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1420( + __action1432( mode, __0, __temp0, @@ -65357,7 +65397,7 @@ fn __action1511< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1512< +fn __action1508< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65368,13 +65408,13 @@ fn __action1512< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1508( + let __temp0 = __action1504( mode, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1420( + __action1432( mode, __0, __temp0, @@ -65384,7 +65424,7 @@ fn __action1512< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1513< +fn __action1509< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65394,12 +65434,12 @@ fn __action1513< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1509( + let __temp0 = __action1505( mode, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1420( + __action1432( mode, __0, __temp0, @@ -65409,10 +65449,10 @@ fn __action1513< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1514< +fn __action1510< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, Vec, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { @@ -65423,7 +65463,7 @@ fn __action1514< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1268( + __action1280( mode, __0, __temp0, @@ -65432,10 +65472,10 @@ fn __action1514< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1515< +fn __action1511< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) { let __start0 = __0.2; @@ -65446,7 +65486,7 @@ fn __action1515< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1268( + __action1280( mode, __0, __temp0, @@ -65455,14 +65495,14 @@ fn __action1515< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1516< +fn __action1512< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Comprehension { let __start0 = __4.2; @@ -65473,7 +65513,7 @@ fn __action1516< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1423( + __action1435( mode, __0, __1, @@ -65486,15 +65526,15 @@ fn __action1516< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1517< +fn __action1513< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), - __5: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), + __5: (TextSize, alloc::vec::Vec, TextSize), ) -> ast::Comprehension { let __start0 = __5.0; @@ -65504,7 +65544,7 @@ fn __action1517< __5, ); let __temp0 = (__start0, __temp0, __end0); - __action1423( + __action1435( mode, __0, __1, @@ -65517,13 +65557,13 @@ fn __action1517< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1518< +fn __action1514< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Comprehension { let __start0 = __3.2; @@ -65534,7 +65574,7 @@ fn __action1518< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1424( + __action1436( mode, __0, __1, @@ -65546,14 +65586,14 @@ fn __action1518< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1519< +fn __action1515< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), - __4: (TextSize, alloc::vec::Vec, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), + __4: (TextSize, alloc::vec::Vec, TextSize), ) -> ast::Comprehension { let __start0 = __4.0; @@ -65563,7 +65603,7 @@ fn __action1519< __4, ); let __temp0 = (__start0, __temp0, __end0); - __action1424( + __action1436( mode, __0, __1, @@ -65575,7 +65615,7 @@ fn __action1519< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1520< +fn __action1516< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65594,7 +65634,7 @@ fn __action1520< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1492( + __action1488( mode, __temp0, __0, @@ -65608,7 +65648,7 @@ fn __action1520< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1521< +fn __action1517< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -65627,7 +65667,7 @@ fn __action1521< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1492( + __action1488( mode, __temp0, __1, @@ -65641,7 +65681,7 @@ fn __action1521< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1522< +fn __action1518< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65659,7 +65699,7 @@ fn __action1522< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1493( + __action1489( mode, __temp0, __0, @@ -65672,7 +65712,7 @@ fn __action1522< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1523< +fn __action1519< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -65690,7 +65730,7 @@ fn __action1523< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1493( + __action1489( mode, __temp0, __1, @@ -65703,7 +65743,7 @@ fn __action1523< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1524< +fn __action1520< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65712,7 +65752,7 @@ fn __action1524< __3: (TextSize, core::option::Option, TextSize), __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Expr, TextSize), + __6: (TextSize, ast::ParenthesizedExpr, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -65725,7 +65765,7 @@ fn __action1524< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1067( + __action1065( mode, __temp0, __0, @@ -65742,7 +65782,7 @@ fn __action1524< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1525< +fn __action1521< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -65752,7 +65792,7 @@ fn __action1525< __4: (TextSize, core::option::Option, TextSize), __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, ast::Expr, TextSize), + __7: (TextSize, ast::ParenthesizedExpr, TextSize), __8: (TextSize, token::Tok, TextSize), __9: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -65764,7 +65804,7 @@ fn __action1525< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1067( + __action1065( mode, __temp0, __1, @@ -65781,7 +65821,7 @@ fn __action1525< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1526< +fn __action1522< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65801,7 +65841,7 @@ fn __action1526< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1068( + __action1066( mode, __temp0, __0, @@ -65816,7 +65856,7 @@ fn __action1526< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1527< +fn __action1523< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -65836,7 +65876,7 @@ fn __action1527< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1068( + __action1066( mode, __temp0, __1, @@ -65851,7 +65891,7 @@ fn __action1527< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1528< +fn __action1524< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65859,7 +65899,7 @@ fn __action1528< __2: (TextSize, core::option::Option, TextSize), __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Expr, TextSize), + __5: (TextSize, ast::ParenthesizedExpr, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -65872,7 +65912,7 @@ fn __action1528< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1069( + __action1067( mode, __temp0, __0, @@ -65888,7 +65928,7 @@ fn __action1528< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1529< +fn __action1525< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -65897,7 +65937,7 @@ fn __action1529< __3: (TextSize, core::option::Option, TextSize), __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Expr, TextSize), + __6: (TextSize, ast::ParenthesizedExpr, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -65909,7 +65949,7 @@ fn __action1529< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1069( + __action1067( mode, __temp0, __1, @@ -65925,7 +65965,7 @@ fn __action1529< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1530< +fn __action1526< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -65944,7 +65984,7 @@ fn __action1530< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1070( + __action1068( mode, __temp0, __0, @@ -65958,7 +65998,7 @@ fn __action1530< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1531< +fn __action1527< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -65977,7 +66017,7 @@ fn __action1531< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1070( + __action1068( mode, __temp0, __1, @@ -65989,109 +66029,109 @@ fn __action1531< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1528< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec<(Option>, ast::ParenthesizedExpr)>, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action541( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1216( + mode, + __0, + __temp0, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1529< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action542( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1216( + mode, + __0, + __temp0, + __1, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1530< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec<(Option>, ast::ParenthesizedExpr)>, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action541( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1240( + mode, + __0, + __temp0, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1531< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action542( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1240( + mode, + __0, + __temp0, + __1, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1532< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec<(Option>, ast::Expr)>, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action541( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1205( - mode, - __0, - __temp0, - __2, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1533< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action542( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1205( - mode, - __0, - __temp0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1534< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec<(Option>, ast::Expr)>, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action541( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1228( - mode, - __0, - __temp0, - __2, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1535< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action542( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1228( - mode, - __0, - __temp0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1536< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -66114,7 +66154,7 @@ fn __action1536< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1537< +fn __action1533< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -66135,6 +66175,106 @@ fn __action1537< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1534< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Identifier, TextSize), +) -> Vec +{ + let __start0 = __0.0; + let __end0 = __2.2; + let __temp0 = __action1290( + mode, + __0, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action369( + mode, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1535< +>( + mode: Mode, + __0: (TextSize, ast::Identifier, TextSize), +) -> Vec +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action1291( + mode, + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action369( + mode, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1536< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Identifier, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, ast::Identifier, TextSize), +) -> Vec +{ + let __start0 = __2.0; + let __end0 = __4.2; + let __temp0 = __action1290( + mode, + __2, + __3, + __4, + ); + let __temp0 = (__start0, __temp0, __end0); + __action370( + mode, + __0, + __1, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1537< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Identifier, TextSize), +) -> Vec +{ + let __start0 = __2.0; + let __end0 = __2.2; + let __temp0 = __action1291( + mode, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action370( + mode, + __0, + __1, + __temp0, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1538< @@ -66147,14 +66287,14 @@ fn __action1538< { let __start0 = __0.0; let __end0 = __2.2; - let __temp0 = __action1278( + let __temp0 = __action1292( mode, __0, __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action369( + __action362( mode, __temp0, ) @@ -66170,12 +66310,12 @@ fn __action1539< { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action1279( + let __temp0 = __action1293( mode, __0, ); let __temp0 = (__start0, __temp0, __end0); - __action369( + __action362( mode, __temp0, ) @@ -66195,14 +66335,14 @@ fn __action1540< { let __start0 = __2.0; let __end0 = __4.2; - let __temp0 = __action1278( + let __temp0 = __action1292( mode, __2, __3, __4, ); let __temp0 = (__start0, __temp0, __end0); - __action370( + __action363( mode, __0, __1, @@ -66222,12 +66362,12 @@ fn __action1541< { let __start0 = __2.0; let __end0 = __2.2; - let __temp0 = __action1279( + let __temp0 = __action1293( mode, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action370( + __action363( mode, __0, __1, @@ -66238,106 +66378,6 @@ fn __action1541< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1542< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Identifier, TextSize), -) -> Vec -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action1280( - mode, - __0, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action362( - mode, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1543< ->( - mode: Mode, - __0: (TextSize, ast::Identifier, TextSize), -) -> Vec -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action1281( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action362( - mode, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1544< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Identifier, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Identifier, TextSize), -) -> Vec -{ - let __start0 = __2.0; - let __end0 = __4.2; - let __temp0 = __action1280( - mode, - __2, - __3, - __4, - ); - let __temp0 = (__start0, __temp0, __end0); - __action363( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1545< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Identifier, TextSize), -) -> Vec -{ - let __start0 = __2.0; - let __end0 = __2.2; - let __temp0 = __action1281( - mode, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action363( - mode, - __0, - __1, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1546< >( mode: Mode, __0: (TextSize, ast::Identifier, TextSize), @@ -66360,7 +66400,7 @@ fn __action1546< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1547< +fn __action1543< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -66381,109 +66421,109 @@ fn __action1547< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1544< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action549( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1200( + mode, + __0, + __temp0, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1545< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action550( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1200( + mode, + __0, + __temp0, + __1, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1546< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, Vec, TextSize), + __2: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action549( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1226( + mode, + __0, + __temp0, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1547< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action550( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1226( + mode, + __0, + __temp0, + __1, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1548< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action549( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1190( - mode, - __0, - __temp0, - __2, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1549< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action550( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1190( - mode, - __0, - __temp0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1550< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Vec, TextSize), - __2: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action549( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1215( - mode, - __0, - __temp0, - __2, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1551< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action550( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1215( - mode, - __0, - __temp0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1552< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66502,7 +66542,7 @@ fn __action1552< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1322( + __action1334( mode, __temp0, __1, @@ -66516,7 +66556,7 @@ fn __action1552< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1553< +fn __action1549< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66539,7 +66579,7 @@ fn __action1553< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1322( + __action1334( mode, __temp0, __3, @@ -66553,7 +66593,7 @@ fn __action1553< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1554< +fn __action1550< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66578,7 +66618,7 @@ fn __action1554< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1322( + __action1334( mode, __temp0, __4, @@ -66592,7 +66632,7 @@ fn __action1554< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1555< +fn __action1551< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66610,7 +66650,7 @@ fn __action1555< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1323( + __action1335( mode, __temp0, __1, @@ -66623,7 +66663,7 @@ fn __action1555< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1556< +fn __action1552< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66645,7 +66685,7 @@ fn __action1556< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1323( + __action1335( mode, __temp0, __3, @@ -66658,7 +66698,7 @@ fn __action1556< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1557< +fn __action1553< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66682,7 +66722,7 @@ fn __action1557< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1323( + __action1335( mode, __temp0, __4, @@ -66695,7 +66735,7 @@ fn __action1557< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1558< +fn __action1554< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66715,7 +66755,7 @@ fn __action1558< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1324( + __action1336( mode, __temp0, __1, @@ -66730,7 +66770,7 @@ fn __action1558< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1559< +fn __action1555< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66754,7 +66794,7 @@ fn __action1559< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1324( + __action1336( mode, __temp0, __3, @@ -66767,159 +66807,159 @@ fn __action1559< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1556< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), + __8: (TextSize, token::Tok, TextSize), + __9: (TextSize, Option>, TextSize), + __10: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action674( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1336( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + __9, + __10, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1557< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, Option>, TextSize), + __6: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action422( + mode, + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1337( + mode, + __temp0, + __1, + __2, + __3, + __4, + __5, + __6, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1558< +>( + mode: Mode, + __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), + __6: (TextSize, token::Tok, TextSize), + __7: (TextSize, Option>, TextSize), + __8: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __2.2; + let __temp0 = __action673( + mode, + __0, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1337( + mode, + __temp0, + __3, + __4, + __5, + __6, + __7, + __8, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1559< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), + __7: (TextSize, token::Tok, TextSize), + __8: (TextSize, Option>, TextSize), + __9: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action674( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1337( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + __9, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1560< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Parameter, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), - __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, Option>, TextSize), - __10: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action674( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1324( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - __9, - __10, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1561< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), - __6: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action422( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1325( - mode, - __temp0, - __1, - __2, - __3, - __4, - __5, - __6, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1562< ->( - mode: Mode, - __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), - __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), - __8: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action673( - mode, - __0, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1325( - mode, - __temp0, - __3, - __4, - __5, - __6, - __7, - __8, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1563< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), - __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), - __9: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action674( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1325( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - __9, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1564< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66936,7 +66976,7 @@ fn __action1564< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1326( + __action1338( mode, __temp0, __1, @@ -66948,7 +66988,7 @@ fn __action1564< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1565< +fn __action1561< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -66969,7 +67009,7 @@ fn __action1565< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1326( + __action1338( mode, __temp0, __3, @@ -66981,7 +67021,7 @@ fn __action1565< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1566< +fn __action1562< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67004,7 +67044,7 @@ fn __action1566< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1326( + __action1338( mode, __temp0, __4, @@ -67016,7 +67056,7 @@ fn __action1566< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1567< +fn __action1563< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67032,7 +67072,7 @@ fn __action1567< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1327( + __action1339( mode, __temp0, __1, @@ -67043,7 +67083,7 @@ fn __action1567< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1568< +fn __action1564< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67063,7 +67103,7 @@ fn __action1568< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1327( + __action1339( mode, __temp0, __3, @@ -67074,7 +67114,7 @@ fn __action1568< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1569< +fn __action1565< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67096,7 +67136,7 @@ fn __action1569< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1327( + __action1339( mode, __temp0, __4, @@ -67107,7 +67147,7 @@ fn __action1569< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1570< +fn __action1566< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67125,7 +67165,7 @@ fn __action1570< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1328( + __action1340( mode, __temp0, __1, @@ -67138,7 +67178,7 @@ fn __action1570< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1571< +fn __action1567< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67160,7 +67200,7 @@ fn __action1571< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1328( + __action1340( mode, __temp0, __3, @@ -67173,7 +67213,7 @@ fn __action1571< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1572< +fn __action1568< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67197,7 +67237,7 @@ fn __action1572< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1328( + __action1340( mode, __temp0, __4, @@ -67210,7 +67250,7 @@ fn __action1572< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1573< +fn __action1569< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67227,7 +67267,7 @@ fn __action1573< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1329( + __action1341( mode, __temp0, __1, @@ -67239,7 +67279,7 @@ fn __action1573< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1574< +fn __action1570< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67260,7 +67300,7 @@ fn __action1574< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1329( + __action1341( mode, __temp0, __3, @@ -67272,7 +67312,7 @@ fn __action1574< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1575< +fn __action1571< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67295,7 +67335,7 @@ fn __action1575< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1329( + __action1341( mode, __temp0, __4, @@ -67307,7 +67347,7 @@ fn __action1575< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1576< +fn __action1572< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67321,7 +67361,7 @@ fn __action1576< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1330( + __action1342( mode, __temp0, __1, @@ -67330,7 +67370,7 @@ fn __action1576< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1577< +fn __action1573< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67348,7 +67388,7 @@ fn __action1577< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1330( + __action1342( mode, __temp0, __3, @@ -67357,7 +67397,7 @@ fn __action1577< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1578< +fn __action1574< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67377,7 +67417,7 @@ fn __action1578< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1330( + __action1342( mode, __temp0, __4, @@ -67386,7 +67426,7 @@ fn __action1578< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1579< +fn __action1575< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67404,7 +67444,7 @@ fn __action1579< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1331( + __action1343( mode, __temp0, __1, @@ -67417,7 +67457,7 @@ fn __action1579< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1580< +fn __action1576< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67439,7 +67479,7 @@ fn __action1580< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1331( + __action1343( mode, __temp0, __3, @@ -67452,7 +67492,7 @@ fn __action1580< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1581< +fn __action1577< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67476,7 +67516,7 @@ fn __action1581< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1331( + __action1343( mode, __temp0, __4, @@ -67489,7 +67529,7 @@ fn __action1581< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1582< +fn __action1578< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67506,7 +67546,7 @@ fn __action1582< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1332( + __action1344( mode, __temp0, __1, @@ -67518,7 +67558,7 @@ fn __action1582< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1583< +fn __action1579< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67539,7 +67579,7 @@ fn __action1583< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1332( + __action1344( mode, __temp0, __3, @@ -67551,7 +67591,7 @@ fn __action1583< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1584< +fn __action1580< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67574,7 +67614,7 @@ fn __action1584< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1332( + __action1344( mode, __temp0, __4, @@ -67586,7 +67626,7 @@ fn __action1584< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1585< +fn __action1581< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67605,7 +67645,7 @@ fn __action1585< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1333( + __action1345( mode, __temp0, __1, @@ -67619,7 +67659,7 @@ fn __action1585< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1586< +fn __action1582< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67642,7 +67682,7 @@ fn __action1586< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1333( + __action1345( mode, __temp0, __3, @@ -67654,151 +67694,151 @@ fn __action1586< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1583< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), + __8: (TextSize, token::Tok, TextSize), + __9: (TextSize, Option>, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action674( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1345( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + __9, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1584< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, Option>, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action422( + mode, + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1346( + mode, + __temp0, + __1, + __2, + __3, + __4, + __5, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1585< +>( + mode: Mode, + __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), + __6: (TextSize, token::Tok, TextSize), + __7: (TextSize, Option>, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __2.2; + let __temp0 = __action673( + mode, + __0, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1346( + mode, + __temp0, + __3, + __4, + __5, + __6, + __7, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1586< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), + __7: (TextSize, token::Tok, TextSize), + __8: (TextSize, Option>, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action674( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1346( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1587< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Parameter, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), - __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action674( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1333( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - __9, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1588< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action422( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1334( - mode, - __temp0, - __1, - __2, - __3, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1589< ->( - mode: Mode, - __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), - __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action673( - mode, - __0, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1334( - mode, - __temp0, - __3, - __4, - __5, - __6, - __7, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1590< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), - __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action674( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1334( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1591< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67814,7 +67854,7 @@ fn __action1591< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1335( + __action1347( mode, __temp0, __1, @@ -67825,7 +67865,7 @@ fn __action1591< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1592< +fn __action1588< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67845,7 +67885,7 @@ fn __action1592< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1335( + __action1347( mode, __temp0, __3, @@ -67856,7 +67896,7 @@ fn __action1592< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1593< +fn __action1589< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67878,7 +67918,7 @@ fn __action1593< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1335( + __action1347( mode, __temp0, __4, @@ -67889,7 +67929,7 @@ fn __action1593< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1594< +fn __action1590< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67904,7 +67944,7 @@ fn __action1594< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1336( + __action1348( mode, __temp0, __1, @@ -67914,7 +67954,7 @@ fn __action1594< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1595< +fn __action1591< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67933,7 +67973,7 @@ fn __action1595< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1336( + __action1348( mode, __temp0, __3, @@ -67943,7 +67983,7 @@ fn __action1595< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1596< +fn __action1592< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67964,7 +68004,7 @@ fn __action1596< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1336( + __action1348( mode, __temp0, __4, @@ -67974,7 +68014,7 @@ fn __action1596< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1597< +fn __action1593< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -67991,7 +68031,7 @@ fn __action1597< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1337( + __action1349( mode, __temp0, __1, @@ -68003,7 +68043,7 @@ fn __action1597< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1598< +fn __action1594< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68024,7 +68064,7 @@ fn __action1598< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1337( + __action1349( mode, __temp0, __3, @@ -68036,7 +68076,7 @@ fn __action1598< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1599< +fn __action1595< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68059,7 +68099,7 @@ fn __action1599< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1337( + __action1349( mode, __temp0, __4, @@ -68071,7 +68111,7 @@ fn __action1599< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1600< +fn __action1596< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68087,7 +68127,7 @@ fn __action1600< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1338( + __action1350( mode, __temp0, __1, @@ -68098,7 +68138,7 @@ fn __action1600< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1601< +fn __action1597< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68118,7 +68158,7 @@ fn __action1601< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1338( + __action1350( mode, __temp0, __3, @@ -68129,7 +68169,7 @@ fn __action1601< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1602< +fn __action1598< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68151,7 +68191,7 @@ fn __action1602< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1338( + __action1350( mode, __temp0, __4, @@ -68162,7 +68202,7 @@ fn __action1602< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1603< +fn __action1599< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68175,7 +68215,7 @@ fn __action1603< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1339( + __action1351( mode, __temp0, ) @@ -68183,7 +68223,7 @@ fn __action1603< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1604< +fn __action1600< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68200,7 +68240,7 @@ fn __action1604< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1339( + __action1351( mode, __temp0, ) @@ -68208,7 +68248,7 @@ fn __action1604< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1605< +fn __action1601< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68227,7 +68267,7 @@ fn __action1605< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1339( + __action1351( mode, __temp0, ) @@ -68235,7 +68275,7 @@ fn __action1605< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1606< +fn __action1602< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68251,7 +68291,7 @@ fn __action1606< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1340( + __action1352( mode, __temp0, __1, @@ -68262,7 +68302,7 @@ fn __action1606< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1607< +fn __action1603< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68282,7 +68322,7 @@ fn __action1607< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1340( + __action1352( mode, __temp0, __3, @@ -68293,7 +68333,7 @@ fn __action1607< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1608< +fn __action1604< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68315,7 +68355,7 @@ fn __action1608< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1340( + __action1352( mode, __temp0, __4, @@ -68326,7 +68366,7 @@ fn __action1608< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1609< +fn __action1605< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68341,7 +68381,7 @@ fn __action1609< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1341( + __action1353( mode, __temp0, __1, @@ -68351,7 +68391,7 @@ fn __action1609< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1610< +fn __action1606< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68370,7 +68410,7 @@ fn __action1610< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1341( + __action1353( mode, __temp0, __3, @@ -68380,7 +68420,7 @@ fn __action1610< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1611< +fn __action1607< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68401,7 +68441,7 @@ fn __action1611< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1341( + __action1353( mode, __temp0, __4, @@ -68411,7 +68451,7 @@ fn __action1611< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1612< +fn __action1608< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68430,7 +68470,7 @@ fn __action1612< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1360( + __action1372( mode, __temp0, __1, @@ -68444,7 +68484,7 @@ fn __action1612< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1613< +fn __action1609< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68467,7 +68507,7 @@ fn __action1613< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1360( + __action1372( mode, __temp0, __3, @@ -68479,151 +68519,151 @@ fn __action1613< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1610< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, token::Tok, TextSize), + __8: (TextSize, Option>, TextSize), + __9: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action682( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1372( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + __9, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1611< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, Option>, TextSize), + __5: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action430( + mode, + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1373( + mode, + __temp0, + __1, + __2, + __3, + __4, + __5, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1612< +>( + mode: Mode, + __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), + __7: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __2.2; + let __temp0 = __action681( + mode, + __0, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1373( + mode, + __temp0, + __3, + __4, + __5, + __6, + __7, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1613< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, 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), + __8: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action682( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1373( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1614< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Parameter, TextSize), - __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), - __9: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action682( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1360( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - __9, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1615< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, Option>, TextSize), - __5: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action430( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1361( - mode, - __temp0, - __1, - __2, - __3, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1616< ->( - mode: Mode, - __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), - __7: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action681( - mode, - __0, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1361( - mode, - __temp0, - __3, - __4, - __5, - __6, - __7, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1617< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, 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), - __8: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action682( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1361( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1618< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68643,7 +68683,7 @@ fn __action1618< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1362( + __action1374( mode, __temp0, __1, @@ -68658,7 +68698,7 @@ fn __action1618< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1619< +fn __action1615< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68682,7 +68722,7 @@ fn __action1619< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1362( + __action1374( mode, __temp0, __3, @@ -68695,159 +68735,159 @@ fn __action1619< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1616< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), + __8: (TextSize, token::Tok, TextSize), + __9: (TextSize, Option>, TextSize), + __10: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action682( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1374( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + __9, + __10, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1617< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, Option>, TextSize), + __6: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action430( + mode, + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1375( + mode, + __temp0, + __1, + __2, + __3, + __4, + __5, + __6, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1618< +>( + mode: Mode, + __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), + __6: (TextSize, token::Tok, TextSize), + __7: (TextSize, Option>, TextSize), + __8: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __2.2; + let __temp0 = __action681( + mode, + __0, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1375( + mode, + __temp0, + __3, + __4, + __5, + __6, + __7, + __8, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1619< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), + __7: (TextSize, token::Tok, TextSize), + __8: (TextSize, Option>, TextSize), + __9: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action682( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1375( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + __9, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1620< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Parameter, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), - __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, Option>, TextSize), - __10: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action682( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1362( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - __9, - __10, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1621< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), - __6: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action430( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1363( - mode, - __temp0, - __1, - __2, - __3, - __4, - __5, - __6, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1622< ->( - mode: Mode, - __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), - __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), - __8: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action681( - mode, - __0, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1363( - mode, - __temp0, - __3, - __4, - __5, - __6, - __7, - __8, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1623< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), - __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), - __9: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action682( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1363( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - __9, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1624< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68864,7 +68904,7 @@ fn __action1624< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1364( + __action1376( mode, __temp0, __1, @@ -68876,7 +68916,7 @@ fn __action1624< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1625< +fn __action1621< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68897,7 +68937,7 @@ fn __action1625< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1364( + __action1376( mode, __temp0, __3, @@ -68909,7 +68949,7 @@ fn __action1625< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1626< +fn __action1622< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68932,7 +68972,7 @@ fn __action1626< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1364( + __action1376( mode, __temp0, __4, @@ -68944,7 +68984,7 @@ fn __action1626< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1627< +fn __action1623< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68960,7 +69000,7 @@ fn __action1627< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1365( + __action1377( mode, __temp0, __1, @@ -68971,7 +69011,7 @@ fn __action1627< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1628< +fn __action1624< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -68991,7 +69031,7 @@ fn __action1628< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1365( + __action1377( mode, __temp0, __3, @@ -69002,7 +69042,7 @@ fn __action1628< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1629< +fn __action1625< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69024,7 +69064,7 @@ fn __action1629< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1365( + __action1377( mode, __temp0, __4, @@ -69035,7 +69075,7 @@ fn __action1629< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1630< +fn __action1626< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69053,7 +69093,7 @@ fn __action1630< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1366( + __action1378( mode, __temp0, __1, @@ -69066,7 +69106,7 @@ fn __action1630< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1631< +fn __action1627< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69088,7 +69128,7 @@ fn __action1631< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1366( + __action1378( mode, __temp0, __3, @@ -69101,7 +69141,7 @@ fn __action1631< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1632< +fn __action1628< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69125,7 +69165,7 @@ fn __action1632< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1366( + __action1378( mode, __temp0, __4, @@ -69138,7 +69178,7 @@ fn __action1632< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1633< +fn __action1629< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69155,7 +69195,7 @@ fn __action1633< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1367( + __action1379( mode, __temp0, __1, @@ -69167,7 +69207,7 @@ fn __action1633< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1634< +fn __action1630< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69188,7 +69228,7 @@ fn __action1634< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1367( + __action1379( mode, __temp0, __3, @@ -69200,7 +69240,7 @@ fn __action1634< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1635< +fn __action1631< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69223,7 +69263,7 @@ fn __action1635< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1367( + __action1379( mode, __temp0, __4, @@ -69235,7 +69275,7 @@ fn __action1635< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1636< +fn __action1632< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69249,7 +69289,7 @@ fn __action1636< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1368( + __action1380( mode, __temp0, __1, @@ -69258,7 +69298,7 @@ fn __action1636< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1637< +fn __action1633< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69276,7 +69316,7 @@ fn __action1637< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1368( + __action1380( mode, __temp0, __3, @@ -69285,7 +69325,7 @@ fn __action1637< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1638< +fn __action1634< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69305,7 +69345,7 @@ fn __action1638< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1368( + __action1380( mode, __temp0, __4, @@ -69314,7 +69354,7 @@ fn __action1638< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1639< +fn __action1635< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69332,7 +69372,7 @@ fn __action1639< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1369( + __action1381( mode, __temp0, __1, @@ -69345,7 +69385,7 @@ fn __action1639< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1640< +fn __action1636< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69367,7 +69407,7 @@ fn __action1640< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1369( + __action1381( mode, __temp0, __3, @@ -69380,7 +69420,7 @@ fn __action1640< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1641< +fn __action1637< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69404,7 +69444,7 @@ fn __action1641< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1369( + __action1381( mode, __temp0, __4, @@ -69417,7 +69457,7 @@ fn __action1641< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1642< +fn __action1638< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69434,7 +69474,7 @@ fn __action1642< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1370( + __action1382( mode, __temp0, __1, @@ -69446,7 +69486,7 @@ fn __action1642< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1643< +fn __action1639< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69467,7 +69507,7 @@ fn __action1643< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1370( + __action1382( mode, __temp0, __3, @@ -69479,7 +69519,7 @@ fn __action1643< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1644< +fn __action1640< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69502,7 +69542,7 @@ fn __action1644< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1370( + __action1382( mode, __temp0, __4, @@ -69514,7 +69554,7 @@ fn __action1644< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1645< +fn __action1641< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69533,7 +69573,7 @@ fn __action1645< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1371( + __action1383( mode, __temp0, __1, @@ -69547,7 +69587,7 @@ fn __action1645< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1646< +fn __action1642< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69570,7 +69610,7 @@ fn __action1646< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1371( + __action1383( mode, __temp0, __3, @@ -69582,151 +69622,151 @@ fn __action1646< ) } +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1643< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Parameter, TextSize), + __7: (TextSize, alloc::vec::Vec, TextSize), + __8: (TextSize, token::Tok, TextSize), + __9: (TextSize, Option>, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action682( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1383( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + __9, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1644< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, Option>, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action430( + mode, + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1384( + mode, + __temp0, + __1, + __2, + __3, + __4, + __5, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1645< +>( + mode: Mode, + __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), + __6: (TextSize, token::Tok, TextSize), + __7: (TextSize, Option>, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __2.2; + let __temp0 = __action681( + mode, + __0, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1384( + mode, + __temp0, + __3, + __4, + __5, + __6, + __7, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1646< +>( + mode: Mode, + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, alloc::vec::Vec, TextSize), + __7: (TextSize, token::Tok, TextSize), + __8: (TextSize, Option>, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action682( + mode, + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1384( + mode, + __temp0, + __4, + __5, + __6, + __7, + __8, + ) +} + #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1647< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Parameter, TextSize), - __7: (TextSize, alloc::vec::Vec, TextSize), - __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action682( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1371( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - __9, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1648< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action430( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1372( - mode, - __temp0, - __1, - __2, - __3, - __4, - __5, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1649< ->( - mode: Mode, - __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), - __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action681( - mode, - __0, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1372( - mode, - __temp0, - __3, - __4, - __5, - __6, - __7, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1650< ->( - mode: Mode, - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec, TextSize), - __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action682( - mode, - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1372( - mode, - __temp0, - __4, - __5, - __6, - __7, - __8, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1651< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69742,7 +69782,7 @@ fn __action1651< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1373( + __action1385( mode, __temp0, __1, @@ -69753,7 +69793,7 @@ fn __action1651< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1652< +fn __action1648< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69773,7 +69813,7 @@ fn __action1652< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1373( + __action1385( mode, __temp0, __3, @@ -69784,7 +69824,7 @@ fn __action1652< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1653< +fn __action1649< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69806,7 +69846,7 @@ fn __action1653< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1373( + __action1385( mode, __temp0, __4, @@ -69817,7 +69857,7 @@ fn __action1653< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1654< +fn __action1650< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69832,7 +69872,7 @@ fn __action1654< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1374( + __action1386( mode, __temp0, __1, @@ -69842,7 +69882,7 @@ fn __action1654< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1655< +fn __action1651< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69861,7 +69901,7 @@ fn __action1655< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1374( + __action1386( mode, __temp0, __3, @@ -69871,7 +69911,7 @@ fn __action1655< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1656< +fn __action1652< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69892,7 +69932,7 @@ fn __action1656< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1374( + __action1386( mode, __temp0, __4, @@ -69902,7 +69942,7 @@ fn __action1656< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1657< +fn __action1653< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69919,7 +69959,7 @@ fn __action1657< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1375( + __action1387( mode, __temp0, __1, @@ -69931,7 +69971,7 @@ fn __action1657< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1658< +fn __action1654< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69952,7 +69992,7 @@ fn __action1658< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1375( + __action1387( mode, __temp0, __3, @@ -69964,7 +70004,7 @@ fn __action1658< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1659< +fn __action1655< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -69987,7 +70027,7 @@ fn __action1659< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1375( + __action1387( mode, __temp0, __4, @@ -69999,7 +70039,7 @@ fn __action1659< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1660< +fn __action1656< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70015,7 +70055,7 @@ fn __action1660< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1376( + __action1388( mode, __temp0, __1, @@ -70026,7 +70066,7 @@ fn __action1660< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1661< +fn __action1657< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70046,7 +70086,7 @@ fn __action1661< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1376( + __action1388( mode, __temp0, __3, @@ -70057,7 +70097,7 @@ fn __action1661< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1662< +fn __action1658< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70079,7 +70119,7 @@ fn __action1662< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1376( + __action1388( mode, __temp0, __4, @@ -70090,7 +70130,7 @@ fn __action1662< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1663< +fn __action1659< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70103,7 +70143,7 @@ fn __action1663< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1377( + __action1389( mode, __temp0, ) @@ -70111,7 +70151,7 @@ fn __action1663< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1664< +fn __action1660< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70128,7 +70168,7 @@ fn __action1664< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1377( + __action1389( mode, __temp0, ) @@ -70136,7 +70176,7 @@ fn __action1664< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1665< +fn __action1661< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70155,7 +70195,7 @@ fn __action1665< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1377( + __action1389( mode, __temp0, ) @@ -70163,7 +70203,7 @@ fn __action1665< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1666< +fn __action1662< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70179,7 +70219,7 @@ fn __action1666< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1378( + __action1390( mode, __temp0, __1, @@ -70190,7 +70230,7 @@ fn __action1666< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1667< +fn __action1663< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70210,7 +70250,7 @@ fn __action1667< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1378( + __action1390( mode, __temp0, __3, @@ -70221,7 +70261,7 @@ fn __action1667< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1668< +fn __action1664< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70243,7 +70283,7 @@ fn __action1668< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1378( + __action1390( mode, __temp0, __4, @@ -70254,7 +70294,7 @@ fn __action1668< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1669< +fn __action1665< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70269,7 +70309,7 @@ fn __action1669< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1379( + __action1391( mode, __temp0, __1, @@ -70279,7 +70319,7 @@ fn __action1669< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1670< +fn __action1666< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70298,7 +70338,7 @@ fn __action1670< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1379( + __action1391( mode, __temp0, __3, @@ -70308,7 +70348,7 @@ fn __action1670< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1671< +fn __action1667< >( mode: Mode, __0: (TextSize, Vec, TextSize), @@ -70329,7 +70369,7 @@ fn __action1671< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1379( + __action1391( mode, __temp0, __4, @@ -70339,14 +70379,14 @@ fn __action1671< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1672< +fn __action1668< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Parameters, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), -) -> Result> + __3: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Result> { let __start0 = __1.0; let __end0 = __1.2; @@ -70355,7 +70395,115 @@ fn __action1672< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1291( + __action1303( + mode, + __0, + __temp0, + __2, + __3, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1669< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Result> +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action259( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1303( + mode, + __0, + __temp0, + __1, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1670< +>( + mode: Mode, + __0: (TextSize, core::option::Option, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, core::option::Option, TextSize), + __3: (TextSize, Option, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __3.0; + let __end0 = __3.2; + let __temp0 = __action254( + mode, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1442( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1671< +>( + mode: Mode, + __0: (TextSize, core::option::Option, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, core::option::Option, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __2.2; + let __end0 = __2.2; + let __temp0 = __action255( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1442( + mode, + __0, + __1, + __2, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1672< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, ast::Suite, TextSize), +) -> ast::ExceptHandler +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action302( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action769( mode, __0, __temp0, @@ -70371,18 +70519,18 @@ fn __action1673< mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> Result> + __2: (TextSize, ast::Suite, TextSize), +) -> ast::ExceptHandler { let __start0 = __0.2; let __end0 = __1.0; - let __temp0 = __action259( + let __temp0 = __action303( mode, &__start0, &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1291( + __action769( mode, __0, __temp0, @@ -70396,24 +70544,20 @@ fn __action1673< fn __action1674< >( mode: Mode, - __0: (TextSize, core::option::Option, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, Option, TextSize), -) -> ast::Expr + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> Option { - let __start0 = __3.0; - let __end0 = __3.2; - let __temp0 = __action254( + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action302( mode, - __3, + __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1430( + __action899( mode, __0, - __1, - __2, __temp0, ) } @@ -70421,114 +70565,10 @@ fn __action1674< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] fn __action1675< ->( - mode: Mode, - __0: (TextSize, core::option::Option, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, core::option::Option, TextSize), -) -> ast::Expr -{ - let __start0 = __2.2; - let __end0 = __2.2; - let __temp0 = __action255( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1430( - mode, - __0, - __1, - __2, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1676< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Suite, TextSize), -) -> ast::ExceptHandler -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action302( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action767( - mode, - __0, - __temp0, - __2, - __3, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1677< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Suite, TextSize), -) -> ast::ExceptHandler -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action303( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action767( - mode, - __0, - __temp0, - __1, - __2, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1678< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> Option -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action302( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action897( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1679< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> Option +) -> Option { let __start0 = __0.2; let __end0 = __0.2; @@ -70538,7 +70578,7 @@ fn __action1679< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action897( + __action899( mode, __0, __temp0, @@ -70547,14 +70587,14 @@ fn __action1679< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1680< +fn __action1676< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), - __3: (TextSize, Option, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), + __3: (TextSize, Option, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.2; @@ -70570,7 +70610,7 @@ fn __action1680< __2, ); let __temp1 = (__start1, __temp1, __end1); - __action1674( + __action1670( mode, __temp0, __1, @@ -70581,13 +70621,13 @@ fn __action1680< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1681< +fn __action1677< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, Option, TextSize), -) -> ast::Expr + __2: (TextSize, Option, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.2; @@ -70604,7 +70644,7 @@ fn __action1681< &__end1, ); let __temp1 = (__start1, __temp1, __end1); - __action1674( + __action1670( mode, __temp0, __1, @@ -70615,13 +70655,13 @@ fn __action1681< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1682< +fn __action1678< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, Option, TextSize), -) -> ast::Expr + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, Option, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -70638,7 +70678,7 @@ fn __action1682< __1, ); let __temp1 = (__start1, __temp1, __end1); - __action1674( + __action1670( mode, __temp0, __0, @@ -70649,12 +70689,12 @@ fn __action1682< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1683< +fn __action1679< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, Option, TextSize), -) -> ast::Expr + __1: (TextSize, Option, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -70672,7 +70712,7 @@ fn __action1683< &__end1, ); let __temp1 = (__start1, __temp1, __end1); - __action1674( + __action1670( mode, __temp0, __0, @@ -70683,13 +70723,13 @@ fn __action1683< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1684< +fn __action1680< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __2: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.2; @@ -70705,7 +70745,7 @@ fn __action1684< __2, ); let __temp1 = (__start1, __temp1, __end1); - __action1675( + __action1671( mode, __temp0, __1, @@ -70715,12 +70755,12 @@ fn __action1684< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1685< +fn __action1681< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.2; @@ -70737,7 +70777,7 @@ fn __action1685< &__end1, ); let __temp1 = (__start1, __temp1, __end1); - __action1675( + __action1671( mode, __temp0, __1, @@ -70747,12 +70787,12 @@ fn __action1685< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1686< +fn __action1682< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -70769,7 +70809,7 @@ fn __action1686< __1, ); let __temp1 = (__start1, __temp1, __end1); - __action1675( + __action1671( mode, __temp0, __0, @@ -70779,11 +70819,11 @@ fn __action1686< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1687< +fn __action1683< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.0; @@ -70801,7 +70841,7 @@ fn __action1687< &__end1, ); let __temp1 = (__start1, __temp1, __end1); - __action1675( + __action1671( mode, __temp0, __0, @@ -70811,14 +70851,14 @@ fn __action1687< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1688< +fn __action1684< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), __7: (TextSize, token::Tok, TextSize), @@ -70833,7 +70873,7 @@ fn __action1688< __4, ); let __temp0 = (__start0, __temp0, __end0); - __action1095( + __action1093( mode, __0, __1, @@ -70850,14 +70890,14 @@ fn __action1688< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1689< +fn __action1685< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -70869,7 +70909,7 @@ fn __action1689< __4, ); let __temp0 = (__start0, __temp0, __end0); - __action1096( + __action1094( mode, __0, __1, @@ -70883,13 +70923,13 @@ fn __action1689< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1690< +fn __action1686< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Suite, TextSize), __6: (TextSize, token::Tok, TextSize), @@ -70904,7 +70944,7 @@ fn __action1690< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1097( + __action1095( mode, __0, __1, @@ -70920,13 +70960,13 @@ fn __action1690< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1691< +fn __action1687< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), __4: (TextSize, token::Tok, TextSize), __5: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -70938,7 +70978,7 @@ fn __action1691< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1098( + __action1096( mode, __0, __1, @@ -70951,11 +70991,11 @@ fn __action1691< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1692< +fn __action1688< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), -) -> core::option::Option + __0: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> core::option::Option { let __start0 = __0.0; let __end0 = __0.2; @@ -70972,11 +71012,11 @@ fn __action1692< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1693< +fn __action1689< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.2; @@ -70993,11 +71033,11 @@ fn __action1693< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1694< +fn __action1690< >( mode: Mode, - __0: (TextSize, ast::Expr, TextSize), -) -> ast::Expr + __0: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr { let __start0 = __0.0; let __end0 = __0.2; @@ -71014,11 +71054,11 @@ fn __action1694< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1695< +fn __action1691< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Mod { let __start0 = __1.0; @@ -71028,7 +71068,101 @@ fn __action1695< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1440( + __action1451( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1692< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), + __2: (TextSize, alloc::vec::Vec, TextSize), +) -> ast::Mod +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action222( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1452( + mode, + __0, + __temp0, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1693< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::Stmt +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action1688( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1278( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1694< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), +) -> ast::Stmt +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action376( + mode, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1278( + mode, + __0, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments)] +fn __action1695< +>( + mode: Mode, + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, ast::ParenthesizedExpr, TextSize), +) -> ast::ParenthesizedExpr +{ + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action1688( + mode, + __1, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1476( mode, __0, __temp0, @@ -71041,22 +71175,20 @@ fn __action1696< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), - __2: (TextSize, alloc::vec::Vec, TextSize), -) -> ast::Mod +) -> ast::ParenthesizedExpr { - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action222( + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action376( mode, - __1, + &__start0, + &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1441( + __action1476( mode, __0, __temp0, - __2, ) } @@ -71065,20 +71197,18 @@ fn __action1696< fn __action1697< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action1692( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1266( + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action1690( mode, __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1490( + mode, __temp0, ) } @@ -71088,21 +71218,21 @@ fn __action1697< fn __action1698< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), + __1: (TextSize, alloc::vec::Vec, TextSize), ) -> ast::Stmt { - let __start0 = __0.2; + let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action376( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1266( + let __temp0 = __action1690( mode, __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1491( + mode, __temp0, + __1, ) } @@ -71111,109 +71241,19 @@ fn __action1698< fn __action1699< >( mode: Mode, - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action1692( - mode, - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1468( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1700< ->( - mode: Mode, - __0: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action376( - mode, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1468( - mode, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1701< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), -) -> ast::Stmt -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action1694( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1494( - mode, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1702< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), - __1: (TextSize, alloc::vec::Vec, TextSize), -) -> ast::Stmt -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action1694( - mode, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1495( - mode, - __temp0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments)] -fn __action1703< ->( - mode: Mode, - __0: (TextSize, ast::Expr, TextSize), + __0: (TextSize, ast::ParenthesizedExpr, TextSize), __1: (TextSize, ast::Operator, TextSize), - __2: (TextSize, ast::Expr, TextSize), + __2: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action1694( + let __temp0 = __action1690( mode, __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1260( + __action1272( mode, __temp0, __1, @@ -71223,7 +71263,7 @@ fn __action1703< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1704< +fn __action1700< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71241,7 +71281,7 @@ fn __action1704< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1520( + __action1516( mode, __0, __1, @@ -71254,7 +71294,7 @@ fn __action1704< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1705< +fn __action1701< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71272,7 +71312,7 @@ fn __action1705< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1520( + __action1516( mode, __0, __1, @@ -71285,7 +71325,7 @@ fn __action1705< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1706< +fn __action1702< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71304,7 +71344,7 @@ fn __action1706< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1521( + __action1517( mode, __0, __1, @@ -71318,7 +71358,7 @@ fn __action1706< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1707< +fn __action1703< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71337,7 +71377,7 @@ fn __action1707< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1521( + __action1517( mode, __0, __1, @@ -71351,7 +71391,7 @@ fn __action1707< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1708< +fn __action1704< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71368,7 +71408,7 @@ fn __action1708< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1522( + __action1518( mode, __0, __1, @@ -71380,7 +71420,7 @@ fn __action1708< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1709< +fn __action1705< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71397,7 +71437,7 @@ fn __action1709< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1522( + __action1518( mode, __0, __1, @@ -71409,7 +71449,7 @@ fn __action1709< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1710< +fn __action1706< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71427,7 +71467,7 @@ fn __action1710< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1523( + __action1519( mode, __0, __1, @@ -71440,7 +71480,7 @@ fn __action1710< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1711< +fn __action1707< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71458,7 +71498,7 @@ fn __action1711< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1523( + __action1519( mode, __0, __1, @@ -71471,7 +71511,7 @@ fn __action1711< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1712< +fn __action1708< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71480,7 +71520,7 @@ fn __action1712< __3: (TextSize, ast::TypeParams, TextSize), __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Expr, TextSize), + __6: (TextSize, ast::ParenthesizedExpr, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -71492,7 +71532,7 @@ fn __action1712< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1524( + __action1520( mode, __0, __1, @@ -71508,7 +71548,7 @@ fn __action1712< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1713< +fn __action1709< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71516,7 +71556,7 @@ fn __action1713< __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Expr, TextSize), + __5: (TextSize, ast::ParenthesizedExpr, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -71529,7 +71569,7 @@ fn __action1713< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1524( + __action1520( mode, __0, __1, @@ -71545,7 +71585,7 @@ fn __action1713< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1714< +fn __action1710< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71555,7 +71595,7 @@ fn __action1714< __4: (TextSize, ast::TypeParams, TextSize), __5: (TextSize, ast::Parameters, TextSize), __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, ast::Expr, TextSize), + __7: (TextSize, ast::ParenthesizedExpr, TextSize), __8: (TextSize, token::Tok, TextSize), __9: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -71567,7 +71607,7 @@ fn __action1714< __4, ); let __temp0 = (__start0, __temp0, __end0); - __action1525( + __action1521( mode, __0, __1, @@ -71584,7 +71624,7 @@ fn __action1714< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1715< +fn __action1711< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71593,7 +71633,7 @@ fn __action1715< __3: (TextSize, ast::Identifier, TextSize), __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Expr, TextSize), + __6: (TextSize, ast::ParenthesizedExpr, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -71606,7 +71646,7 @@ fn __action1715< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1525( + __action1521( mode, __0, __1, @@ -71623,7 +71663,7 @@ fn __action1715< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1716< +fn __action1712< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71642,7 +71682,7 @@ fn __action1716< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1526( + __action1522( mode, __0, __1, @@ -71656,7 +71696,7 @@ fn __action1716< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1717< +fn __action1713< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71675,7 +71715,7 @@ fn __action1717< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1526( + __action1522( mode, __0, __1, @@ -71689,7 +71729,7 @@ fn __action1717< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1718< +fn __action1714< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71709,7 +71749,7 @@ fn __action1718< __4, ); let __temp0 = (__start0, __temp0, __end0); - __action1527( + __action1523( mode, __0, __1, @@ -71724,7 +71764,7 @@ fn __action1718< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1719< +fn __action1715< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71744,7 +71784,7 @@ fn __action1719< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1527( + __action1523( mode, __0, __1, @@ -71759,7 +71799,7 @@ fn __action1719< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1720< +fn __action1716< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71767,7 +71807,7 @@ fn __action1720< __2: (TextSize, ast::TypeParams, TextSize), __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Expr, TextSize), + __5: (TextSize, ast::ParenthesizedExpr, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -71779,7 +71819,7 @@ fn __action1720< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1528( + __action1524( mode, __0, __1, @@ -71794,14 +71834,14 @@ fn __action1720< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1721< +fn __action1717< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), __2: (TextSize, ast::Parameters, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), __5: (TextSize, token::Tok, TextSize), __6: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -71814,7 +71854,7 @@ fn __action1721< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1528( + __action1524( mode, __0, __1, @@ -71829,7 +71869,7 @@ fn __action1721< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1722< +fn __action1718< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71838,7 +71878,7 @@ fn __action1722< __3: (TextSize, ast::TypeParams, TextSize), __4: (TextSize, ast::Parameters, TextSize), __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Expr, TextSize), + __6: (TextSize, ast::ParenthesizedExpr, TextSize), __7: (TextSize, token::Tok, TextSize), __8: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -71850,7 +71890,7 @@ fn __action1722< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1529( + __action1525( mode, __0, __1, @@ -71866,7 +71906,7 @@ fn __action1722< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1723< +fn __action1719< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71874,7 +71914,7 @@ fn __action1723< __2: (TextSize, ast::Identifier, TextSize), __3: (TextSize, ast::Parameters, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, ast::Expr, TextSize), + __5: (TextSize, ast::ParenthesizedExpr, TextSize), __6: (TextSize, token::Tok, TextSize), __7: (TextSize, ast::Suite, TextSize), ) -> ast::Stmt @@ -71887,7 +71927,7 @@ fn __action1723< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1529( + __action1525( mode, __0, __1, @@ -71903,7 +71943,7 @@ fn __action1723< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1724< +fn __action1720< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71921,7 +71961,7 @@ fn __action1724< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1530( + __action1526( mode, __0, __1, @@ -71934,7 +71974,7 @@ fn __action1724< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1725< +fn __action1721< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), @@ -71952,7 +71992,7 @@ fn __action1725< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1530( + __action1526( mode, __0, __1, @@ -71965,7 +72005,7 @@ fn __action1725< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1726< +fn __action1722< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -71984,7 +72024,7 @@ fn __action1726< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1531( + __action1527( mode, __0, __1, @@ -71998,7 +72038,7 @@ fn __action1726< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1727< +fn __action1723< >( mode: Mode, __0: (TextSize, alloc::vec::Vec, TextSize), @@ -72017,7 +72057,7 @@ fn __action1727< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1531( + __action1527( mode, __0, __1, @@ -72031,14 +72071,14 @@ fn __action1727< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1728< +fn __action1724< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), __2: (TextSize, ast::TypeParams, TextSize), __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Expr, TextSize), + __4: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __2.0; @@ -72048,7 +72088,7 @@ fn __action1728< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1451( + __action1462( mode, __0, __1, @@ -72060,13 +72100,13 @@ fn __action1728< #[allow(unused_variables)] #[allow(clippy::too_many_arguments)] -fn __action1729< +fn __action1725< >( mode: Mode, __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, ast::Expr, TextSize), + __3: (TextSize, ast::ParenthesizedExpr, TextSize), ) -> ast::Stmt { let __start0 = __1.2; @@ -72077,7 +72117,7 @@ fn __action1729< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1451( + __action1462( mode, __0, __1, diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parenthesized_with_statement.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parenthesized_with_statement.snap new file mode 100644 index 0000000000..2a68da061c --- /dev/null +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__parenthesized_with_statement.snap @@ -0,0 +1,681 @@ +--- +source: crates/ruff_python_parser/src/parser.rs +expression: "parse_suite(source, \"\").unwrap()" +--- +[ + With( + StmtWith { + range: 0..21, + is_async: false, + items: [ + WithItem { + range: 6..9, + context_expr: Name( + ExprName { + range: 7..8, + id: "a", + ctx: Load, + }, + ), + optional_vars: None, + }, + WithItem { + range: 11..14, + context_expr: Name( + ExprName { + range: 12..13, + id: "b", + ctx: Load, + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 17..21, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 22..56, + is_async: false, + items: [ + WithItem { + range: 28..31, + context_expr: Name( + ExprName { + range: 29..30, + id: "a", + ctx: Load, + }, + ), + optional_vars: None, + }, + WithItem { + range: 33..36, + context_expr: Name( + ExprName { + range: 34..35, + id: "b", + ctx: Load, + }, + ), + optional_vars: None, + }, + WithItem { + range: 38..44, + context_expr: Name( + ExprName { + range: 38..39, + id: "c", + ctx: Load, + }, + ), + optional_vars: Some( + Name( + ExprName { + range: 43..44, + id: "d", + ctx: Store, + }, + ), + ), + }, + WithItem { + range: 46..49, + context_expr: Name( + ExprName { + range: 47..48, + id: "e", + ctx: Load, + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 52..56, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 57..74, + is_async: false, + items: [ + WithItem { + range: 63..64, + context_expr: Name( + ExprName { + range: 63..64, + id: "a", + ctx: Load, + }, + ), + optional_vars: None, + }, + WithItem { + range: 66..67, + context_expr: Name( + ExprName { + range: 66..67, + id: "b", + ctx: Load, + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 70..74, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 75..97, + is_async: false, + items: [ + WithItem { + range: 80..91, + context_expr: Tuple( + ExprTuple { + range: 80..86, + elts: [ + Name( + ExprName { + range: 81..82, + id: "a", + ctx: Load, + }, + ), + Name( + ExprName { + range: 84..85, + id: "b", + ctx: Load, + }, + ), + ], + ctx: Load, + }, + ), + optional_vars: Some( + Name( + ExprName { + range: 90..91, + id: "c", + ctx: Store, + }, + ), + ), + }, + ], + body: [ + Pass( + StmtPass { + range: 93..97, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 98..122, + is_async: false, + items: [ + WithItem { + range: 104..115, + context_expr: Tuple( + ExprTuple { + range: 104..110, + elts: [ + Name( + ExprName { + range: 105..106, + id: "a", + ctx: Load, + }, + ), + Name( + ExprName { + range: 108..109, + id: "b", + ctx: Load, + }, + ), + ], + ctx: Load, + }, + ), + optional_vars: Some( + Name( + ExprName { + range: 114..115, + id: "c", + ctx: Store, + }, + ), + ), + }, + ], + body: [ + Pass( + StmtPass { + range: 118..122, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 123..142, + is_async: false, + items: [ + WithItem { + range: 129..135, + context_expr: Name( + ExprName { + range: 129..130, + id: "a", + ctx: Load, + }, + ), + optional_vars: Some( + Name( + ExprName { + range: 134..135, + id: "b", + ctx: Store, + }, + ), + ), + }, + ], + body: [ + Pass( + StmtPass { + range: 138..142, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 143..157, + is_async: false, + items: [ + WithItem { + range: 149..150, + context_expr: Name( + ExprName { + range: 149..150, + id: "a", + ctx: Load, + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 153..157, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 158..177, + is_async: false, + items: [ + WithItem { + range: 164..170, + context_expr: NamedExpr( + ExprNamedExpr { + range: 164..170, + target: Name( + ExprName { + range: 164..165, + id: "a", + ctx: Store, + }, + ), + value: Constant( + ExprConstant { + range: 169..170, + value: Int( + 0, + ), + kind: None, + }, + ), + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 173..177, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 178..202, + is_async: false, + items: [ + WithItem { + range: 184..195, + context_expr: NamedExpr( + ExprNamedExpr { + range: 184..190, + target: Name( + ExprName { + range: 184..185, + id: "a", + ctx: Store, + }, + ), + value: Constant( + ExprConstant { + range: 189..190, + value: Int( + 0, + ), + kind: None, + }, + ), + }, + ), + optional_vars: Some( + Name( + ExprName { + range: 195..196, + id: "x", + ctx: Store, + }, + ), + ), + }, + ], + body: [ + Pass( + StmtPass { + range: 198..202, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 203..219, + is_async: false, + items: [ + WithItem { + range: 209..212, + context_expr: Name( + ExprName { + range: 210..211, + id: "a", + ctx: Load, + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 215..219, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 220..241, + is_async: false, + items: [ + WithItem { + range: 226..234, + context_expr: NamedExpr( + ExprNamedExpr { + range: 227..233, + target: Name( + ExprName { + range: 227..228, + id: "a", + ctx: Store, + }, + ), + value: Constant( + ExprConstant { + range: 232..233, + value: Int( + 0, + ), + kind: None, + }, + ), + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 237..241, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 242..271, + is_async: false, + items: [ + WithItem { + range: 248..254, + context_expr: Name( + ExprName { + range: 248..249, + id: "a", + ctx: Load, + }, + ), + optional_vars: Some( + Name( + ExprName { + range: 253..254, + id: "b", + ctx: Store, + }, + ), + ), + }, + WithItem { + range: 256..264, + context_expr: NamedExpr( + ExprNamedExpr { + range: 257..263, + target: Name( + ExprName { + range: 257..258, + id: "a", + ctx: Store, + }, + ), + value: Constant( + ExprConstant { + range: 262..263, + value: Int( + 0, + ), + kind: None, + }, + ), + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 267..271, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 272..296, + is_async: false, + items: [ + WithItem { + range: 278..279, + context_expr: Name( + ExprName { + range: 278..279, + id: "a", + ctx: Load, + }, + ), + optional_vars: None, + }, + WithItem { + range: 281..289, + context_expr: NamedExpr( + ExprNamedExpr { + range: 282..288, + target: Name( + ExprName { + range: 282..283, + id: "a", + ctx: Store, + }, + ), + value: Constant( + ExprConstant { + range: 287..288, + value: Int( + 0, + ), + kind: None, + }, + ), + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 292..296, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 297..315, + is_async: false, + items: [ + WithItem { + range: 303..308, + context_expr: Yield( + ExprYield { + range: 303..308, + value: None, + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 311..315, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 316..341, + is_async: false, + items: [ + WithItem { + range: 322..334, + context_expr: YieldFrom( + ExprYieldFrom { + range: 322..334, + value: Name( + ExprName { + range: 333..334, + id: "a", + ctx: Load, + }, + ), + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 337..341, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 342..362, + is_async: false, + items: [ + WithItem { + range: 348..355, + context_expr: Yield( + ExprYield { + range: 349..354, + value: None, + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 358..362, + }, + ), + ], + }, + ), + With( + StmtWith { + range: 363..390, + is_async: false, + items: [ + WithItem { + range: 369..383, + context_expr: YieldFrom( + ExprYieldFrom { + range: 370..382, + value: Name( + ExprName { + range: 381..382, + id: "a", + ctx: Load, + }, + ), + }, + ), + optional_vars: None, + }, + ], + body: [ + Pass( + StmtPass { + range: 386..390, + }, + ), + ], + }, + ), +] diff --git a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__with_statement.snap b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__with_statement.snap index abae0fb4bc..64c0bf9fb3 100644 --- a/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__with_statement.snap +++ b/crates/ruff_python_parser/src/snapshots/ruff_python_parser__parser__tests__with_statement.snap @@ -477,7 +477,7 @@ expression: "parse_suite(source, \"\").unwrap()" is_async: false, items: [ WithItem { - range: 239..243, + range: 239..240, context_expr: Constant( ExprConstant { range: 239..240, @@ -490,7 +490,7 @@ expression: "parse_suite(source, \"\").unwrap()" optional_vars: None, }, WithItem { - range: 239..243, + range: 242..243, context_expr: Constant( ExprConstant { range: 242..243, @@ -765,7 +765,7 @@ expression: "parse_suite(source, \"\").unwrap()" is_async: false, items: [ WithItem { - range: 361..369, + range: 362..368, context_expr: NamedExpr( ExprNamedExpr { range: 362..368, @@ -805,7 +805,7 @@ expression: "parse_suite(source, \"\").unwrap()" is_async: false, items: [ WithItem { - range: 381..394, + range: 382..393, context_expr: NamedExpr( ExprNamedExpr { range: 382..388, From 7c1aa98f435ecb75a118807ba3c8e8047644e72d Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 31 Aug 2023 19:11:11 +0100 Subject: [PATCH 016/164] Run cargo update (#6964) --- Cargo.lock | 518 ++++++++++++++++++++++++----------------------------- 1 file changed, 232 insertions(+), 286 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ebe84be395..74123f7491 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,18 +28,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "0c378d78423fdad8089616f827526ee33c19f2fddbd5de1629152c9593ba4783" dependencies = [ "memchr", ] @@ -83,24 +74,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" @@ -122,9 +112,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -132,9 +122,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "argfile" @@ -162,9 +152,9 @@ dependencies = [ [[package]] name = "assert_cmd" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151" +checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" dependencies = [ "anstyle", "bstr", @@ -183,9 +173,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "414dcefbc63d77c526a76b3afcf6fbb9b5e2791c19c3aa2297733208750c6e53" [[package]] name = "bincode" @@ -219,18 +209,18 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "bstr" -version = "1.6.0" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" dependencies = [ "memchr", - "regex-automata 0.3.0", + "regex-automata 0.3.7", "serde", ] @@ -257,9 +247,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -278,9 +271,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "95ed24df0632f708f5f6d8082675bef2596f7084dee3dd55f632290bf35bfe0f" dependencies = [ "android-tzdata", "iana-time-zone", @@ -289,7 +282,7 @@ dependencies = [ "serde", "time 0.1.45", "wasm-bindgen", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -321,9 +314,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.11" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +checksum = "7c8d502cbaec4595d2e7d5f61e318f05417bd2b66fdc3809498f0d3fdf0bea27" dependencies = [ "clap_builder", "clap_derive", @@ -332,9 +325,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.11" +version = "4.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +checksum = "5891c7bc0edb3e1c2204fc5e94009affabeb1821c9e5fdc3959536c5c0bb984d" dependencies = [ "anstream", "anstyle", @@ -344,9 +337,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.3.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" +checksum = "586a385f7ef2f8b4d86bddaa0c094794e7ccbfe5ffef1f434fe928143fc783a5" dependencies = [ "clap", ] @@ -365,9 +358,9 @@ dependencies = [ [[package]] name = "clap_complete_fig" -version = "4.3.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fee1d30a51305a6c2ed3fc5709be3c8af626c9c958e04dd9ae94e27bcbce9f" +checksum = "9e9bae21b3f6eb417ad3054c8b1094aa0542116eba4979b1b271baefbfa6b965" dependencies = [ "clap", "clap_complete", @@ -385,21 +378,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "clearscreen" @@ -598,16 +591,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "darling" version = "0.20.3" @@ -629,7 +612,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] @@ -640,7 +623,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] @@ -740,15 +723,15 @@ checksum = "9bda8e21c04aca2ae33ffc2fd8c23134f3cac46db123ba97bd9d3f3b8a4a85e1" [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "ena" @@ -780,15 +763,15 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -807,12 +790,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "fern" @@ -825,13 +805,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -867,9 +847,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -926,11 +906,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -1053,9 +1033,9 @@ dependencies = [ [[package]] name = "imperative" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f92123bf2fe0d9f1b5df1964727b970ca3b2d0203d47cf97fb1f36d856b6398" +checksum = "8b70798296d538cdaa6d652941fcc795963f8b9878b9e300c9fab7a522bd2fc0" dependencies = [ "phf", "rust-stemmers", @@ -1085,9 +1065,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" dependencies = [ "console", "instant", @@ -1148,17 +1128,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "is-macro" version = "0.2.2" @@ -1174,12 +1143,12 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.3", + "rustix", "windows-sys 0.48.0", ] @@ -1194,9 +1163,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" @@ -1209,9 +1178,9 @@ dependencies = [ [[package]] name = "kqueue" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8fc60ba15bf51257aa9807a48a61013db043fcf3a78cb0d916e8e396dcad98" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" dependencies = [ "kqueue-sys", "libc", @@ -1219,9 +1188,9 @@ dependencies = [ [[package]] name = "kqueue-sys" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" dependencies = [ "bitflags 1.3.2", "libc", @@ -1242,7 +1211,7 @@ dependencies = [ "lalrpop-util", "petgraph", "regex", - "regex-syntax 0.7.3", + "regex-syntax 0.7.5", "string_cache", "term", "tiny-keccak", @@ -1323,9 +1292,9 @@ dependencies = [ [[package]] name = "libmimalloc-sys" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ac0e912c8ef1b735e92369695618dc5b1819f5a7bf3f167301a3ba1cea515e" +checksum = "25d058a81af0d1c22d7a1c948576bee6d673f7af3c0f35564abd6c81122f513d" dependencies = [ "cc", "libc", @@ -1339,15 +1308,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lock_api" @@ -1361,9 +1324,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "matchers" @@ -1382,9 +1345,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "5486aed0026218e61b8a01d5fbd5a0a134649abb71a0e53b7bc088529dced86e" [[package]] name = "memoffset" @@ -1397,9 +1360,9 @@ dependencies = [ [[package]] name = "mimalloc" -version = "0.1.37" +version = "0.1.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2894987a3459f3ffb755608bd82188f8ed00d0ae077f1edea29c068d639d98" +checksum = "972e5f23f6716f62665760b0f4cbf592576a80c7b879ba9beaafc0e558894127" dependencies = [ "libmimalloc-sys", ] @@ -1451,14 +1414,13 @@ checksum = "d906846a98739ed9d73d66e62c2641eef8321f1734b7a1156ab045a0248fb2b3" [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", - "static_assertions", ] [[package]] @@ -1501,9 +1463,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -1522,9 +1484,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -1572,15 +1534,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "output_vt100" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] - [[package]] name = "overload" version = "0.1.1" @@ -1607,14 +1560,14 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "path-absolutize" @@ -1703,12 +1656,12 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "petgraph" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 1.9.3", + "indexmap 2.0.0", ] [[package]] @@ -1760,9 +1713,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "plotters" @@ -1805,9 +1758,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.3.3" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" +checksum = "31114a898e107c51bb1609ffaf55a0e011cf6a4d7f1170d0015a165082c0338b" [[package]] name = "ppv-lite86" @@ -1851,13 +1804,11 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ctor", "diff", - "output_vt100", "yansi", ] @@ -1887,9 +1838,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -1909,12 +1860,12 @@ dependencies = [ [[package]] name = "quick-junit" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b909fe9bf2abb1e3d6a97c9189a37c8105c61d03dca9ce6aace023e7d682bd" +checksum = "6bf780b59d590c25f8c59b44c124166a2a93587868b619fb8f5b47fb15e9ed6d" dependencies = [ "chrono", - "indexmap 1.9.3", + "indexmap 2.0.0", "nextest-workspace-hack", "quick-xml", "thiserror", @@ -1923,18 +1874,18 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.26.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" +checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2022,14 +1973,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89089e897c013b3deb627116ae56a6955a72b8bed395c9526af31c9fe528b484" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", - "regex-automata 0.3.0", - "regex-syntax 0.7.3", + "regex-automata 0.3.7", + "regex-syntax 0.7.5", ] [[package]] @@ -2043,13 +1994,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.0" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa250384981ea14565685dea16a9ccc4d1c541a13f82b9c168572264d1df8c56" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", - "regex-syntax 0.7.3", + "regex-syntax 0.7.5", ] [[package]] @@ -2060,9 +2011,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "result-like" @@ -2107,7 +2058,7 @@ version = "0.0.286" dependencies = [ "annotate-snippets 0.9.1", "anyhow", - "bitflags 2.3.3", + "bitflags 2.4.0", "chrono", "clap", "colored", @@ -2209,7 +2160,7 @@ dependencies = [ "argfile", "assert_cmd", "bincode", - "bitflags 2.3.3", + "bitflags 2.4.0", "cachedir", "chrono", "clap", @@ -2338,14 +2289,14 @@ dependencies = [ "proc-macro2", "quote", "ruff_python_trivia", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] name = "ruff_python_ast" version = "0.0.0" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "insta", "is-macro", "memchr", @@ -2378,7 +2329,7 @@ name = "ruff_python_formatter" version = "0.0.0" dependencies = [ "anyhow", - "bitflags 2.3.3", + "bitflags 2.4.0", "clap", "countme", "insta", @@ -2418,7 +2369,7 @@ dependencies = [ name = "ruff_python_literal" version = "0.0.0" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "hexf-parse", "is-macro", "itertools", @@ -2465,7 +2416,7 @@ dependencies = [ name = "ruff_python_semantic" version = "0.0.0" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "is-macro", "num-traits", "ruff_index", @@ -2603,48 +2554,44 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.37.23" +version = "0.38.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "ed6248e1caa625eb708e266e06159f135e8c26f2bb7ceb72dc4b2766d0340964" dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5ffa1efe7548069688cd7028f32591853cd7b5b756d41bcffd2353e4fc75b4" -dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.21.2" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e32ca28af694bc1bbf399c33a516dbdf1c90090b8ab23c2bc24f834aa2247f5f" +checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.4", "sct", ] [[package]] name = "rustls-webpki" -version = "0.100.1" +version = "0.100.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" dependencies = [ "ring", "untrusted", @@ -2652,15 +2599,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -2673,9 +2620,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "763f8cd0d4c71ed8389c90cb8100cba87e763bd01a8e614d4f0af97bcd50a161" dependencies = [ "dyn-clone", "schemars_derive", @@ -2685,9 +2632,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "ec0f696e21e10fa546b7ffb1c9672c6de8fbc7a81acf59524386d8639bf12737" dependencies = [ "proc-macro2", "quote", @@ -2703,9 +2650,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -2719,15 +2666,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" [[package]] name = "serde" -version = "1.0.166" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] @@ -2745,13 +2692,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.166" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] @@ -2808,7 +2755,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros", - "time 0.3.26", + "time 0.3.28", ] [[package]] @@ -2820,7 +2767,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] @@ -2855,15 +2802,15 @@ checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "spin" @@ -2931,9 +2878,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.23" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -2951,15 +2898,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.23", + "rustix", "windows-sys 0.48.0", ] @@ -3039,22 +2985,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] @@ -3069,9 +3015,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.5.3+5.3.0-patched" +version = "0.5.4+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" dependencies = [ "cc", "libc", @@ -3079,9 +3025,9 @@ dependencies = [ [[package]] name = "tikv-jemallocator" -version = "0.5.0" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20612db8a13a6c06d57ec83953694185a367e16945f66565e8028d2c0bd76979" +checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca" dependencies = [ "libc", "tikv-jemalloc-sys", @@ -3100,9 +3046,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ "deranged", "itoa", @@ -3119,9 +3065,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75c65469ed6b3a4809d987a41eb1dc918e9bc1d92211cbad7ae82931846f7451" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -3162,9 +3108,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", @@ -3183,9 +3129,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.11" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ "indexmap 2.0.0", "serde", @@ -3215,7 +3161,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] @@ -3230,9 +3176,9 @@ dependencies = [ [[package]] name = "tracing-indicatif" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b38ed3722d27705c3bd7ca0ccf29acc3d8e1c717b4cd87f97891a2c1834ea1af" +checksum = "57e05fe4a1c906d94b275d8aeb8ff8b9deaca502aeb59ae8ab500a92b8032ac8" dependencies = [ "indicatif", "tracing", @@ -3347,9 +3293,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -3397,16 +3343,16 @@ dependencies = [ "log", "once_cell", "rustls", - "rustls-webpki", + "rustls-webpki 0.100.2", "url", "webpki-roots", ] [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3440,7 +3386,7 @@ checksum = "f7e1ba1f333bd65ce3c9f27de592fcbc256dafe3af2717f56d7c87761fbaccf4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", ] [[package]] @@ -3540,7 +3486,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -3574,7 +3520,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.23", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3625,7 +3571,7 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "rustls-webpki", + "rustls-webpki 0.100.2", ] [[package]] @@ -3685,7 +3631,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -3703,7 +3649,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -3723,17 +3669,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -3744,9 +3690,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -3756,9 +3702,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -3768,9 +3714,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -3780,9 +3726,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -3792,9 +3738,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -3804,9 +3750,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -3816,15 +3762,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.7" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] From f7dca3d95856ca5a15d69ac04aa42ef9562dc6de Mon Sep 17 00:00:00 2001 From: Nicholas Grisafi Date: Thu, 31 Aug 2023 11:36:48 -0700 Subject: [PATCH 017/164] Add Rippling to who uses ruff (#7032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Adding rippling to who uses ruff section ## Test Plan We migrated to ruff 🙂 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9e3fe2029e..05e87ff3e4 100644 --- a/README.md +++ b/README.md @@ -398,6 +398,7 @@ Ruff is used by a number of major open-source projects and companies, including: - [Pydantic](https://github.com/pydantic/pydantic) - [Pylint](https://github.com/PyCQA/pylint) - [Reflex](https://github.com/reflex-dev/reflex) +- [Rippling](https://rippling.com) - [Robyn](https://github.com/sansyrox/robyn) - Scale AI ([Launch SDK](https://github.com/scaleapi/launch-python-client)) - Snowflake ([SnowCLI](https://github.com/Snowflake-Labs/snowcli)) From 51d69b448c09b0b89c7357beaf5490d4d49ef91c Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 31 Aug 2023 21:45:26 +0100 Subject: [PATCH 018/164] Improve compatibility between multi-statement PYI rules (#7024) ## Summary This PR modifies a few of our rules related to which statements (and how many) are allowed in function bodies within `.pyi` files, to improve compatibility with flake8-pyi and improve the interplay dynamics between them. Each change fixes a deviation from flake8-pyi: - We now always trigger the multi-statement rule (PYI048) regardless of whether one of the statements is a docstring. - We no longer trigger the `...` rule (PYI010) if the single statement is a docstring or a `pass` (since those are covered by other rules). - We no longer trigger the `...` rule (PYI010) if the function body contains multiple statements (since that's covered by PYI048). Closes https://github.com/astral-sh/ruff/issues/7021. ## Test Plan `cargo test` --- .../test/fixtures/flake8_pyi/PYI010.py | 12 ++++--- .../test/fixtures/flake8_pyi/PYI010.pyi | 5 ++- .../test/fixtures/flake8_pyi/PYI048.py | 18 ++++++++--- .../test/fixtures/flake8_pyi/PYI048.pyi | 18 +++++------ .../flake8_pyi/rules/non_empty_stub_body.rs | 31 ++++++++++++++----- .../rules/pass_statement_stub_body.rs | 21 ++++++------- .../rules/stub_body_multiple_statements.rs | 25 +++++---------- ..._flake8_pyi__tests__PYI010_PYI010.pyi.snap | 13 +++++--- ..._flake8_pyi__tests__PYI048_PYI048.pyi.snap | 24 +++++++++++--- 9 files changed, 103 insertions(+), 64 deletions(-) diff --git a/crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.py b/crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.py index 1c6afa31ad..b8235724c2 100644 --- a/crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.py +++ b/crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.py @@ -3,16 +3,20 @@ def bar(): def foo(): - """foo""" # OK + """foo""" # OK, docstrings are handled by another rule def buzz(): - print("buzz") # OK, not in stub file + print("buzz") # ERROR PYI010 def foo2(): - 123 # OK, not in a stub file + 123 # ERROR PYI010 def bizz(): - x = 123 # OK, not in a stub file + x = 123 # ERROR PYI010 + + +def foo3(): + pass # OK, pass is handled by another rule diff --git a/crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.pyi b/crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.pyi index b49859d824..11346a5196 100644 --- a/crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.pyi +++ b/crates/ruff/resources/test/fixtures/flake8_pyi/PYI010.pyi @@ -1,6 +1,6 @@ def bar(): ... # OK def foo(): - """foo""" # OK, strings are handled by another rule + """foo""" # OK, docstrings are handled by another rule def buzz(): print("buzz") # ERROR PYI010 @@ -10,3 +10,6 @@ def foo2(): def bizz(): x = 123 # ERROR PYI010 + +def foo3(): + pass # OK, pass is handled by another rule diff --git a/crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.py b/crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.py index 8ec21f2d31..350a18120f 100644 --- a/crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.py +++ b/crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.py @@ -1,19 +1,27 @@ -def bar(): # OK - ... +def bar(): + ... # OK -def oof(): # OK, docstrings are handled by another rule +def bar(): + pass # OK + + +def bar(): + """oof""" # OK + + +def oof(): # ERROR PYI048 """oof""" print("foo") -def foo(): # Ok not in Stub file +def foo(): # ERROR PYI048 """foo""" print("foo") print("foo") -def buzz(): # Ok not in Stub file +def buzz(): # ERROR PYI048 print("fizz") print("buzz") print("test") diff --git a/crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.pyi b/crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.pyi index 29a2120f94..fe4246396a 100644 --- a/crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.pyi +++ b/crates/ruff/resources/test/fixtures/flake8_pyi/PYI048.pyi @@ -1,20 +1,20 @@ +def bar(): ... # OK def bar(): - ... # OK + pass # OK +def bar(): + """oof""" # OK -def oof(): # OK, docstrings are handled by another rule - """oof""" - print("foo") +def oof(): # ERROR PYI048 + """oof""" + print("foo") - - -def foo(): # ERROR PYI048 +def foo(): # ERROR PYI048 """foo""" print("foo") print("foo") - -def buzz(): # ERROR PYI048 +def buzz(): # ERROR PYI048 print("fizz") print("buzz") print("test") diff --git a/crates/ruff/src/rules/flake8_pyi/rules/non_empty_stub_body.rs b/crates/ruff/src/rules/flake8_pyi/rules/non_empty_stub_body.rs index 9ac914d2f9..2432df8faf 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/non_empty_stub_body.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/non_empty_stub_body.rs @@ -1,7 +1,7 @@ -use ruff_python_ast::{self as ast, Constant, Expr, Stmt}; - use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix}; use ruff_macros::{derive_message_formats, violation}; +use ruff_python_ast::helpers::is_docstring_stmt; +use ruff_python_ast::{self as ast, Expr, Stmt}; use ruff_text_size::Ranged; use crate::checkers::ast::Checker; @@ -23,18 +23,35 @@ impl AlwaysAutofixableViolation for NonEmptyStubBody { /// PYI010 pub(crate) fn non_empty_stub_body(checker: &mut Checker, body: &[Stmt]) { - if let [Stmt::Expr(ast::StmtExpr { value, range: _ })] = body { + // Ignore multi-statement bodies (covered by PYI048). + let [stmt] = body else { + return; + }; + + // Ignore `pass` statements (covered by PYI009). + if stmt.is_pass_stmt() { + return; + } + + // Ignore docstrings (covered by PYI021). + if is_docstring_stmt(stmt) { + return; + } + + // Ignore `...` (the desired case). + if let Stmt::Expr(ast::StmtExpr { value, range: _ }) = stmt { if let Expr::Constant(ast::ExprConstant { value, .. }) = value.as_ref() { - if matches!(value, Constant::Ellipsis | Constant::Str(_)) { + if value.is_ellipsis() { return; } } } - let mut diagnostic = Diagnostic::new(NonEmptyStubBody, body[0].range()); + + let mut diagnostic = Diagnostic::new(NonEmptyStubBody, stmt.range()); if checker.patch(Rule::NonEmptyStubBody) { - diagnostic.set_fix(Fix::automatic(Edit::range_replacement( + diagnostic.set_fix(Fix::suggested(Edit::range_replacement( format!("..."), - body[0].range(), + stmt.range(), ))); }; checker.diagnostics.push(diagnostic); diff --git a/crates/ruff/src/rules/flake8_pyi/rules/pass_statement_stub_body.rs b/crates/ruff/src/rules/flake8_pyi/rules/pass_statement_stub_body.rs index e85433a9c5..e51b289808 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/pass_statement_stub_body.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/pass_statement_stub_body.rs @@ -22,17 +22,16 @@ impl AlwaysAutofixableViolation for PassStatementStubBody { /// PYI009 pub(crate) fn pass_statement_stub_body(checker: &mut Checker, body: &[Stmt]) { - let [stmt] = body else { + let [Stmt::Pass(pass)] = body else { return; }; - if stmt.is_pass_stmt() { - let mut diagnostic = Diagnostic::new(PassStatementStubBody, stmt.range()); - if checker.patch(Rule::PassStatementStubBody) { - diagnostic.set_fix(Fix::automatic(Edit::range_replacement( - format!("..."), - stmt.range(), - ))); - }; - checker.diagnostics.push(diagnostic); - } + + let mut diagnostic = Diagnostic::new(PassStatementStubBody, pass.range()); + if checker.patch(Rule::PassStatementStubBody) { + diagnostic.set_fix(Fix::automatic(Edit::range_replacement( + format!("..."), + pass.range(), + ))); + }; + checker.diagnostics.push(diagnostic); } diff --git a/crates/ruff/src/rules/flake8_pyi/rules/stub_body_multiple_statements.rs b/crates/ruff/src/rules/flake8_pyi/rules/stub_body_multiple_statements.rs index 6390441bad..77c20d5e94 100644 --- a/crates/ruff/src/rules/flake8_pyi/rules/stub_body_multiple_statements.rs +++ b/crates/ruff/src/rules/flake8_pyi/rules/stub_body_multiple_statements.rs @@ -1,9 +1,7 @@ -use ruff_python_ast::Stmt; - use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; -use ruff_python_ast::helpers::is_docstring_stmt; use ruff_python_ast::identifier::Identifier; +use ruff_python_ast::Stmt; use crate::checkers::ast::Checker; @@ -17,21 +15,12 @@ impl Violation for StubBodyMultipleStatements { } } -/// PYI010 +/// PYI048 pub(crate) fn stub_body_multiple_statements(checker: &mut Checker, stmt: &Stmt, body: &[Stmt]) { - // If the function body consists of exactly one statement, abort. - if body.len() == 1 { - return; + if body.len() > 1 { + checker.diagnostics.push(Diagnostic::new( + StubBodyMultipleStatements, + stmt.identifier(), + )); } - - // If the function body consists of exactly two statements, and the first is a - // docstring, abort (this is covered by PYI021). - if body.len() == 2 && is_docstring_stmt(&body[0]) { - return; - } - - checker.diagnostics.push(Diagnostic::new( - StubBodyMultipleStatements, - stmt.identifier(), - )); } diff --git a/crates/ruff/src/rules/flake8_pyi/snapshots/ruff__rules__flake8_pyi__tests__PYI010_PYI010.pyi.snap b/crates/ruff/src/rules/flake8_pyi/snapshots/ruff__rules__flake8_pyi__tests__PYI010_PYI010.pyi.snap index ad0bb4775f..1e757d8872 100644 --- a/crates/ruff/src/rules/flake8_pyi/snapshots/ruff__rules__flake8_pyi__tests__PYI010_PYI010.pyi.snap +++ b/crates/ruff/src/rules/flake8_pyi/snapshots/ruff__rules__flake8_pyi__tests__PYI010_PYI010.pyi.snap @@ -11,8 +11,8 @@ PYI010.pyi:6:5: PYI010 [*] Function body must contain only `...` | = help: Replace function body with `...` -ℹ Fix -3 3 | """foo""" # OK, strings are handled by another rule +ℹ Suggested fix +3 3 | """foo""" # OK, docstrings are handled by another rule 4 4 | 5 5 | def buzz(): 6 |- print("buzz") # ERROR PYI010 @@ -31,7 +31,7 @@ PYI010.pyi:9:5: PYI010 [*] Function body must contain only `...` | = help: Replace function body with `...` -ℹ Fix +ℹ Suggested fix 6 6 | print("buzz") # ERROR PYI010 7 7 | 8 8 | def foo2(): @@ -46,14 +46,19 @@ PYI010.pyi:12:5: PYI010 [*] Function body must contain only `...` 11 | def bizz(): 12 | x = 123 # ERROR PYI010 | ^^^^^^^ PYI010 +13 | +14 | def foo3(): | = help: Replace function body with `...` -ℹ Fix +ℹ Suggested fix 9 9 | 123 # ERROR PYI010 10 10 | 11 11 | def bizz(): 12 |- x = 123 # ERROR PYI010 12 |+ ... # ERROR PYI010 +13 13 | +14 14 | def foo3(): +15 15 | pass # OK, pass is handled by another rule diff --git a/crates/ruff/src/rules/flake8_pyi/snapshots/ruff__rules__flake8_pyi__tests__PYI048_PYI048.pyi.snap b/crates/ruff/src/rules/flake8_pyi/snapshots/ruff__rules__flake8_pyi__tests__PYI048_PYI048.pyi.snap index 725d9b7b4d..d897255d5d 100644 --- a/crates/ruff/src/rules/flake8_pyi/snapshots/ruff__rules__flake8_pyi__tests__PYI048_PYI048.pyi.snap +++ b/crates/ruff/src/rules/flake8_pyi/snapshots/ruff__rules__flake8_pyi__tests__PYI048_PYI048.pyi.snap @@ -1,17 +1,31 @@ --- source: crates/ruff/src/rules/flake8_pyi/mod.rs --- -PYI048.pyi:11:5: PYI048 Function body must contain exactly one statement +PYI048.pyi:8:5: PYI048 Function body must contain exactly one statement | -11 | def foo(): # ERROR PYI048 + 6 | """oof""" # OK + 7 | + 8 | def oof(): # ERROR PYI048 | ^^^ PYI048 -12 | """foo""" -13 | print("foo") + 9 | """oof""" +10 | print("foo") + | + +PYI048.pyi:12:5: PYI048 Function body must contain exactly one statement + | +10 | print("foo") +11 | +12 | def foo(): # ERROR PYI048 + | ^^^ PYI048 +13 | """foo""" +14 | print("foo") | PYI048.pyi:17:5: PYI048 Function body must contain exactly one statement | -17 | def buzz(): # ERROR PYI048 +15 | print("foo") +16 | +17 | def buzz(): # ERROR PYI048 | ^^^^ PYI048 18 | print("fizz") 19 | print("buzz") From 376d3caf474d048773fae90f2380065c00eeb645 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Thu, 31 Aug 2023 21:55:05 +0100 Subject: [PATCH 019/164] Treat empty-line separated comments as trailing statement comments (#6999) ## Summary This PR modifies our between-statement comment handling such that comments that are not separated by a statement by any newlines continue to be treated as leading comments on the statement, but comments that _are_ separated are instead formatted as trailing comments on the preceding statement. See, e.g., the originating snippet: ```python DEFAULT_TEMPLATE = "flatpages/default.html" # This view is called from FlatpageFallbackMiddleware.process_response # when a 404 is raised, which often means CsrfViewMiddleware.process_view # has not been called even if CsrfViewMiddleware is installed. So we need # to use @csrf_protect, in case the template needs {% csrf_token %}. # However, we can't just wrap this view; if no matching flatpage exists, # or a redirect is required for authentication, the 404 needs to be returned # without any CSRF checks. Therefore, we only # CSRF protect the internal implementation. def flatpage(request, url): pass ``` Here, we need to ensure that the `def flatpage` is precede by two empty lines. However, we want those two empty lines to be enforced from the _end_ of the comment block, _unless_ the comments are directly atop the `def flatpage`. I played with this a bit, and I think the simplest conceptual model and implementation is to instead treat those as trailing comments on the preceding node. The main difficulty with this approach is that, in order to be fully compatible with Black, we'd sometimes need to insert newlines _between_ the preceding node and its trailing comments. See, e.g.: ```python def func(): ... # comment x = 1 ``` In this case, we'd need to insert two blank lines between `def func(): ...` and `# comment`, but `# comment` is trailing comment on `def func(): ...`. So, we'd need to take this case into account in the various nodes that _require_ newlines after them: functions, classes, and imports. After some discussion, we've opted _not_ to support this, and just treat these as trailing comments -- so we won't insert newlines there. This means our handling is still identical to Black's on Black-formatted code, but avoids moving such trailing comments on unformatted code. I dislike that the empty handling is so complex, and that it's split between so many different nodes, but this is really tricky. Continuing to treat these as leading comments is very difficult too, since we'd need to do similar tricks for the leading comment handling in those nodes, and influencing leading comments is even harder, since they're all formatted _before_ the node itself. Closes https://github.com/astral-sh/ruff/issues/6761. ## Test Plan `cargo test` Surprisingly, it doesn't change the similarity at all (apart from a 0.00001 change in CPython), but I manually confirmed that it did fix the originating issue in Django. Before: | project | similarity index | |--------------|------------------| | cpython | 0.76082 | | django | 0.99921 | | transformers | 0.99854 | | twine | 0.99982 | | typeshed | 0.99953 | | warehouse | 0.99648 | | zulip | 0.99928 | After: | project | similarity index | |--------------|------------------| | cpython | 0.76081 | | django | 0.99921 | | transformers | 0.99854 | | twine | 0.99982 | | typeshed | 0.99953 | | warehouse | 0.99648 | | zulip | 0.99928 | --- .../test/fixtures/ruff/fmt_on_off/indent.py | 55 --- .../test/fixtures/ruff/fmt_on_off/newlines.py | 36 ++ .../resources/test/fixtures/ruff/newlines.py | 161 ++++++++ .../src/comments/format.rs | 54 ++- .../src/comments/placement.rs | 80 +++- ...formatter__comments__tests__base_test.snap | 23 +- ...rmatter__comments__tests__match_cases.snap | 30 +- .../src/statement/stmt_class_def.rs | 28 ++ .../src/statement/stmt_function_def.rs | 28 ++ .../src/statement/suite.rs | 27 +- ...tibility@miscellaneous__decorators.py.snap | 136 ++++--- ...tibility@simple_cases__empty_lines.py.snap | 304 --------------- ...mpatibility@simple_cases__fmtonoff.py.snap | 17 +- ...patibility@simple_cases__fmtonoff5.py.snap | 11 +- ...lity@simple_cases__fmtpass_imports.py.snap | 93 +++++ .../format@fmt_on_off__indent.py.snap | 226 ------------ ...at@fmt_on_off__mixed_space_and_tab.py.snap | 6 + .../format@fmt_on_off__newlines.py.snap | 90 +++++ .../tests/snapshots/format@newlines.py.snap | 345 ++++++++++++++++++ .../format@statement__assert.py.snap | 3 +- .../format@statement__function.py.snap | 2 + 21 files changed, 1060 insertions(+), 695 deletions(-) create mode 100644 crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/newlines.py create mode 100644 crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py delete mode 100644 crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__empty_lines.py.snap create mode 100644 crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtpass_imports.py.snap create mode 100644 crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__newlines.py.snap create mode 100644 crates/ruff_python_formatter/tests/snapshots/format@newlines.py.snap diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/indent.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/indent.py index c0cb6c1849..e69de29bb2 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/indent.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/indent.py @@ -1,55 +0,0 @@ -def test(): - # fmt: off - a_very_small_indent - ( -not_fixed - ) - - if True: - pass - more - # fmt: on - - formatted - - def test(): - a_small_indent - # fmt: off -# fix under-indented comments - (or_the_inner_expression + -expressions - ) - - if True: - pass - # fmt: on - - -# fmt: off -def test(): - pass - - # It is necessary to indent comments because the following fmt: on comment because it otherwise becomes a trailing comment - # of the `test` function if the "proper" indentation is larger than 2 spaces. - # fmt: on - -disabled + formatting; - -# fmt: on - -formatted; - -def test(): - pass - # fmt: off - """A multiline strings - that should not get formatted""" - - "A single quoted multiline \ - string" - - disabled + formatting; - -# fmt: on - -formatted; diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/newlines.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/newlines.py new file mode 100644 index 0000000000..f73a7077ea --- /dev/null +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/newlines.py @@ -0,0 +1,36 @@ +def func(): + pass +# fmt: off +x = 1 +# fmt: on + + +# fmt: off +def func(): + pass +# fmt: on +x = 1 + + +# fmt: off +def func(): + pass +# fmt: on +def func(): + pass + + +# fmt: off +def func(): + pass +# fmt: off +def func(): + pass + + +# fmt: on +def func(): + pass +# fmt: on +def func(): + pass diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py new file mode 100644 index 0000000000..0d33408ecb --- /dev/null +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py @@ -0,0 +1,161 @@ +### +# Blank lines around functions +### + +x = 1 + +# comment + +def f(): + pass + + +if True: + x = 1 + +# comment + +def f(): + pass + + +x = 1 + + + +# comment + +def f(): + pass + + +x = 1 + + + +# comment +def f(): + pass + + +x = 1 + +# comment + +# comment +def f(): + pass + +x = 1 + +# comment +# comment + +def f(): + pass + +x = 1 + +# comment +# comment +def f(): + pass + + +x = 1 + + +# comment + + + +# comment + + + +def f(): + pass +# comment + + +def f(): + pass + +# comment + +def f(): + pass + + +# comment + +### +# Blank lines around imports. +### + +def f(): + import x + # comment + import y + + +def f(): + import x + + # comment + import y + + +def f(): + import x + # comment + + import y + + +def f(): + import x + # comment + + + import y + + +def f(): + import x + + + # comment + import y + + +def f(): + import x + + # comment + + import y + + +def f(): + import x # comment + # comment + + import y + + +def f(): pass # comment +# comment + +x = 1 + + +def f(): + pass + + + + +# comment + +x = 1 diff --git a/crates/ruff_python_formatter/src/comments/format.rs b/crates/ruff_python_formatter/src/comments/format.rs index 7be01669e3..62df38c071 100644 --- a/crates/ruff_python_formatter/src/comments/format.rs +++ b/crates/ruff_python_formatter/src/comments/format.rs @@ -1,11 +1,11 @@ use std::borrow::Cow; -use unicode_width::UnicodeWidthChar; -use ruff_text_size::{Ranged, TextLen, TextRange}; +use unicode_width::UnicodeWidthChar; use ruff_formatter::{format_args, write, FormatError, FormatOptions, SourceCode}; use ruff_python_ast::node::{AnyNodeRef, AstNode}; use ruff_python_trivia::{lines_after, lines_after_ignoring_trivia, lines_before}; +use ruff_text_size::{Ranged, TextLen, TextRange}; use crate::comments::{CommentLinePosition, SourceComment}; use crate::context::NodeLevel; @@ -299,10 +299,10 @@ impl Format> for FormatComment<'_> { } } -// Helper that inserts the appropriate number of empty lines before a comment, depending on the node level. -// Top level: Up to two empty lines -// parenthesized: A single empty line -// other: Up to a single empty line +/// Helper that inserts the appropriate number of empty lines before a comment, depending on the node level: +/// - Top-level: Up to two empty lines. +/// - Parenthesized: A single empty line. +/// - Otherwise: Up to a single empty line. pub(crate) const fn empty_lines(lines: u32) -> FormatEmptyLines { FormatEmptyLines { lines } } @@ -475,3 +475,45 @@ fn normalize_comment<'a>( Ok(Cow::Owned(std::format!("# {}", content.trim_start()))) } + +/// Format the empty lines between a node and its trailing comments. +/// +/// For example, given: +/// ```python +/// def func(): +/// ... +/// # comment +/// ``` +/// +/// This builder will insert two empty lines before the comment. +/// ``` +pub(crate) const fn empty_lines_before_trailing_comments( + comments: &[SourceComment], + expected: u32, +) -> FormatEmptyLinesBeforeTrailingComments { + FormatEmptyLinesBeforeTrailingComments { comments, expected } +} + +#[derive(Copy, Clone, Debug)] +pub(crate) struct FormatEmptyLinesBeforeTrailingComments<'a> { + /// The trailing comments of the node. + comments: &'a [SourceComment], + /// The expected number of empty lines before the trailing comments. + expected: u32, +} + +impl Format> for FormatEmptyLinesBeforeTrailingComments<'_> { + fn fmt(&self, f: &mut Formatter) -> FormatResult<()> { + if let Some(comment) = self + .comments + .iter() + .find(|comment| comment.line_position().is_own_line()) + { + let actual = lines_before(comment.start(), f.context().source()).saturating_sub(1); + for _ in actual..self.expected { + write!(f, [empty_line()])?; + } + } + Ok(()) + } +} diff --git a/crates/ruff_python_formatter/src/comments/placement.rs b/crates/ruff_python_formatter/src/comments/placement.rs index 0a50bc0674..1fb7fb7f4c 100644 --- a/crates/ruff_python_formatter/src/comments/placement.rs +++ b/crates/ruff_python_formatter/src/comments/placement.rs @@ -425,7 +425,7 @@ fn handle_own_line_comment_around_body<'a>( return CommentPlacement::Default(comment); }; - // If there's any non-trivia token between the preceding node and the comment, than it means + // If there's any non-trivia token between the preceding node and the comment, then it means // we're past the case of the alternate branch, defer to the default rules // ```python // if a: @@ -446,11 +446,78 @@ fn handle_own_line_comment_around_body<'a>( } // Check if we're between bodies and should attach to the following body. - handle_own_line_comment_between_branches(comment, preceding, locator).or_else(|comment| { - // Otherwise, there's no following branch or the indentation is too deep, so attach to the - // recursively last statement in the preceding body with the matching indentation. - handle_own_line_comment_after_branch(comment, preceding, locator) - }) + handle_own_line_comment_between_branches(comment, preceding, locator) + .or_else(|comment| { + // Otherwise, there's no following branch or the indentation is too deep, so attach to the + // recursively last statement in the preceding body with the matching indentation. + handle_own_line_comment_after_branch(comment, preceding, locator) + }) + .or_else(|comment| handle_own_line_comment_between_statements(comment, locator)) +} + +/// Handles own-line comments between statements. If an own-line comment is between two statements, +/// it's treated as a leading comment of the following statement _if_ there are no empty lines +/// separating the comment and the statement; otherwise, it's treated as a trailing comment of the +/// preceding statement. +/// +/// For example, this comment would be a trailing comment of `x = 1`: +/// ```python +/// x = 1 +/// # comment +/// +/// y = 2 +/// ``` +/// +/// However, this comment would be a leading comment of `y = 2`: +/// ```python +/// x = 1 +/// +/// # comment +/// y = 2 +/// ``` +fn handle_own_line_comment_between_statements<'a>( + comment: DecoratedComment<'a>, + locator: &Locator, +) -> CommentPlacement<'a> { + let Some(preceding) = comment.preceding_node() else { + return CommentPlacement::Default(comment); + }; + + let Some(following) = comment.following_node() else { + return CommentPlacement::Default(comment); + }; + + // We're looking for comments between two statements, like: + // ```python + // x = 1 + // # comment + // y = 2 + // ``` + if !preceding.is_statement() || !following.is_statement() { + return CommentPlacement::Default(comment); + } + + // If the comment is directly attached to the following statement; make it a leading + // comment: + // ```python + // x = 1 + // + // # leading comment + // y = 2 + // ``` + // + // Otherwise, if there's at least one empty line, make it a trailing comment: + // ```python + // x = 1 + // # trailing comment + // + // y = 2 + // ``` + if max_empty_lines(locator.slice(TextRange::new(comment.end(), following.start()))) == 0 { + CommentPlacement::leading(following, comment) + } else { + CommentPlacement::trailing(preceding, comment) + } } /// Handles own line comments between two branches of a node. @@ -1837,6 +1904,7 @@ fn max_empty_lines(contents: &str) -> u32 { } } + max_new_lines = newlines.max(max_new_lines); max_new_lines.saturating_sub(1) } diff --git a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__base_test.snap b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__base_test.snap index 3ace969501..1a8dc9fcd7 100644 --- a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__base_test.snap +++ b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__base_test.snap @@ -16,7 +16,13 @@ expression: comments.debug(test_case.source_code) }, ], "dangling": [], - "trailing": [], + "trailing": [ + SourceComment { + text: "# own line comment", + position: OwnLine, + formatted: false, + }, + ], }, Node { kind: StmtIf, @@ -48,19 +54,4 @@ expression: comments.debug(test_case.source_code) "dangling": [], "trailing": [], }, - Node { - kind: StmtExpr, - range: 234..246, - source: `test(10, 20)`, - }: { - "leading": [ - SourceComment { - text: "# own line comment", - position: OwnLine, - formatted: false, - }, - ], - "dangling": [], - "trailing": [], - }, } diff --git a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__match_cases.snap b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__match_cases.snap index a7056aad31..bc93d702de 100644 --- a/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__match_cases.snap +++ b/crates/ruff_python_formatter/src/comments/snapshots/ruff_python_formatter__comments__tests__match_cases.snap @@ -3,6 +3,21 @@ source: crates/ruff_python_formatter/src/comments/mod.rs expression: comments.debug(test_case.source_code) --- { + Node { + kind: StmtMatch, + range: 27..550, + source: `match pt:⏎`, + }: { + "leading": [], + "dangling": [], + "trailing": [ + SourceComment { + text: "# After match comment", + position: OwnLine, + formatted: false, + }, + ], + }, Node { kind: MatchCase, range: 84..132, @@ -108,19 +123,4 @@ expression: comments.debug(test_case.source_code) }, ], }, - Node { - kind: StmtExpr, - range: 656..670, - source: `print("other")`, - }: { - "leading": [ - SourceComment { - text: "# After match comment", - position: OwnLine, - formatted: false, - }, - ], - "dangling": [], - "trailing": [], - }, } diff --git a/crates/ruff_python_formatter/src/statement/stmt_class_def.rs b/crates/ruff_python_formatter/src/statement/stmt_class_def.rs index 4ac84c26f0..f3c170902a 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_class_def.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_class_def.rs @@ -3,7 +3,9 @@ use ruff_python_ast::{Decorator, StmtClassDef}; use ruff_python_trivia::lines_after_ignoring_trivia; use ruff_text_size::Ranged; +use crate::comments::format::empty_lines_before_trailing_comments; use crate::comments::{leading_comments, trailing_comments, SourceComment}; +use crate::context::NodeLevel; use crate::prelude::*; use crate::statement::clause::{clause_body, clause_header, ClauseHeader}; use crate::statement::suite::SuiteKind; @@ -108,7 +110,33 @@ impl FormatNodeRule for FormatStmtClassDef { ), clause_body(body, trailing_definition_comments).with_kind(SuiteKind::Class), ] + )?; + + // If the class contains trailing comments, insert newlines before them. + // For example, given: + // ```python + // class Class: + // ... + // # comment + // ``` + // + // At the top-level, reformat as: + // ```python + // class Class: + // ... + // + // + // # comment + // ``` + empty_lines_before_trailing_comments( + comments.trailing(item), + if f.context().node_level() == NodeLevel::TopLevel { + 2 + } else { + 1 + }, ) + .fmt(f) } fn fmt_dangling_comments( diff --git a/crates/ruff_python_formatter/src/statement/stmt_function_def.rs b/crates/ruff_python_formatter/src/statement/stmt_function_def.rs index 10c47ca8af..2e6a17fed5 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_function_def.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_function_def.rs @@ -1,9 +1,11 @@ +use crate::comments::format::empty_lines_before_trailing_comments; use ruff_formatter::write; use ruff_python_ast::{Parameters, StmtFunctionDef}; use ruff_python_trivia::{SimpleTokenKind, SimpleTokenizer}; use ruff_text_size::Ranged; use crate::comments::SourceComment; +use crate::context::NodeLevel; use crate::expression::maybe_parenthesize_expression; use crate::expression::parentheses::{Parentheses, Parenthesize}; use crate::prelude::*; @@ -144,7 +146,33 @@ impl FormatNodeRule for FormatStmtFunctionDef { ), clause_body(body, trailing_definition_comments).with_kind(SuiteKind::Function), ] + )?; + + // If the function contains trailing comments, insert newlines before them. + // For example, given: + // ```python + // def func(): + // ... + // # comment + // ``` + // + // At the top-level, reformat as: + // ```python + // def func(): + // ... + // + // + // # comment + // ``` + empty_lines_before_trailing_comments( + comments.trailing(item), + if f.context().node_level() == NodeLevel::TopLevel { + 2 + } else { + 1 + }, ) + .fmt(f) } fn fmt_dangling_comments( diff --git a/crates/ruff_python_formatter/src/statement/suite.rs b/crates/ruff_python_formatter/src/statement/suite.rs index 6d1595b5e5..6adbe658ca 100644 --- a/crates/ruff_python_formatter/src/statement/suite.rs +++ b/crates/ruff_python_formatter/src/statement/suite.rs @@ -2,7 +2,7 @@ use ruff_formatter::{write, FormatOwnedWithRule, FormatRefWithRule, FormatRuleWi use ruff_python_ast::helpers::is_compound_statement; use ruff_python_ast::node::AnyNodeRef; use ruff_python_ast::{self as ast, Constant, Expr, ExprConstant, Stmt, Suite}; -use ruff_python_trivia::{lines_after_ignoring_trivia, lines_before}; +use ruff_python_trivia::{lines_after, lines_after_ignoring_trivia, lines_before}; use ruff_text_size::{Ranged, TextRange}; use crate::comments::{leading_comments, trailing_comments, Comments}; @@ -143,7 +143,11 @@ impl FormatRule> for FormatSuite { }; while let Some(following) = iter.next() { - if is_class_or_function_definition(preceding) + // Add empty lines before and after a function or class definition. If the preceding + // node is a function or class, and contains trailing comments, then the statement + // itself will add the requisite empty lines when formatting its comments. + if (is_class_or_function_definition(preceding) + && !comments.has_trailing_own_line(preceding)) || is_class_or_function_definition(following) { match self.kind { @@ -191,9 +195,13 @@ impl FormatRule> for FormatSuite { empty_line().fmt(f)?; } } - } else if is_import_definition(preceding) && !is_import_definition(following) { + } else if is_import_definition(preceding) + && (!is_import_definition(following) || comments.has_leading(following)) + { // Enforce _at least_ one empty line after an import statement (but allow up to - // two at the top-level). + // two at the top-level). In this context, "after an import statement" means that + // that the previous node is an import, and the following node is an import _or_ has + // a leading comment. match self.kind { SuiteKind::TopLevel => { match lines_after_ignoring_trivia(preceding.end(), source) { @@ -274,16 +282,21 @@ impl FormatRule> for FormatSuite { // it then counts the lines between the statement and the trailing comment, which is // always 0. This is why it skips any trailing trivia (trivia that's on the same line) // and counts the lines after. - lines_after_ignoring_trivia(offset, source) + lines_after(offset, source) }; + let end = comments + .trailing(preceding) + .last() + .map_or(preceding.end(), |comment| comment.slice().end()); + match node_level { - NodeLevel::TopLevel => match count_lines(preceding.end()) { + NodeLevel::TopLevel => match count_lines(end) { 0 | 1 => hard_line_break().fmt(f)?, 2 => empty_line().fmt(f)?, _ => write!(f, [empty_line(), empty_line()])?, }, - NodeLevel::CompoundStatement => match count_lines(preceding.end()) { + NodeLevel::CompoundStatement => match count_lines(end) { 0 | 1 => hard_line_break().fmt(f)?, _ => empty_line().fmt(f)?, }, diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@miscellaneous__decorators.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@miscellaneous__decorators.py.snap index 7793a98149..e864b93275 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@miscellaneous__decorators.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@miscellaneous__decorators.py.snap @@ -162,7 +162,7 @@ def f(): ```diff --- Black +++ Ruff -@@ -1,29 +1,182 @@ +@@ -1,29 +1,205 @@ +# This file doesn't use the standard decomposition. +# Decorator syntax test cases are separated by double # comments. +# Those before the 'output' comment are valid under the old syntax. @@ -179,6 +179,7 @@ def f(): + +## + ++ +@decorator() +def f(): + ... @@ -186,6 +187,7 @@ def f(): + +## + ++ +@decorator(arg) +def f(): + ... @@ -193,6 +195,7 @@ def f(): + +## + ++ +@decorator(kwarg=0) +def f(): + ... @@ -200,49 +203,50 @@ def f(): + +## + ++ +@decorator(*args) +def f(): + ... + + - ## - --@decorator()() ++## ++ ++ +@decorator(**kwargs) - def f(): - ... - ++def f(): ++ ... ++ ++ ++## ++ + - ## - --@(decorator) +@decorator(*args, **kwargs) - def f(): - ... - ++def f(): ++ ... ++ ++ ++## ++ + - ## - --@sequence["decorator"] +@decorator( + *args, + **kwargs, +) - def f(): - ... - ++def f(): ++ ... ++ ++ ++## ++ + - ## - --@decorator[List[str]] +@dotted.decorator - def f(): - ... - ++def f(): ++ ... ++ ++ ++## ++ + - ## - --@var := decorator +@dotted.decorator(arg) +def f(): + ... @@ -250,43 +254,54 @@ def f(): + +## + ++ +@dotted.decorator(kwarg=0) +def f(): + ... + + -+## + ## + +-@decorator()() + +@dotted.decorator(*args) -+def f(): -+ ... + def f(): + ... + + -+ -+## + ## + +-@(decorator) + +@dotted.decorator(**kwargs) -+def f(): -+ ... + def f(): + ... + + -+ -+## + ## + +-@sequence["decorator"] + +@dotted.decorator(*args, **kwargs) -+def f(): -+ ... + def f(): + ... + + -+ -+## + ## + +-@decorator[List[str]] + +@dotted.decorator( + *args, + **kwargs, +) -+def f(): -+ ... + def f(): + ... + + -+ -+## + ## + +-@var := decorator + +@double.dotted.decorator +def f(): @@ -295,6 +310,7 @@ def f(): + +## + ++ +@double.dotted.decorator(arg) +def f(): + ... @@ -302,6 +318,7 @@ def f(): + +## + ++ +@double.dotted.decorator(kwarg=0) +def f(): + ... @@ -309,6 +326,7 @@ def f(): + +## + ++ +@double.dotted.decorator(*args) +def f(): + ... @@ -316,6 +334,7 @@ def f(): + +## + ++ +@double.dotted.decorator(**kwargs) +def f(): + ... @@ -323,6 +342,7 @@ def f(): + +## + ++ +@double.dotted.decorator(*args, **kwargs) +def f(): + ... @@ -330,6 +350,7 @@ def f(): + +## + ++ +@double.dotted.decorator( + *args, + **kwargs, @@ -340,6 +361,7 @@ def f(): + +## + ++ +@_(sequence["decorator"]) +def f(): + ... @@ -347,6 +369,7 @@ def f(): + +## + ++ +@eval("sequence['decorator']") def f(): ... @@ -371,6 +394,7 @@ def f(): ## + @decorator() def f(): ... @@ -378,6 +402,7 @@ def f(): ## + @decorator(arg) def f(): ... @@ -385,6 +410,7 @@ def f(): ## + @decorator(kwarg=0) def f(): ... @@ -392,6 +418,7 @@ def f(): ## + @decorator(*args) def f(): ... @@ -399,6 +426,7 @@ def f(): ## + @decorator(**kwargs) def f(): ... @@ -406,6 +434,7 @@ def f(): ## + @decorator(*args, **kwargs) def f(): ... @@ -413,6 +442,7 @@ def f(): ## + @decorator( *args, **kwargs, @@ -423,6 +453,7 @@ def f(): ## + @dotted.decorator def f(): ... @@ -430,6 +461,7 @@ def f(): ## + @dotted.decorator(arg) def f(): ... @@ -437,6 +469,7 @@ def f(): ## + @dotted.decorator(kwarg=0) def f(): ... @@ -444,6 +477,7 @@ def f(): ## + @dotted.decorator(*args) def f(): ... @@ -451,6 +485,7 @@ def f(): ## + @dotted.decorator(**kwargs) def f(): ... @@ -458,6 +493,7 @@ def f(): ## + @dotted.decorator(*args, **kwargs) def f(): ... @@ -465,6 +501,7 @@ def f(): ## + @dotted.decorator( *args, **kwargs, @@ -475,6 +512,7 @@ def f(): ## + @double.dotted.decorator def f(): ... @@ -482,6 +520,7 @@ def f(): ## + @double.dotted.decorator(arg) def f(): ... @@ -489,6 +528,7 @@ def f(): ## + @double.dotted.decorator(kwarg=0) def f(): ... @@ -496,6 +536,7 @@ def f(): ## + @double.dotted.decorator(*args) def f(): ... @@ -503,6 +544,7 @@ def f(): ## + @double.dotted.decorator(**kwargs) def f(): ... @@ -510,6 +552,7 @@ def f(): ## + @double.dotted.decorator(*args, **kwargs) def f(): ... @@ -517,6 +560,7 @@ def f(): ## + @double.dotted.decorator( *args, **kwargs, @@ -527,6 +571,7 @@ def f(): ## + @_(sequence["decorator"]) def f(): ... @@ -534,6 +579,7 @@ def f(): ## + @eval("sequence['decorator']") def f(): ... diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__empty_lines.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__empty_lines.py.snap deleted file mode 100644 index 72e8d2306d..0000000000 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__empty_lines.py.snap +++ /dev/null @@ -1,304 +0,0 @@ ---- -source: crates/ruff_python_formatter/tests/fixtures.rs -input_file: crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/empty_lines.py ---- -## Input - -```py -"""Docstring.""" - - -# leading comment -def f(): - NO = '' - SPACE = ' ' - DOUBLESPACE = ' ' - - t = leaf.type - p = leaf.parent # trailing comment - v = leaf.value - - if t in ALWAYS_NO_SPACE: - pass - if t == token.COMMENT: # another trailing comment - return DOUBLESPACE - - - assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" - - - prev = leaf.prev_sibling - if not prev: - prevp = preceding_leaf(p) - if not prevp or prevp.type in OPENING_BRACKETS: - - - return NO - - - if prevp.type == token.EQUAL: - if prevp.parent and prevp.parent.type in { - syms.typedargslist, - syms.varargslist, - syms.parameters, - syms.arglist, - syms.argument, - }: - return NO - - elif prevp.type == token.DOUBLESTAR: - if prevp.parent and prevp.parent.type in { - syms.typedargslist, - syms.varargslist, - syms.parameters, - syms.arglist, - syms.dictsetmaker, - }: - return NO - -############################################################################### -# SECTION BECAUSE SECTIONS -############################################################################### - -def g(): - NO = '' - SPACE = ' ' - DOUBLESPACE = ' ' - - t = leaf.type - p = leaf.parent - v = leaf.value - - # Comment because comments - - if t in ALWAYS_NO_SPACE: - pass - if t == token.COMMENT: - return DOUBLESPACE - - # Another comment because more comments - assert p is not None, f'INTERNAL ERROR: hand-made leaf without parent: {leaf!r}' - - prev = leaf.prev_sibling - if not prev: - prevp = preceding_leaf(p) - - if not prevp or prevp.type in OPENING_BRACKETS: - # Start of the line or a bracketed expression. - # More than one line for the comment. - return NO - - if prevp.type == token.EQUAL: - if prevp.parent and prevp.parent.type in { - syms.typedargslist, - syms.varargslist, - syms.parameters, - syms.arglist, - syms.argument, - }: - return NO -``` - -## Black Differences - -```diff ---- Black -+++ Ruff -@@ -49,7 +49,6 @@ - # SECTION BECAUSE SECTIONS - ############################################################################### - -- - def g(): - NO = "" - SPACE = " " -``` - -## Ruff Output - -```py -"""Docstring.""" - - -# leading comment -def f(): - NO = "" - SPACE = " " - DOUBLESPACE = " " - - t = leaf.type - p = leaf.parent # trailing comment - v = leaf.value - - if t in ALWAYS_NO_SPACE: - pass - if t == token.COMMENT: # another trailing comment - return DOUBLESPACE - - assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" - - prev = leaf.prev_sibling - if not prev: - prevp = preceding_leaf(p) - if not prevp or prevp.type in OPENING_BRACKETS: - return NO - - if prevp.type == token.EQUAL: - if prevp.parent and prevp.parent.type in { - syms.typedargslist, - syms.varargslist, - syms.parameters, - syms.arglist, - syms.argument, - }: - return NO - - elif prevp.type == token.DOUBLESTAR: - if prevp.parent and prevp.parent.type in { - syms.typedargslist, - syms.varargslist, - syms.parameters, - syms.arglist, - syms.dictsetmaker, - }: - return NO - - -############################################################################### -# SECTION BECAUSE SECTIONS -############################################################################### - -def g(): - NO = "" - SPACE = " " - DOUBLESPACE = " " - - t = leaf.type - p = leaf.parent - v = leaf.value - - # Comment because comments - - if t in ALWAYS_NO_SPACE: - pass - if t == token.COMMENT: - return DOUBLESPACE - - # Another comment because more comments - assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" - - prev = leaf.prev_sibling - if not prev: - prevp = preceding_leaf(p) - - if not prevp or prevp.type in OPENING_BRACKETS: - # Start of the line or a bracketed expression. - # More than one line for the comment. - return NO - - if prevp.type == token.EQUAL: - if prevp.parent and prevp.parent.type in { - syms.typedargslist, - syms.varargslist, - syms.parameters, - syms.arglist, - syms.argument, - }: - return NO -``` - -## Black Output - -```py -"""Docstring.""" - - -# leading comment -def f(): - NO = "" - SPACE = " " - DOUBLESPACE = " " - - t = leaf.type - p = leaf.parent # trailing comment - v = leaf.value - - if t in ALWAYS_NO_SPACE: - pass - if t == token.COMMENT: # another trailing comment - return DOUBLESPACE - - assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" - - prev = leaf.prev_sibling - if not prev: - prevp = preceding_leaf(p) - if not prevp or prevp.type in OPENING_BRACKETS: - return NO - - if prevp.type == token.EQUAL: - if prevp.parent and prevp.parent.type in { - syms.typedargslist, - syms.varargslist, - syms.parameters, - syms.arglist, - syms.argument, - }: - return NO - - elif prevp.type == token.DOUBLESTAR: - if prevp.parent and prevp.parent.type in { - syms.typedargslist, - syms.varargslist, - syms.parameters, - syms.arglist, - syms.dictsetmaker, - }: - return NO - - -############################################################################### -# SECTION BECAUSE SECTIONS -############################################################################### - - -def g(): - NO = "" - SPACE = " " - DOUBLESPACE = " " - - t = leaf.type - p = leaf.parent - v = leaf.value - - # Comment because comments - - if t in ALWAYS_NO_SPACE: - pass - if t == token.COMMENT: - return DOUBLESPACE - - # Another comment because more comments - assert p is not None, f"INTERNAL ERROR: hand-made leaf without parent: {leaf!r}" - - prev = leaf.prev_sibling - if not prev: - prevp = preceding_leaf(p) - - if not prevp or prevp.type in OPENING_BRACKETS: - # Start of the line or a bracketed expression. - # More than one line for the comment. - return NO - - if prevp.type == token.EQUAL: - if prevp.parent and prevp.parent.type in { - syms.typedargslist, - syms.varargslist, - syms.parameters, - syms.arglist, - syms.argument, - }: - return NO -``` - - diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtonoff.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtonoff.py.snap index 91f218dcb2..ce417c728b 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtonoff.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtonoff.py.snap @@ -198,7 +198,15 @@ d={'a':1, ```diff --- Black +++ Ruff -@@ -63,15 +63,15 @@ +@@ -5,6 +5,7 @@ + from third_party import X, Y, Z + + from library import some_connection, some_decorator ++ + # fmt: off + from third_party import (X, + Y, Z) +@@ -63,15 +64,15 @@ something = { # fmt: off @@ -217,7 +225,7 @@ d={'a':1, # fmt: on goes + here, andhere, -@@ -122,8 +122,10 @@ +@@ -122,8 +123,10 @@ """ # fmt: off @@ -229,7 +237,7 @@ d={'a':1, # fmt: on pass -@@ -138,7 +140,7 @@ +@@ -138,7 +141,7 @@ now . considers . multiple . fmt . directives . within . one . prefix # fmt: on # fmt: off @@ -238,7 +246,7 @@ d={'a':1, # fmt: on -@@ -178,14 +180,18 @@ +@@ -178,14 +181,18 @@ $ """, # fmt: off @@ -271,6 +279,7 @@ import sys from third_party import X, Y, Z from library import some_connection, some_decorator + # fmt: off from third_party import (X, Y, Z) diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtonoff5.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtonoff5.py.snap index b28415f3ac..a3b86b9e60 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtonoff5.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtonoff5.py.snap @@ -110,15 +110,7 @@ elif unformatted: }, ) -@@ -74,7 +73,6 @@ - class Factory(t.Protocol): - def this_will_be_formatted(self, **kwargs) -> Named: - ... -- - # fmt: on - - -@@ -82,6 +80,6 @@ +@@ -82,6 +81,6 @@ if x: return x # fmt: off @@ -206,6 +198,7 @@ class Named(t.Protocol): class Factory(t.Protocol): def this_will_be_formatted(self, **kwargs) -> Named: ... + # fmt: on diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtpass_imports.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtpass_imports.py.snap new file mode 100644 index 0000000000..7d2474337a --- /dev/null +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__fmtpass_imports.py.snap @@ -0,0 +1,93 @@ +--- +source: crates/ruff_python_formatter/tests/fixtures.rs +input_file: crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/fmtpass_imports.py +--- +## Input + +```py +# Regression test for https://github.com/psf/black/issues/3438 + +import ast +import collections # fmt: skip +import dataclasses +# fmt: off +import os +# fmt: on +import pathlib + +import re # fmt: skip +import secrets + +# fmt: off +import sys +# fmt: on + +import tempfile +import zoneinfo +``` + +## Black Differences + +```diff +--- Black ++++ Ruff +@@ -3,6 +3,7 @@ + import ast + import collections # fmt: skip + import dataclasses ++ + # fmt: off + import os + # fmt: on +``` + +## Ruff Output + +```py +# Regression test for https://github.com/psf/black/issues/3438 + +import ast +import collections # fmt: skip +import dataclasses + +# fmt: off +import os +# fmt: on +import pathlib + +import re # fmt: skip +import secrets + +# fmt: off +import sys +# fmt: on + +import tempfile +import zoneinfo +``` + +## Black Output + +```py +# Regression test for https://github.com/psf/black/issues/3438 + +import ast +import collections # fmt: skip +import dataclasses +# fmt: off +import os +# fmt: on +import pathlib + +import re # fmt: skip +import secrets + +# fmt: off +import sys +# fmt: on + +import tempfile +import zoneinfo +``` + + diff --git a/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__indent.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__indent.py.snap index d373b18048..19473a713c 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__indent.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__indent.py.snap @@ -4,61 +4,6 @@ input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off --- ## Input ```py -def test(): - # fmt: off - a_very_small_indent - ( -not_fixed - ) - - if True: - pass - more - # fmt: on - - formatted - - def test(): - a_small_indent - # fmt: off -# fix under-indented comments - (or_the_inner_expression + -expressions - ) - - if True: - pass - # fmt: on - - -# fmt: off -def test(): - pass - - # It is necessary to indent comments because the following fmt: on comment because it otherwise becomes a trailing comment - # of the `test` function if the "proper" indentation is larger than 2 spaces. - # fmt: on - -disabled + formatting; - -# fmt: on - -formatted; - -def test(): - pass - # fmt: off - """A multiline strings - that should not get formatted""" - - "A single quoted multiline \ - string" - - disabled + formatting; - -# fmt: on - -formatted; ``` ## Outputs @@ -72,63 +17,6 @@ magic-trailing-comma = Respect ``` ```py -def test(): - # fmt: off - a_very_small_indent - ( -not_fixed - ) - - if True: - pass - more - # fmt: on - - formatted - - def test(): - a_small_indent - # fmt: off - # fix under-indented comments - (or_the_inner_expression + -expressions - ) - - if True: - pass - # fmt: on - - -# fmt: off -def test(): - pass - - # It is necessary to indent comments because the following fmt: on comment because it otherwise becomes a trailing comment - # of the `test` function if the "proper" indentation is larger than 2 spaces. - # fmt: on - -disabled + formatting; - -# fmt: on - -formatted - - -def test(): - pass - # fmt: off - """A multiline strings - that should not get formatted""" - - "A single quoted multiline \ - string" - - disabled + formatting - - -# fmt: on - -formatted ``` @@ -142,63 +30,6 @@ magic-trailing-comma = Respect ``` ```py -def test(): - # fmt: off - a_very_small_indent - ( -not_fixed - ) - - if True: - pass - more - # fmt: on - - formatted - - def test(): - a_small_indent - # fmt: off - # fix under-indented comments - (or_the_inner_expression + -expressions - ) - - if True: - pass - # fmt: on - - -# fmt: off -def test(): - pass - - # It is necessary to indent comments because the following fmt: on comment because it otherwise becomes a trailing comment - # of the `test` function if the "proper" indentation is larger than 2 spaces. - # fmt: on - -disabled + formatting; - -# fmt: on - -formatted - - -def test(): - pass - # fmt: off - """A multiline strings - that should not get formatted""" - - "A single quoted multiline \ - string" - - disabled + formatting - - -# fmt: on - -formatted ``` @@ -212,63 +43,6 @@ magic-trailing-comma = Respect ``` ```py -def test(): - # fmt: off - a_very_small_indent - ( -not_fixed - ) - - if True: - pass - more - # fmt: on - - formatted - - def test(): - a_small_indent - # fmt: off - # fix under-indented comments - (or_the_inner_expression + -expressions - ) - - if True: - pass - # fmt: on - - -# fmt: off -def test(): - pass - - # It is necessary to indent comments because the following fmt: on comment because it otherwise becomes a trailing comment - # of the `test` function if the "proper" indentation is larger than 2 spaces. - # fmt: on - -disabled + formatting; - -# fmt: on - -formatted - - -def test(): - pass - # fmt: off - """A multiline strings - that should not get formatted""" - - "A single quoted multiline \ - string" - - disabled + formatting - - -# fmt: on - -formatted ``` diff --git a/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__mixed_space_and_tab.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__mixed_space_and_tab.py.snap index 8bc61fd6cb..29abee744e 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__mixed_space_and_tab.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__mixed_space_and_tab.py.snap @@ -45,6 +45,8 @@ not_fixed more else: other + + # fmt: on ``` @@ -72,6 +74,8 @@ not_fixed more else: other + + # fmt: on ``` @@ -99,6 +103,8 @@ not_fixed more else: other + + # fmt: on ``` diff --git a/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__newlines.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__newlines.py.snap new file mode 100644 index 0000000000..d7041c2e79 --- /dev/null +++ b/crates/ruff_python_formatter/tests/snapshots/format@fmt_on_off__newlines.py.snap @@ -0,0 +1,90 @@ +--- +source: crates/ruff_python_formatter/tests/fixtures.rs +input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/fmt_on_off/newlines.py +--- +## Input +```py +def func(): + pass +# fmt: off +x = 1 +# fmt: on + + +# fmt: off +def func(): + pass +# fmt: on +x = 1 + + +# fmt: off +def func(): + pass +# fmt: on +def func(): + pass + + +# fmt: off +def func(): + pass +# fmt: off +def func(): + pass + + +# fmt: on +def func(): + pass +# fmt: on +def func(): + pass +``` + +## Output +```py +def func(): + pass + + +# fmt: off +x = 1 +# fmt: on + + +# fmt: off +def func(): + pass +# fmt: on +x = 1 + + +# fmt: off +def func(): + pass +# fmt: on +def func(): + pass + + +# fmt: off +def func(): + pass +# fmt: off +def func(): + pass + + +# fmt: on +def func(): + pass + + +# fmt: on +def func(): + pass +``` + + + diff --git a/crates/ruff_python_formatter/tests/snapshots/format@newlines.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@newlines.py.snap new file mode 100644 index 0000000000..654d55dbb9 --- /dev/null +++ b/crates/ruff_python_formatter/tests/snapshots/format@newlines.py.snap @@ -0,0 +1,345 @@ +--- +source: crates/ruff_python_formatter/tests/fixtures.rs +input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py +--- +## Input +```py +### +# Blank lines around functions +### + +x = 1 + +# comment + +def f(): + pass + + +if True: + x = 1 + +# comment + +def f(): + pass + + +x = 1 + + + +# comment + +def f(): + pass + + +x = 1 + + + +# comment +def f(): + pass + + +x = 1 + +# comment + +# comment +def f(): + pass + +x = 1 + +# comment +# comment + +def f(): + pass + +x = 1 + +# comment +# comment +def f(): + pass + + +x = 1 + + +# comment + + + +# comment + + + +def f(): + pass +# comment + + +def f(): + pass + +# comment + +def f(): + pass + + +# comment + +### +# Blank lines around imports. +### + +def f(): + import x + # comment + import y + + +def f(): + import x + + # comment + import y + + +def f(): + import x + # comment + + import y + + +def f(): + import x + # comment + + + import y + + +def f(): + import x + + + # comment + import y + + +def f(): + import x + + # comment + + import y + + +def f(): + import x # comment + # comment + + import y + + +def f(): pass # comment +# comment + +x = 1 + + +def f(): + pass + + + + +# comment + +x = 1 +``` + +## Output +```py +### +# Blank lines around functions +### + +x = 1 + +# comment + + +def f(): + pass + + +if True: + x = 1 + +# comment + + +def f(): + pass + + +x = 1 + + +# comment + + +def f(): + pass + + +x = 1 + + +# comment +def f(): + pass + + +x = 1 + +# comment + + +# comment +def f(): + pass + + +x = 1 + +# comment +# comment + + +def f(): + pass + + +x = 1 + + +# comment +# comment +def f(): + pass + + +x = 1 + + +# comment + + +# comment + + +def f(): + pass + + +# comment + + +def f(): + pass + + +# comment + + +def f(): + pass + + +# comment + +### +# Blank lines around imports. +### + + +def f(): + import x + + # comment + import y + + +def f(): + import x + + # comment + import y + + +def f(): + import x + # comment + + import y + + +def f(): + import x + # comment + + import y + + +def f(): + import x + + # comment + import y + + +def f(): + import x + + # comment + + import y + + +def f(): + import x # comment + # comment + + import y + + +def f(): + pass # comment + + +# comment + +x = 1 + + +def f(): + pass + + +# comment + +x = 1 +``` + + + diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__assert.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__assert.py.snap index 2db923a1df..534b604e8a 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__assert.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__assert.py.snap @@ -191,10 +191,9 @@ assert ( # Trailing test value own-line # Test dangler ), "Some string" # Trailing msg same-line - - # Trailing assert + def test(): assert ( { diff --git a/crates/ruff_python_formatter/tests/snapshots/format@statement__function.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@statement__function.py.snap index d801c863eb..d5ebcab226 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@statement__function.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@statement__function.py.snap @@ -406,6 +406,7 @@ def test( ### Different function argument wrappings + def single_line(aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbb, ccccccccccccccccc): pass @@ -511,6 +512,7 @@ def type_param_comments[ # trailing bracket comment # Different type parameter wrappings + def single_line[Aaaaaaaaaaaaaaaaaaaaaaaaaaaaa, Bbbbbbbbbbbbbbb, Ccccccccccccccccc](): pass From 17a44c0078d34c135772accc3fca6f2ed26cd494 Mon Sep 17 00:00:00 2001 From: Chris Pryer <14341145+cnpryer@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:34:51 -0400 Subject: [PATCH 020/164] Exclude pragma comments from measured line width (#7008) Co-authored-by: Micha Reiser --- .../test/fixtures/ruff/trailing_comments.py | 31 ++- .../src/comments/format.rs | 51 ++-- ...patibility@simple_cases__comments6.py.snap | 11 +- ...atibility@simple_cases__expression.py.snap | 15 +- ...ity@simple_cases__power_op_spacing.py.snap | 232 ------------------ ...ompatibility@simple_cases__torture.py.snap | 15 +- .../format@trailing_comments.py.snap | 66 ++++- 7 files changed, 131 insertions(+), 290 deletions(-) delete mode 100644 crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__power_op_spacing.py.snap diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_comments.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_comments.py index 5bfe148cf5..86c33a0f4e 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_comments.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_comments.py @@ -1,6 +1,29 @@ +# Pragma reserved width fixtures +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # type: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pyright: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pylint: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # nocoverage: This should break + + +# Pragma fixtures for non-breaking space (lead by NBSP) +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # type: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pyright: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pylint: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # nocoverage: This should break + + # As of adding this fixture Black adds a space before the non-breaking space if part of a type pragma. # https://github.com/psf/black/blob/b4dca26c7d93f930bbd5a7b552807370b60d4298/src/black/comments.py#L122-L129 -i2 = "" #  type: Add space before leading NBSP followed by spaces -i3 = "" #type: A space is added -i4 = "" #  type: Add space before leading NBSP followed by a space -i5 = "" # type: Add space before leading NBSP +i = "" #  type: Add space before leading NBSP followed by spaces +i = "" #type: A space is added +i = "" #  type: Add space before leading NBSP followed by a space +i = "" # type: Add space before leading NBSP +i = "" #  type: Add space before two leading NBSP + + +# A noqa as `#\u{A0}\u{A0}noqa` becomes `# \u{A0}noqa` +i = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" #  noqa diff --git a/crates/ruff_python_formatter/src/comments/format.rs b/crates/ruff_python_formatter/src/comments/format.rs index 62df38c071..e682924284 100644 --- a/crates/ruff_python_formatter/src/comments/format.rs +++ b/crates/ruff_python_formatter/src/comments/format.rs @@ -357,17 +357,33 @@ impl Format> for FormatTrailingEndOfLineComment<'_> { let normalized_comment = normalize_comment(self.comment, source)?; - // Start with 2 because of the two leading spaces. - let mut reserved_width = 2; + // Trim the normalized comment to detect excluded pragmas (strips NBSP). + let trimmed = strip_comment_prefix(&normalized_comment)?.trim_start(); - // SAFE: The formatted file is <= 4GB, and each comment should as well. - #[allow(clippy::cast_possible_truncation)] - for c in normalized_comment.chars() { - reserved_width += match c { - '\t' => f.options().tab_width().value(), - c => c.width().unwrap_or(0) as u32, + let is_pragma = if let Some((maybe_pragma, _)) = trimmed.split_once(':') { + matches!(maybe_pragma, "noqa" | "type" | "pyright" | "pylint") + } else { + trimmed.starts_with("noqa") + }; + + // Don't reserve width for excluded pragma comments. + let reserved_width = if is_pragma { + 0 + } else { + // Start with 2 because of the two leading spaces. + let mut width = 2; + + // SAFETY: The formatted file is <= 4GB, and each comment should as well. + #[allow(clippy::cast_possible_truncation)] + for c in normalized_comment.chars() { + width += match c { + '\t' => f.options().tab_width().value(), + c => c.width().unwrap_or(0) as u32, + } } - } + + width + }; write!( f, @@ -442,11 +458,7 @@ fn normalize_comment<'a>( let trimmed = comment_text.trim_end(); - let Some(content) = trimmed.strip_prefix('#') else { - return Err(FormatError::syntax_error( - "Didn't find expected comment token `#`", - )); - }; + let content = strip_comment_prefix(trimmed)?; if content.is_empty() { return Ok(Cow::Borrowed("#")); @@ -476,6 +488,17 @@ fn normalize_comment<'a>( Ok(Cow::Owned(std::format!("# {}", content.trim_start()))) } +/// A helper for stripping '#' from comments. +fn strip_comment_prefix(comment_text: &str) -> FormatResult<&str> { + let Some(content) = comment_text.strip_prefix('#') else { + return Err(FormatError::syntax_error( + "Didn't find expected comment token `#`", + )); + }; + + Ok(content) +} + /// Format the empty lines between a node and its trailing comments. /// /// For example, given: diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__comments6.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__comments6.py.snap index f48ec014b3..6725d8d840 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__comments6.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__comments6.py.snap @@ -156,7 +156,7 @@ aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*ite ) -@@ -108,11 +112,20 @@ +@@ -108,11 +112,18 @@ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ) @@ -176,10 +176,7 @@ aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*ite + ], # type: ignore ) --aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*items))) # type: ignore[arg-type] -+aaaaaaaaaaaaa, bbbbbbbbb = map( -+ list, map(itertools.chain.from_iterable, zip(*items)) -+) # type: ignore[arg-type] + aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*items))) # type: ignore[arg-type] ``` ## Ruff Output @@ -313,9 +310,7 @@ call_to_some_function_asdf( ], # type: ignore ) -aaaaaaaaaaaaa, bbbbbbbbb = map( - list, map(itertools.chain.from_iterable, zip(*items)) -) # type: ignore[arg-type] +aaaaaaaaaaaaa, bbbbbbbbb = map(list, map(itertools.chain.from_iterable, zip(*items))) # type: ignore[arg-type] ``` ## Black Output diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap index d8e7464160..0ee2ffdceb 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__expression.py.snap @@ -300,17 +300,6 @@ last_call() ) # note: no trailing comma pre-3.6 call(*gidgets[:2]) call(a, *gidgets[:2]) -@@ -142,7 +143,9 @@ - xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( # type: ignore - sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__) - ) --xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( # type: ignore -+xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[ -+ ..., List[SomeClass] -+] = classmethod( # type: ignore - sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__) - ) - xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( ``` ## Ruff Output @@ -461,9 +450,7 @@ very_long_variable_name_filters: t.List[ xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( # type: ignore sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__) ) -xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[ - ..., List[SomeClass] -] = classmethod( # type: ignore +xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( # type: ignore sync(async_xxxx_xxx_xxxx_xxxxx_xxxx_xxx.__func__) ) xxxx_xxx_xxxx_xxxxx_xxxx_xxx: Callable[..., List[SomeClass]] = classmethod( diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__power_op_spacing.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__power_op_spacing.py.snap deleted file mode 100644 index de37c70486..0000000000 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__power_op_spacing.py.snap +++ /dev/null @@ -1,232 +0,0 @@ ---- -source: crates/ruff_python_formatter/tests/fixtures.rs -input_file: crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/power_op_spacing.py ---- -## Input - -```py -def function(**kwargs): - t = a**2 + b**3 - return t ** 2 - - -def function_replace_spaces(**kwargs): - t = a **2 + b** 3 + c ** 4 - - -def function_dont_replace_spaces(): - {**a, **b, **c} - - -a = 5**~4 -b = 5 ** f() -c = -(5**2) -d = 5 ** f["hi"] -e = lazy(lambda **kwargs: 5) -f = f() ** 5 -g = a.b**c.d -h = 5 ** funcs.f() -i = funcs.f() ** 5 -j = super().name ** 5 -k = [(2**idx, value) for idx, value in pairs] -l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) -m = [([2**63], [1, 2**63])] -n = count <= 10**5 -o = settings(max_examples=10**6) -p = {(k, k**2): v**2 for k, v in pairs} -q = [10**i for i in range(6)] -r = x**y - -a = 5.0**~4.0 -b = 5.0 ** f() -c = -(5.0**2.0) -d = 5.0 ** f["hi"] -e = lazy(lambda **kwargs: 5) -f = f() ** 5.0 -g = a.b**c.d -h = 5.0 ** funcs.f() -i = funcs.f() ** 5.0 -j = super().name ** 5.0 -k = [(2.0**idx, value) for idx, value in pairs] -l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) -m = [([2.0**63.0], [1.0, 2**63.0])] -n = count <= 10**5.0 -o = settings(max_examples=10**6.0) -p = {(k, k**2): v**2.0 for k, v in pairs} -q = [10.5**i for i in range(6)] - - -# WE SHOULD DEFINITELY NOT EAT THESE COMMENTS (https://github.com/psf/black/issues/2873) -if hasattr(view, "sum_of_weights"): - return np.divide( # type: ignore[no-any-return] - view.variance, # type: ignore[union-attr] - view.sum_of_weights, # type: ignore[union-attr] - out=np.full(view.sum_of_weights.shape, np.nan), # type: ignore[union-attr] - where=view.sum_of_weights**2 > view.sum_of_weights_squared, # type: ignore[union-attr] - ) - -return np.divide( - where=view.sum_of_weights_of_weight_long**2 > view.sum_of_weights_squared, # type: ignore -) -``` - -## Black Differences - -```diff ---- Black -+++ Ruff -@@ -55,9 +55,11 @@ - view.variance, # type: ignore[union-attr] - view.sum_of_weights, # type: ignore[union-attr] - out=np.full(view.sum_of_weights.shape, np.nan), # type: ignore[union-attr] -- where=view.sum_of_weights**2 > view.sum_of_weights_squared, # type: ignore[union-attr] -+ where=view.sum_of_weights**2 -+ > view.sum_of_weights_squared, # type: ignore[union-attr] - ) - - return np.divide( -- where=view.sum_of_weights_of_weight_long**2 > view.sum_of_weights_squared, # type: ignore -+ where=view.sum_of_weights_of_weight_long**2 -+ > view.sum_of_weights_squared, # type: ignore - ) -``` - -## Ruff Output - -```py -def function(**kwargs): - t = a**2 + b**3 - return t**2 - - -def function_replace_spaces(**kwargs): - t = a**2 + b**3 + c**4 - - -def function_dont_replace_spaces(): - {**a, **b, **c} - - -a = 5**~4 -b = 5 ** f() -c = -(5**2) -d = 5 ** f["hi"] -e = lazy(lambda **kwargs: 5) -f = f() ** 5 -g = a.b**c.d -h = 5 ** funcs.f() -i = funcs.f() ** 5 -j = super().name ** 5 -k = [(2**idx, value) for idx, value in pairs] -l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) -m = [([2**63], [1, 2**63])] -n = count <= 10**5 -o = settings(max_examples=10**6) -p = {(k, k**2): v**2 for k, v in pairs} -q = [10**i for i in range(6)] -r = x**y - -a = 5.0**~4.0 -b = 5.0 ** f() -c = -(5.0**2.0) -d = 5.0 ** f["hi"] -e = lazy(lambda **kwargs: 5) -f = f() ** 5.0 -g = a.b**c.d -h = 5.0 ** funcs.f() -i = funcs.f() ** 5.0 -j = super().name ** 5.0 -k = [(2.0**idx, value) for idx, value in pairs] -l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) -m = [([2.0**63.0], [1.0, 2**63.0])] -n = count <= 10**5.0 -o = settings(max_examples=10**6.0) -p = {(k, k**2): v**2.0 for k, v in pairs} -q = [10.5**i for i in range(6)] - - -# WE SHOULD DEFINITELY NOT EAT THESE COMMENTS (https://github.com/psf/black/issues/2873) -if hasattr(view, "sum_of_weights"): - return np.divide( # type: ignore[no-any-return] - view.variance, # type: ignore[union-attr] - view.sum_of_weights, # type: ignore[union-attr] - out=np.full(view.sum_of_weights.shape, np.nan), # type: ignore[union-attr] - where=view.sum_of_weights**2 - > view.sum_of_weights_squared, # type: ignore[union-attr] - ) - -return np.divide( - where=view.sum_of_weights_of_weight_long**2 - > view.sum_of_weights_squared, # type: ignore -) -``` - -## Black Output - -```py -def function(**kwargs): - t = a**2 + b**3 - return t**2 - - -def function_replace_spaces(**kwargs): - t = a**2 + b**3 + c**4 - - -def function_dont_replace_spaces(): - {**a, **b, **c} - - -a = 5**~4 -b = 5 ** f() -c = -(5**2) -d = 5 ** f["hi"] -e = lazy(lambda **kwargs: 5) -f = f() ** 5 -g = a.b**c.d -h = 5 ** funcs.f() -i = funcs.f() ** 5 -j = super().name ** 5 -k = [(2**idx, value) for idx, value in pairs] -l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) -m = [([2**63], [1, 2**63])] -n = count <= 10**5 -o = settings(max_examples=10**6) -p = {(k, k**2): v**2 for k, v in pairs} -q = [10**i for i in range(6)] -r = x**y - -a = 5.0**~4.0 -b = 5.0 ** f() -c = -(5.0**2.0) -d = 5.0 ** f["hi"] -e = lazy(lambda **kwargs: 5) -f = f() ** 5.0 -g = a.b**c.d -h = 5.0 ** funcs.f() -i = funcs.f() ** 5.0 -j = super().name ** 5.0 -k = [(2.0**idx, value) for idx, value in pairs] -l = mod.weights_[0] == pytest.approx(0.95**100, abs=0.001) -m = [([2.0**63.0], [1.0, 2**63.0])] -n = count <= 10**5.0 -o = settings(max_examples=10**6.0) -p = {(k, k**2): v**2.0 for k, v in pairs} -q = [10.5**i for i in range(6)] - - -# WE SHOULD DEFINITELY NOT EAT THESE COMMENTS (https://github.com/psf/black/issues/2873) -if hasattr(view, "sum_of_weights"): - return np.divide( # type: ignore[no-any-return] - view.variance, # type: ignore[union-attr] - view.sum_of_weights, # type: ignore[union-attr] - out=np.full(view.sum_of_weights.shape, np.nan), # type: ignore[union-attr] - where=view.sum_of_weights**2 > view.sum_of_weights_squared, # type: ignore[union-attr] - ) - -return np.divide( - where=view.sum_of_weights_of_weight_long**2 > view.sum_of_weights_squared, # type: ignore -) -``` - - diff --git a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__torture.py.snap b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__torture.py.snap index 3a57c5b7a9..f44e1053f0 100644 --- a/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__torture.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/black_compatibility@simple_cases__torture.py.snap @@ -50,17 +50,14 @@ assert ( ) # assert sort_by_dependency( -@@ -25,9 +25,11 @@ +@@ -25,9 +25,9 @@ class A: def foo(self): for _ in range(10): - aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc( -- xxxxxxxxxxxx ++ aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc( # pylint: disable=no-member + xxxxxxxxxxxx - ) # pylint: disable=no-member -+ aaaaaaaaaaaaaaaaaaa = ( -+ bbbbbbbbbbbbbbb.cccccccccc( # pylint: disable=no-member -+ xxxxxxxxxxxx -+ ) + ) @@ -97,10 +94,8 @@ importA class A: def foo(self): for _ in range(10): - aaaaaaaaaaaaaaaaaaa = ( - bbbbbbbbbbbbbbb.cccccccccc( # pylint: disable=no-member - xxxxxxxxxxxx - ) + aaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbbbb.cccccccccc( # pylint: disable=no-member + xxxxxxxxxxxx ) diff --git a/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap index 8ddbd6b6f5..982bb00711 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap @@ -4,22 +4,72 @@ input_file: crates/ruff_python_formatter/resources/test/fixtures/ruff/trailing_c --- ## Input ```py +# Pragma reserved width fixtures +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # type: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pyright: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pylint: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # nocoverage: This should break + + +# Pragma fixtures for non-breaking space (lead by NBSP) +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # type: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pyright: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pylint: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # nocoverage: This should break + + # As of adding this fixture Black adds a space before the non-breaking space if part of a type pragma. # https://github.com/psf/black/blob/b4dca26c7d93f930bbd5a7b552807370b60d4298/src/black/comments.py#L122-L129 -i2 = "" #  type: Add space before leading NBSP followed by spaces -i3 = "" #type: A space is added -i4 = "" #  type: Add space before leading NBSP followed by a space -i5 = "" # type: Add space before leading NBSP +i = "" #  type: Add space before leading NBSP followed by spaces +i = "" #type: A space is added +i = "" #  type: Add space before leading NBSP followed by a space +i = "" # type: Add space before leading NBSP +i = "" #  type: Add space before two leading NBSP + + +# A noqa as `#\u{A0}\u{A0}noqa` becomes `# \u{A0}noqa` +i = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" #  noqa ``` ## Output ```py +# Pragma reserved width fixtures +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # type: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pyright: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pylint: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa This shouldn't break +i = ( + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", +) # nocoverage: This should break + + +# Pragma fixtures for non-breaking space (lead by NBSP) +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) #  type: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pyright: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # pylint: This shouldn't break +i = ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",) # noqa This shouldn't break +i = ( + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", +) # nocoverage: This should break + + # As of adding this fixture Black adds a space before the non-breaking space if part of a type pragma. # https://github.com/psf/black/blob/b4dca26c7d93f930bbd5a7b552807370b60d4298/src/black/comments.py#L122-L129 -i2 = "" #   type: Add space before leading NBSP followed by spaces -i3 = "" # type: A space is added -i4 = "" #   type: Add space before leading NBSP followed by a space -i5 = "" #  type: Add space before leading NBSP +i = "" #   type: Add space before leading NBSP followed by spaces +i = "" # type: A space is added +i = "" #   type: Add space before leading NBSP followed by a space +i = "" #  type: Add space before leading NBSP +i = "" #  type: Add space before two leading NBSP + + +# A noqa as `#\u{A0}\u{A0}noqa` becomes `# \u{A0}noqa` +i = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" # noqa ``` From 60132da7bb3286ebad551135e3ce4620c3478f65 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 1 Sep 2023 12:08:05 +0100 Subject: [PATCH 021/164] Add a `NotebookError` type to avoid returning `Diagnostics` on error (#7035) ## Summary This PR refactors the error-handling cases around Jupyter notebooks to use errors rather than `Box`, which creates some oddities in the downstream handling. So, instead of formatting errors as diagnostics _eagerly_ (in the notebook methods), we now return errors and convert those errors to diagnostics at the last possible moment (in `diagnostics.rs`). This is more ergonomic, as errors can be composed and reported-on in different ways, whereas diagnostics require a `Printer`, etc. See, e.g., https://github.com/astral-sh/ruff/pull/7013#discussion_r1311136301. ## Test Plan Ran `cargo run` over a Python file labeled with a `.ipynb` suffix, and saw: ``` foo.ipynb:1:1: E999 SyntaxError: Expected a Jupyter Notebook, which must be internally stored as JSON, but found a Python source file: expected value at line 1 column 1 ``` --- crates/ruff/src/jupyter/notebook.rs | 260 +++++++----------- crates/ruff/src/lib.rs | 2 +- .../ruff/src/rules/pycodestyle/rules/mod.rs | 2 +- crates/ruff/src/test.rs | 34 +-- crates/ruff_cli/src/diagnostics.rs | 257 +++++++---------- 5 files changed, 222 insertions(+), 333 deletions(-) diff --git a/crates/ruff/src/jupyter/notebook.rs b/crates/ruff/src/jupyter/notebook.rs index f36ce19171..aa04d2a3c3 100644 --- a/crates/ruff/src/jupyter/notebook.rs +++ b/crates/ruff/src/jupyter/notebook.rs @@ -2,28 +2,24 @@ use std::cmp::Ordering; use std::fmt::Display; use std::fs::File; use std::io::{BufReader, BufWriter, Cursor, Read, Seek, SeekFrom, Write}; -use std::iter; use std::path::Path; +use std::{io, iter}; use itertools::Itertools; use once_cell::sync::OnceCell; use serde::Serialize; use serde_json::error::Category; +use thiserror::Error; use uuid::Uuid; -use ruff_diagnostics::Diagnostic; use ruff_python_parser::lexer::lex; use ruff_python_parser::Mode; use ruff_source_file::{NewlineWithTrailingNewline, UniversalNewlineIterator}; -use ruff_text_size::{TextRange, TextSize}; +use ruff_text_size::TextSize; use crate::autofix::source_map::{SourceMap, SourceMarker}; use crate::jupyter::index::NotebookIndex; use crate::jupyter::schema::{Cell, RawNotebook, SortAlphabetically, SourceValue}; -use crate::rules::pycodestyle::rules::SyntaxError; -use crate::IOError; - -pub const JUPYTER_NOTEBOOK_EXT: &str = "ipynb"; /// Run round-trip source code generation on a given Jupyter notebook file path. pub fn round_trip(path: &Path) -> anyhow::Result { @@ -96,6 +92,23 @@ impl Cell { } } +/// An error that can occur while deserializing a Jupyter Notebook. +#[derive(Error, Debug)] +pub enum NotebookError { + #[error(transparent)] + Io(#[from] io::Error), + #[error(transparent)] + Json(serde_json::Error), + #[error("Expected a Jupyter Notebook, which must be internally stored as JSON, but found a Python source file: {0}")] + PythonSource(serde_json::Error), + #[error("Expected a Jupyter Notebook, which must be internally stored as JSON, but this file isn't valid JSON: {0}")] + InvalidJson(serde_json::Error), + #[error("This file does not match the schema expected of Jupyter Notebooks: {0}")] + InvalidSchema(serde_json::Error), + #[error("Expected Jupyter Notebook format 4, found: {0}")] + InvalidFormat(i64), +} + #[derive(Clone, Debug, PartialEq)] pub struct Notebook { /// Python source code of the notebook. @@ -121,19 +134,12 @@ pub struct Notebook { impl Notebook { /// Read the Jupyter Notebook from the given [`Path`]. - pub fn from_path(path: &Path) -> Result> { - Self::from_reader(BufReader::new(File::open(path).map_err(|err| { - Diagnostic::new( - IOError { - message: format!("{err}"), - }, - TextRange::default(), - ) - })?)) + pub fn from_path(path: &Path) -> Result { + Self::from_reader(BufReader::new(File::open(path)?)) } /// Read the Jupyter Notebook from its JSON string. - pub fn from_source_code(source_code: &str) -> Result> { + pub fn from_source_code(source_code: &str) -> Result { Self::from_reader(Cursor::new(source_code)) } @@ -141,7 +147,7 @@ impl Notebook { /// /// See also the black implementation /// - fn from_reader(mut reader: R) -> Result> + fn from_reader(mut reader: R) -> Result where R: Read + Seek, { @@ -149,95 +155,41 @@ impl Notebook { let mut buf = [0; 1]; reader.read_exact(&mut buf).is_ok_and(|_| buf[0] == b'\n') }); - reader.rewind().map_err(|err| { - Diagnostic::new( - IOError { - message: format!("{err}"), - }, - TextRange::default(), - ) - })?; + reader.rewind()?; let mut raw_notebook: RawNotebook = match serde_json::from_reader(reader.by_ref()) { Ok(notebook) => notebook, Err(err) => { // Translate the error into a diagnostic - return Err(Box::new({ - match err.classify() { - Category::Io => Diagnostic::new( - IOError { - message: format!("{err}"), - }, - TextRange::default(), - ), - Category::Syntax | Category::Eof => { - // Maybe someone saved the python sources (those with the `# %%` separator) - // as jupyter notebook instead. Let's help them. - let mut contents = String::new(); - reader - .rewind() - .and_then(|_| reader.read_to_string(&mut contents)) - .map_err(|err| { - Diagnostic::new( - IOError { - message: format!("{err}"), - }, - TextRange::default(), - ) - })?; + return Err(match err.classify() { + Category::Io => NotebookError::Json(err), + Category::Syntax | Category::Eof => { + // Maybe someone saved the python sources (those with the `# %%` separator) + // as jupyter notebook instead. Let's help them. + let mut contents = String::new(); + reader + .rewind() + .and_then(|_| reader.read_to_string(&mut contents))?; - // Check if tokenizing was successful and the file is non-empty - if lex(&contents, Mode::Module).any(|result| result.is_err()) { - Diagnostic::new( - SyntaxError { - message: format!( - "A Jupyter Notebook (.{JUPYTER_NOTEBOOK_EXT}) must internally be JSON, \ - but this file isn't valid JSON: {err}" - ), - }, - TextRange::default(), - ) - } else { - Diagnostic::new( - SyntaxError { - message: format!( - "Expected a Jupyter Notebook (.{JUPYTER_NOTEBOOK_EXT}), \ - which must be internally stored as JSON, \ - but found a Python source file: {err}" - ), - }, - TextRange::default(), - ) - } - } - Category::Data => { - // We could try to read the schema version here but if this fails it's - // a bug anyway - Diagnostic::new( - SyntaxError { - message: format!( - "This file does not match the schema expected of Jupyter Notebooks: {err}" - ), - }, - TextRange::default(), - ) + // Check if tokenizing was successful and the file is non-empty + if lex(&contents, Mode::Module).any(|result| result.is_err()) { + NotebookError::InvalidJson(err) + } else { + NotebookError::PythonSource(err) } } - })); + Category::Data => { + // We could try to read the schema version here but if this fails it's + // a bug anyway + NotebookError::InvalidSchema(err) + } + }); } }; // v4 is what everybody uses if raw_notebook.nbformat != 4 { // bail because we should have already failed at the json schema stage - return Err(Box::new(Diagnostic::new( - SyntaxError { - message: format!( - "Expected Jupyter Notebook format 4, found {}", - raw_notebook.nbformat - ), - }, - TextRange::default(), - ))); + return Err(NotebookError::InvalidFormat(raw_notebook.nbformat)); } let valid_code_cells = raw_notebook @@ -493,56 +445,45 @@ mod tests { use crate::jupyter::index::NotebookIndex; use crate::jupyter::schema::Cell; - use crate::jupyter::Notebook; + use crate::jupyter::{Notebook, NotebookError}; use crate::registry::Rule; use crate::source_kind::SourceKind; - use crate::test::{ - read_jupyter_notebook, test_contents, test_notebook_path, test_resource_path, - TestedNotebook, - }; + use crate::test::{test_contents, test_notebook_path, test_resource_path, TestedNotebook}; use crate::{assert_messages, settings}; - /// Read a Jupyter cell from the `resources/test/fixtures/jupyter/cell` directory. - fn read_jupyter_cell(path: impl AsRef) -> Result { - let path = test_resource_path("fixtures/jupyter/cell").join(path); - let source_code = std::fs::read_to_string(path)?; - Ok(serde_json::from_str(&source_code)?) + /// Construct a path to a Jupyter notebook in the `resources/test/fixtures/jupyter` directory. + fn notebook_path(path: impl AsRef) -> std::path::PathBuf { + test_resource_path("fixtures/jupyter").join(path) } #[test] - fn test_valid() { - assert!(read_jupyter_notebook(Path::new("valid.ipynb")).is_ok()); + fn test_python() -> Result<(), NotebookError> { + let notebook = Notebook::from_path(¬ebook_path("valid.ipynb"))?; + assert!(notebook.is_python_notebook()); + Ok(()) } #[test] - fn test_r() { - // We can load this, it will be filtered out later - assert!(read_jupyter_notebook(Path::new("R.ipynb")).is_ok()); + fn test_r() -> Result<(), NotebookError> { + let notebook = Notebook::from_path(¬ebook_path("R.ipynb"))?; + assert!(!notebook.is_python_notebook()); + Ok(()) } #[test] fn test_invalid() { - let path = Path::new("resources/test/fixtures/jupyter/invalid_extension.ipynb"); - assert_eq!( - Notebook::from_path(path).unwrap_err().kind.body, - "SyntaxError: Expected a Jupyter Notebook (.ipynb), \ - which must be internally stored as JSON, \ - but found a Python source file: \ - expected value at line 1 column 1" - ); - let path = Path::new("resources/test/fixtures/jupyter/not_json.ipynb"); - assert_eq!( - Notebook::from_path(path).unwrap_err().kind.body, - "SyntaxError: A Jupyter Notebook (.ipynb) must internally be JSON, \ - but this file isn't valid JSON: \ - expected value at line 1 column 1" - ); - let path = Path::new("resources/test/fixtures/jupyter/wrong_schema.ipynb"); - assert_eq!( - Notebook::from_path(path).unwrap_err().kind.body, - "SyntaxError: This file does not match the schema expected of Jupyter Notebooks: \ - missing field `cells` at line 1 column 2" - ); + assert!(matches!( + Notebook::from_path(¬ebook_path("invalid_extension.ipynb")), + Err(NotebookError::PythonSource(_)) + )); + assert!(matches!( + Notebook::from_path(¬ebook_path("not_json.ipynb")), + Err(NotebookError::InvalidJson(_)) + )); + assert!(matches!( + Notebook::from_path(¬ebook_path("wrong_schema.ipynb")), + Err(NotebookError::InvalidSchema(_)) + )); } #[test_case(Path::new("markdown.json"), false; "markdown")] @@ -551,13 +492,20 @@ mod tests { #[test_case(Path::new("only_code.json"), true; "only_code")] #[test_case(Path::new("cell_magic.json"), false; "cell_magic")] fn test_is_valid_code_cell(path: &Path, expected: bool) -> Result<()> { + /// Read a Jupyter cell from the `resources/test/fixtures/jupyter/cell` directory. + fn read_jupyter_cell(path: impl AsRef) -> Result { + let path = notebook_path("cell").join(path); + let source_code = std::fs::read_to_string(path)?; + Ok(serde_json::from_str(&source_code)?) + } + assert_eq!(read_jupyter_cell(path)?.is_valid_code_cell(), expected); Ok(()) } #[test] - fn test_concat_notebook() -> Result<()> { - let notebook = read_jupyter_notebook(Path::new("valid.ipynb"))?; + fn test_concat_notebook() -> Result<(), NotebookError> { + let notebook = Notebook::from_path(¬ebook_path("valid.ipynb"))?; assert_eq!( notebook.source_code, r#"def unused_variable(): @@ -599,69 +547,73 @@ print("after empty cells") } #[test] - fn test_import_sorting() -> Result<()> { - let path = "isort.ipynb".to_string(); + fn test_import_sorting() -> Result<(), NotebookError> { + let actual = notebook_path("isort.ipynb"); + let expected = notebook_path("isort_expected.ipynb"); let TestedNotebook { messages, source_notebook, .. } = test_notebook_path( - &path, - Path::new("isort_expected.ipynb"), + &actual, + expected, &settings::Settings::for_rule(Rule::UnsortedImports), )?; - assert_messages!(messages, path, source_notebook); + assert_messages!(messages, actual, source_notebook); Ok(()) } #[test] - fn test_ipy_escape_command() -> Result<()> { - let path = "ipy_escape_command.ipynb".to_string(); + fn test_ipy_escape_command() -> Result<(), NotebookError> { + let actual = notebook_path("ipy_escape_command.ipynb"); + let expected = notebook_path("ipy_escape_command_expected.ipynb"); let TestedNotebook { messages, source_notebook, .. } = test_notebook_path( - &path, - Path::new("ipy_escape_command_expected.ipynb"), + &actual, + expected, &settings::Settings::for_rule(Rule::UnusedImport), )?; - assert_messages!(messages, path, source_notebook); + assert_messages!(messages, actual, source_notebook); Ok(()) } #[test] - fn test_unused_variable() -> Result<()> { - let path = "unused_variable.ipynb".to_string(); + fn test_unused_variable() -> Result<(), NotebookError> { + let actual = notebook_path("unused_variable.ipynb"); + let expected = notebook_path("unused_variable_expected.ipynb"); let TestedNotebook { messages, source_notebook, .. } = test_notebook_path( - &path, - Path::new("unused_variable_expected.ipynb"), + &actual, + expected, &settings::Settings::for_rule(Rule::UnusedVariable), )?; - assert_messages!(messages, path, source_notebook); + assert_messages!(messages, actual, source_notebook); Ok(()) } #[test] fn test_json_consistency() -> Result<()> { - let path = "before_fix.ipynb".to_string(); + let actual_path = notebook_path("before_fix.ipynb"); + let expected_path = notebook_path("after_fix.ipynb"); + let TestedNotebook { linted_notebook: fixed_notebook, .. } = test_notebook_path( - path, - Path::new("after_fix.ipynb"), + actual_path, + &expected_path, &settings::Settings::for_rule(Rule::UnusedImport), )?; let mut writer = Vec::new(); fixed_notebook.write_inner(&mut writer)?; let actual = String::from_utf8(writer)?; - let expected = - std::fs::read_to_string(test_resource_path("fixtures/jupyter/after_fix.ipynb"))?; + let expected = std::fs::read_to_string(expected_path)?; assert_eq!(actual, expected); Ok(()) } @@ -669,7 +621,7 @@ print("after empty cells") #[test_case(Path::new("before_fix.ipynb"), true; "trailing_newline")] #[test_case(Path::new("no_trailing_newline.ipynb"), false; "no_trailing_newline")] fn test_trailing_newline(path: &Path, trailing_newline: bool) -> Result<()> { - let notebook = read_jupyter_notebook(path)?; + let notebook = Notebook::from_path(¬ebook_path(path))?; assert_eq!(notebook.trailing_newline, trailing_newline); let mut writer = Vec::new(); @@ -685,7 +637,7 @@ print("after empty cells") // Version 4.5, cell ids are missing and need to be added #[test_case(Path::new("add_missing_cell_id.ipynb"), true; "add_missing_cell_id")] fn test_cell_id(path: &Path, has_id: bool) -> Result<()> { - let source_notebook = read_jupyter_notebook(path)?; + let source_notebook = Notebook::from_path(¬ebook_path(path))?; let source_kind = SourceKind::IpyNotebook(source_notebook); let (_, transformed) = test_contents( &source_kind, diff --git a/crates/ruff/src/lib.rs b/crates/ruff/src/lib.rs index 3bfa003291..a623582ad8 100644 --- a/crates/ruff/src/lib.rs +++ b/crates/ruff/src/lib.rs @@ -6,7 +6,7 @@ //! [Ruff]: https://github.com/astral-sh/ruff pub use rule_selector::RuleSelector; -pub use rules::pycodestyle::rules::IOError; +pub use rules::pycodestyle::rules::{IOError, SyntaxError}; pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/crates/ruff/src/rules/pycodestyle/rules/mod.rs b/crates/ruff/src/rules/pycodestyle/rules/mod.rs index c9fceb87a6..33b8cc4960 100644 --- a/crates/ruff/src/rules/pycodestyle/rules/mod.rs +++ b/crates/ruff/src/rules/pycodestyle/rules/mod.rs @@ -4,8 +4,8 @@ pub(crate) use ambiguous_variable_name::*; pub(crate) use bare_except::*; pub(crate) use compound_statements::*; pub(crate) use doc_line_too_long::*; -pub use errors::IOError; pub(crate) use errors::*; +pub use errors::{IOError, SyntaxError}; pub(crate) use imports::*; pub(crate) use invalid_escape_sequence::*; diff --git a/crates/ruff/src/test.rs b/crates/ruff/src/test.rs index b322d5b919..f03de7e22b 100644 --- a/crates/ruff/src/test.rs +++ b/crates/ruff/src/test.rs @@ -21,7 +21,7 @@ use ruff_text_size::Ranged; use crate::autofix::{fix_file, FixResult}; use crate::directives; -use crate::jupyter::Notebook; +use crate::jupyter::{Notebook, NotebookError}; use crate::linter::{check_path, LinterResult}; use crate::message::{Emitter, EmitterContext, Message, TextEmitter}; use crate::packaging::detect_package_root; @@ -30,18 +30,6 @@ use crate::rules::pycodestyle::rules::syntax_error; use crate::settings::{flags, Settings}; use crate::source_kind::SourceKind; -#[cfg(not(fuzzing))] -pub(crate) fn read_jupyter_notebook(path: &Path) -> Result { - let path = test_resource_path("fixtures/jupyter").join(path); - Notebook::from_path(&path).map_err(|err| { - anyhow::anyhow!( - "Failed to read notebook file `{}`: {:?}", - path.display(), - err - ) - }) -} - #[cfg(not(fuzzing))] pub(crate) fn test_resource_path(path: impl AsRef) -> std::path::PathBuf { Path::new("./resources/test/").join(path) @@ -67,12 +55,12 @@ pub(crate) fn test_notebook_path( path: impl AsRef, expected: impl AsRef, settings: &Settings, -) -> Result { - let source_notebook = read_jupyter_notebook(path.as_ref())?; +) -> Result { + let source_notebook = Notebook::from_path(path.as_ref())?; let source_kind = SourceKind::IpyNotebook(source_notebook); let (messages, transformed) = test_contents(&source_kind, path.as_ref(), settings); - let expected_notebook = read_jupyter_notebook(expected.as_ref())?; + let expected_notebook = Notebook::from_path(expected.as_ref())?; let linted_notebook = transformed.into_owned().expect_ipy_notebook(); assert_eq!( @@ -273,12 +261,8 @@ Source with applied fixes: (messages, transformed) } -fn print_diagnostics( - diagnostics: Vec, - file_path: &Path, - source: &SourceKind, -) -> String { - let filename = file_path.file_name().unwrap().to_string_lossy(); +fn print_diagnostics(diagnostics: Vec, path: &Path, source: &SourceKind) -> String { + let filename = path.file_name().unwrap().to_string_lossy(); let source_file = SourceFileBuilder::new(filename.as_ref(), source.source_code()).finish(); let messages: Vec<_> = diagnostics @@ -291,7 +275,7 @@ fn print_diagnostics( .collect(); if let Some(notebook) = source.notebook() { - print_jupyter_messages(&messages, &filename, notebook) + print_jupyter_messages(&messages, path, notebook) } else { print_messages(&messages) } @@ -299,7 +283,7 @@ fn print_diagnostics( pub(crate) fn print_jupyter_messages( messages: &[Message], - filename: &str, + path: &Path, notebook: &Notebook, ) -> String { let mut output = Vec::new(); @@ -312,7 +296,7 @@ pub(crate) fn print_jupyter_messages( &mut output, messages, &EmitterContext::new(&FxHashMap::from_iter([( - filename.to_string(), + path.file_name().unwrap().to_string_lossy().to_string(), notebook.clone(), )])), ) diff --git a/crates/ruff_cli/src/diagnostics.rs b/crates/ruff_cli/src/diagnostics.rs index bca7763a24..e15ac3d21e 100644 --- a/crates/ruff_cli/src/diagnostics.rs +++ b/crates/ruff_cli/src/diagnostics.rs @@ -14,16 +14,17 @@ use filetime::FileTime; use log::{debug, error, warn}; use rustc_hash::FxHashMap; use similar::TextDiff; +use thiserror::Error; -use ruff::jupyter::{Cell, Notebook}; +use ruff::jupyter::{Cell, Notebook, NotebookError}; use ruff::linter::{lint_fix, lint_only, FixTable, FixerResult, LinterResult}; use ruff::logging::DisplayParseError; use ruff::message::Message; use ruff::pyproject_toml::lint_pyproject_toml; -use ruff::registry::Rule; +use ruff::registry::AsRule; use ruff::settings::{flags, AllSettings, Settings}; use ruff::source_kind::SourceKind; -use ruff::{fs, IOError}; +use ruff::{fs, IOError, SyntaxError}; use ruff_diagnostics::Diagnostic; use ruff_macros::CacheKey; use ruff_python_ast::imports::ImportMap; @@ -76,27 +77,39 @@ impl Diagnostics { } } - /// Generate [`Diagnostics`] based on an [`io::Error`]. - pub(crate) fn from_io_error(err: &io::Error, path: &Path, settings: &Settings) -> Self { - if settings.rules.enabled(Rule::IOError) { - let io_err = Diagnostic::new( - IOError { - message: err.to_string(), - }, - TextRange::default(), - ); - let dummy = SourceFileBuilder::new(path.to_string_lossy().as_ref(), "").finish(); + /// Generate [`Diagnostics`] based on a [`SourceExtractionError`]. + pub(crate) fn from_source_error( + err: &SourceExtractionError, + path: Option<&Path>, + settings: &Settings, + ) -> Self { + let diagnostic = Diagnostic::from(err); + if settings.rules.enabled(diagnostic.kind.rule()) { + let name = path.map_or_else(|| "-".into(), std::path::Path::to_string_lossy); + let dummy = SourceFileBuilder::new(name, "").finish(); Self::new( - vec![Message::from_diagnostic(io_err, dummy, TextSize::default())], + vec![Message::from_diagnostic( + diagnostic, + dummy, + TextSize::default(), + )], ImportMap::default(), ) } else { - warn!( - "{}{}{} {err}", - "Failed to lint ".bold(), - fs::relativize_path(path).bold(), - ":".bold() - ); + match path { + Some(path) => { + warn!( + "{}{}{} {err}", + "Failed to lint ".bold(), + fs::relativize_path(path).bold(), + ":".bold() + ); + } + None => { + warn!("{}{} {err}", "Failed to lint".bold(), ":".bold()); + } + } + Self::default() } } @@ -121,76 +134,6 @@ impl AddAssign for Diagnostics { } } -/// Read a Jupyter Notebook from disk. -/// -/// Returns either an indexed Python Jupyter Notebook or a diagnostic (which is empty if we skip). -fn notebook_from_path(path: &Path) -> Result> { - let notebook = match Notebook::from_path(path) { - Ok(notebook) => { - if !notebook.is_python_notebook() { - // Not a python notebook, this could e.g. be an R notebook which we want to just skip. - debug!( - "Skipping {} because it's not a Python notebook", - path.display() - ); - return Err(Box::default()); - } - notebook - } - Err(diagnostic) => { - // Failed to read the jupyter notebook - return Err(Box::new(Diagnostics { - messages: vec![Message::from_diagnostic( - *diagnostic, - SourceFileBuilder::new(path.to_string_lossy().as_ref(), "").finish(), - TextSize::default(), - )], - ..Diagnostics::default() - })); - } - }; - - Ok(notebook) -} - -/// Parse a Jupyter Notebook from a JSON string. -/// -/// Returns either an indexed Python Jupyter Notebook or a diagnostic (which is empty if we skip). -fn notebook_from_source_code( - source_code: &str, - path: Option<&Path>, -) -> Result> { - let notebook = match Notebook::from_source_code(source_code) { - Ok(notebook) => { - if !notebook.is_python_notebook() { - // Not a python notebook, this could e.g. be an R notebook which we want to just skip. - if let Some(path) = path { - debug!( - "Skipping {} because it's not a Python notebook", - path.display() - ); - } - return Err(Box::default()); - } - notebook - } - Err(diagnostic) => { - // Failed to read the jupyter notebook - return Err(Box::new(Diagnostics { - messages: vec![Message::from_diagnostic( - *diagnostic, - SourceFileBuilder::new(path.map(Path::to_string_lossy).unwrap_or_default(), "") - .finish(), - TextSize::default(), - )], - ..Diagnostics::default() - })); - } - }; - - Ok(notebook) -} - /// Lint the source code at the given `Path`. pub(crate) fn lint_path( path: &Path, @@ -235,12 +178,17 @@ pub(crate) fn lint_path( .iter_enabled() .any(|rule_code| rule_code.lint_source().is_pyproject_toml()) { - let contents = match std::fs::read_to_string(path) { - Ok(contents) => contents, - Err(err) => { - return Ok(Diagnostics::from_io_error(&err, path, &settings.lib)); - } - }; + let contents = + match std::fs::read_to_string(path).map_err(SourceExtractionError::Io) { + Ok(contents) => contents, + Err(err) => { + return Ok(Diagnostics::from_source_error( + &err, + Some(path), + &settings.lib, + )); + } + }; let source_file = SourceFileBuilder::new(path.to_string_lossy(), contents).finish(); lint_pyproject_toml(source_file, &settings.lib) } else { @@ -257,12 +205,14 @@ pub(crate) fn lint_path( // Extract the sources from the file. let LintSource(source_kind) = match LintSource::try_from_path(path, source_type) { - Ok(sources) => sources, - Err(SourceExtractionError::Io(err)) => { - return Ok(Diagnostics::from_io_error(&err, path, &settings.lib)); - } - Err(SourceExtractionError::Diagnostics(diagnostics)) => { - return Ok(*diagnostics); + Ok(Some(sources)) => sources, + Ok(None) => return Ok(Diagnostics::default()), + Err(err) => { + return Ok(Diagnostics::from_source_error( + &err, + Some(path), + &settings.lib, + )); } }; @@ -443,17 +393,13 @@ pub(crate) fn lint_stdin( }; // Extract the sources from the file. - let LintSource(source_kind) = - match LintSource::try_from_source_code(contents, path, source_type) { - Ok(sources) => sources, - Err(SourceExtractionError::Io(err)) => { - // SAFETY: An `io::Error` can only occur if we're reading from a path. - return Ok(Diagnostics::from_io_error(&err, path.unwrap(), settings)); - } - Err(SourceExtractionError::Diagnostics(diagnostics)) => { - return Ok(*diagnostics); - } - }; + let LintSource(source_kind) = match LintSource::try_from_source_code(contents, source_type) { + Ok(Some(sources)) => sources, + Ok(None) => return Ok(Diagnostics::default()), + Err(err) => { + return Ok(Diagnostics::from_source_error(&err, path, settings)); + } + }; // Lint the inputs. let ( @@ -563,15 +509,16 @@ impl LintSource { fn try_from_path( path: &Path, source_type: PySourceType, - ) -> Result { + ) -> Result, SourceExtractionError> { if source_type.is_ipynb() { - let notebook = notebook_from_path(path).map_err(SourceExtractionError::Diagnostics)?; - let source_kind = SourceKind::IpyNotebook(notebook); - Ok(LintSource(source_kind)) + let notebook = Notebook::from_path(path)?; + Ok(notebook + .is_python_notebook() + .then_some(LintSource(SourceKind::IpyNotebook(notebook)))) } else { // This is tested by ruff_cli integration test `unreadable_file` - let contents = std::fs::read_to_string(path).map_err(SourceExtractionError::Io)?; - Ok(LintSource(SourceKind::Python(contents))) + let contents = std::fs::read_to_string(path)?; + Ok(Some(LintSource(SourceKind::Python(contents)))) } } @@ -580,48 +527,54 @@ impl LintSource { /// the file path should be used for diagnostics, but not for reading the file from disk. fn try_from_source_code( source_code: String, - path: Option<&Path>, source_type: PySourceType, - ) -> Result { + ) -> Result, SourceExtractionError> { if source_type.is_ipynb() { - let notebook = notebook_from_source_code(&source_code, path) - .map_err(SourceExtractionError::Diagnostics)?; - let source_kind = SourceKind::IpyNotebook(notebook); - Ok(LintSource(source_kind)) + let notebook = Notebook::from_source_code(&source_code)?; + Ok(notebook + .is_python_notebook() + .then_some(LintSource(SourceKind::IpyNotebook(notebook)))) } else { - Ok(LintSource(SourceKind::Python(source_code))) + Ok(Some(LintSource(SourceKind::Python(source_code)))) } } } -#[derive(Debug)] -enum SourceExtractionError { +#[derive(Error, Debug)] +pub(crate) enum SourceExtractionError { /// The extraction failed due to an [`io::Error`]. - Io(io::Error), - /// The extraction failed, and generated [`Diagnostics`] to report. - Diagnostics(Box), + #[error(transparent)] + Io(#[from] io::Error), + /// The extraction failed due to a [`NotebookError`]. + #[error(transparent)] + Notebook(#[from] NotebookError), } -#[cfg(test)] -mod tests { - use std::path::Path; - - use crate::diagnostics::{notebook_from_path, notebook_from_source_code, Diagnostics}; - - #[test] - fn test_r() { - let path = Path::new("../ruff/resources/test/fixtures/jupyter/R.ipynb"); - // No diagnostics is used as skip signal. - assert_eq!( - notebook_from_path(path).unwrap_err(), - Box::::default() - ); - - let contents = std::fs::read_to_string(path).unwrap(); - // No diagnostics is used as skip signal. - assert_eq!( - notebook_from_source_code(&contents, Some(path)).unwrap_err(), - Box::::default() - ); +impl From<&SourceExtractionError> for Diagnostic { + fn from(err: &SourceExtractionError) -> Self { + match err { + // IO errors. + SourceExtractionError::Io(_) + | SourceExtractionError::Notebook(NotebookError::Io(_) | NotebookError::Json(_)) => { + Diagnostic::new( + IOError { + message: err.to_string(), + }, + TextRange::default(), + ) + } + // Syntax errors. + SourceExtractionError::Notebook( + NotebookError::PythonSource(_) + | NotebookError::InvalidJson(_) + | NotebookError::InvalidSchema(_) + | NotebookError::InvalidFormat(_), + ) => Diagnostic::new( + SyntaxError { + message: err.to_string(), + }, + TextRange::default(), + ), + } } } From 0489bbc54ced7edae1bff606e3cae024a53bb77c Mon Sep 17 00:00:00 2001 From: Chris Pryer <14341145+cnpryer@users.noreply.github.com> Date: Fri, 1 Sep 2023 08:52:59 -0400 Subject: [PATCH 022/164] Match Black's formatting of trailing comments containing NBSP (#7030) --- .../src/comments/format.rs | 19 ++++++++++--------- .../format@trailing_comments.py.snap | 4 ++-- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/crates/ruff_python_formatter/src/comments/format.rs b/crates/ruff_python_formatter/src/comments/format.rs index e682924284..6a6cb33768 100644 --- a/crates/ruff_python_formatter/src/comments/format.rs +++ b/crates/ruff_python_formatter/src/comments/format.rs @@ -474,18 +474,19 @@ fn normalize_comment<'a>( if content.starts_with('\u{A0}') { let trimmed = content.trim_start_matches('\u{A0}'); - // Black adds a space before the non-breaking space if part of a type pragma. if trimmed.trim_start().starts_with("type:") { - return Ok(Cow::Owned(std::format!("# \u{A0}{trimmed}"))); - } - - // Black replaces the non-breaking space with a space if followed by a space. - if trimmed.starts_with(' ') { - return Ok(Cow::Owned(std::format!("# {trimmed}"))); + // Black adds a space before the non-breaking space if part of a type pragma. + Ok(Cow::Owned(std::format!("# {content}"))) + } else if trimmed.starts_with(' ') { + // Black replaces the non-breaking space with a space if followed by a space. + Ok(Cow::Owned(std::format!("# {trimmed}"))) + } else { + // Otherwise we replace the first non-breaking space with a regular space. + Ok(Cow::Owned(std::format!("# {}", &content["\u{A0}".len()..]))) } + } else { + Ok(Cow::Owned(std::format!("# {}", content.trim_start()))) } - - Ok(Cow::Owned(std::format!("# {}", content.trim_start()))) } /// A helper for stripping '#' from comments. diff --git a/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap index 982bb00711..7e6a4bdc16 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@trailing_comments.py.snap @@ -65,11 +65,11 @@ i = "" #   type: Add space before leading NBSP followed by spaces i = "" # type: A space is added i = "" #   type: Add space before leading NBSP followed by a space i = "" #  type: Add space before leading NBSP -i = "" #  type: Add space before two leading NBSP +i = "" #   type: Add space before two leading NBSP # A noqa as `#\u{A0}\u{A0}noqa` becomes `# \u{A0}noqa` -i = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" # noqa +i = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" #  noqa ``` From 08e246764fcd9ec0662e0d9dbf93d842f6b86a45 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 1 Sep 2023 14:15:38 +0100 Subject: [PATCH 023/164] Refactor ruff_cli's run method to return on each branch (#7040) ## Summary I think the fallthrough here for some branches is a little confusing. Now each branch either runs a command that returns `Result`, or runs a command that returns `Result<()>` and then explicitly returns `Ok(ExitStatus::SUCCESS)`. --- crates/ruff_cli/src/commands/config.rs | 10 +++++----- crates/ruff_cli/src/lib.rs | 23 ++++++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/crates/ruff_cli/src/commands/config.rs b/crates/ruff_cli/src/commands/config.rs index 0391dc5ed4..042ea066f9 100644 --- a/crates/ruff_cli/src/commands/config.rs +++ b/crates/ruff_cli/src/commands/config.rs @@ -1,19 +1,19 @@ -use crate::ExitStatus; +use anyhow::{anyhow, Result}; + use ruff_workspace::options::Options; #[allow(clippy::print_stdout)] -pub(crate) fn config(key: Option<&str>) -> ExitStatus { +pub(crate) fn config(key: Option<&str>) -> Result<()> { match key { None => print!("{}", Options::metadata()), Some(key) => match Options::metadata().get(key) { None => { - println!("Unknown option"); - return ExitStatus::Error; + return Err(anyhow!("Unknown option: {key}")); } Some(entry) => { print!("{entry}"); } }, } - ExitStatus::Success + Ok(()) } diff --git a/crates/ruff_cli/src/lib.rs b/crates/ruff_cli/src/lib.rs index 130631f0e9..08057794b1 100644 --- a/crates/ruff_cli/src/lib.rs +++ b/crates/ruff_cli/src/lib.rs @@ -139,18 +139,27 @@ quoting the executed command, along with the relevant file contents and `pyproje if let Some(rule) = rule { commands::rule::rule(rule, format)?; } + Ok(ExitStatus::Success) + } + Command::Config { option } => { + commands::config::config(option.as_deref())?; + Ok(ExitStatus::Success) + } + Command::Linter { format } => { + commands::linter::linter(format)?; + Ok(ExitStatus::Success) + } + Command::Clean => { + commands::clean::clean(log_level)?; + Ok(ExitStatus::Success) } - Command::Config { option } => return Ok(commands::config::config(option.as_deref())), - Command::Linter { format } => commands::linter::linter(format)?, - Command::Clean => commands::clean::clean(log_level)?, Command::GenerateShellCompletion { shell } => { shell.generate(&mut Args::command(), &mut stdout()); + Ok(ExitStatus::Success) } - Command::Check(args) => return check(args, log_level), - Command::Format(args) => return format(args, log_level), + Command::Check(args) => check(args, log_level), + Command::Format(args) => format(args, log_level), } - - Ok(ExitStatus::Success) } fn format(args: FormatCommand, log_level: LogLevel) -> Result { From afcd00da567e0bf65e7c28ced93e08bf6a2ed356 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 1 Sep 2023 14:56:44 +0100 Subject: [PATCH 024/164] Create `ruff_notebook` crate (#7039) ## Summary This PR moves `ruff/jupyter` into its own `ruff_notebook` crate. Beyond the move itself, there were a few challenges: 1. `ruff_notebook` relies on the source map abstraction. I've moved the source map into `ruff_diagnostics`, since it doesn't have any dependencies on its own and is used alongside diagnostics. 2. `ruff_notebook` has a couple tests for end-to-end linting and autofixing. I had to leave these tests in `ruff` itself. 3. We had code in `ruff/jupyter` that relied on Python lexing, in order to provide a more targeted error message in the event that a user saves a `.py` file with a `.ipynb` extension. I removed this in order to avoid a dependency on the parser, it felt like it wasn't worth retaining just for that dependency. ## Test Plan `cargo test` --- CONTRIBUTING.md | 1 + Cargo.lock | 24 ++- crates/ruff/Cargo.toml | 5 +- crates/ruff/src/autofix/mod.rs | 67 ++----- crates/ruff/src/lib.rs | 1 - crates/ruff/src/linter.rs | 135 ++++++++++++- crates/ruff/src/logging.rs | 2 +- crates/ruff/src/message/grouped.rs | 2 +- crates/ruff/src/message/mod.rs | 3 +- crates/ruff/src/message/text.rs | 2 +- crates/ruff/src/rules/isort/block.rs | 6 +- .../ruff__linter__tests__import_sorting.snap} | 2 +- ...f__linter__tests__ipy_escape_command.snap} | 2 +- ...ruff__linter__tests__unused_variable.snap} | 2 +- crates/ruff/src/source_kind.rs | 4 +- crates/ruff/src/test.rs | 2 +- crates/ruff_cli/Cargo.toml | 1 + crates/ruff_cli/src/diagnostics.rs | 12 +- crates/ruff_dev/Cargo.toml | 1 + crates/ruff_dev/src/round_trip.rs | 3 +- crates/ruff_diagnostics/src/lib.rs | 2 + .../src}/source_map.rs | 30 ++- crates/ruff_notebook/Cargo.toml | 31 +++ .../resources/test/fixtures/jupyter/R.ipynb | 0 .../jupyter/add_missing_cell_id.ipynb | 0 .../test/fixtures/jupyter/after_fix.ipynb | 0 .../test/fixtures/jupyter/before_fix.ipynb | 0 .../fixtures/jupyter/cell/cell_magic.json | 0 .../fixtures/jupyter/cell/code_and_magic.json | 0 .../test/fixtures/jupyter/cell/markdown.json | 0 .../test/fixtures/jupyter/cell/only_code.json | 0 .../fixtures/jupyter/cell/only_magic.json | 0 .../fixtures/jupyter/invalid_extension.ipynb | 0 .../fixtures/jupyter/ipy_escape_command.ipynb | 0 .../jupyter/ipy_escape_command_expected.ipynb | 0 .../test/fixtures/jupyter/isort.ipynb | 0 .../fixtures/jupyter/isort_expected.ipynb | 0 .../test/fixtures/jupyter/no_cell_id.ipynb | 0 .../jupyter/no_trailing_newline.ipynb | 0 .../test/fixtures/jupyter/not_json.ipynb | 0 .../fixtures/jupyter/unused_variable.ipynb | 0 .../jupyter/unused_variable_expected.ipynb | 0 .../test/fixtures/jupyter/valid.ipynb | 0 .../test/fixtures/jupyter/wrong_schema.ipynb | 0 .../jupyter => ruff_notebook/src}/index.rs | 0 .../mod.rs => ruff_notebook/src/lib.rs} | 0 .../jupyter => ruff_notebook/src}/notebook.rs | 185 +++--------------- .../jupyter => ruff_notebook/src}/schema.rs | 2 +- 48 files changed, 274 insertions(+), 253 deletions(-) rename crates/ruff/src/{jupyter/snapshots/ruff__jupyter__notebook__tests__import_sorting.snap => snapshots/ruff__linter__tests__import_sorting.snap} (97%) rename crates/ruff/src/{jupyter/snapshots/ruff__jupyter__notebook__tests__ipy_escape_command.snap => snapshots/ruff__linter__tests__ipy_escape_command.snap} (87%) rename crates/ruff/src/{jupyter/snapshots/ruff__jupyter__notebook__tests__unused_variable.snap => snapshots/ruff__linter__tests__unused_variable.snap} (97%) rename crates/{ruff/src/autofix => ruff_diagnostics/src}/source_map.rs (71%) create mode 100644 crates/ruff_notebook/Cargo.toml rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/R.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/add_missing_cell_id.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/after_fix.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/before_fix.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/cell/cell_magic.json (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/cell/code_and_magic.json (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/cell/markdown.json (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/cell/only_code.json (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/cell/only_magic.json (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/invalid_extension.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/ipy_escape_command.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/ipy_escape_command_expected.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/isort.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/isort_expected.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/no_cell_id.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/no_trailing_newline.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/not_json.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/unused_variable.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/unused_variable_expected.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/valid.ipynb (100%) rename crates/{ruff => ruff_notebook}/resources/test/fixtures/jupyter/wrong_schema.ipynb (100%) rename crates/{ruff/src/jupyter => ruff_notebook/src}/index.rs (100%) rename crates/{ruff/src/jupyter/mod.rs => ruff_notebook/src/lib.rs} (100%) rename crates/{ruff/src/jupyter => ruff_notebook/src}/notebook.rs (73%) rename crates/{ruff/src/jupyter => ruff_notebook/src}/schema.rs (99%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6250515efd..674e41578c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -129,6 +129,7 @@ At time of writing, the repository includes the following crates: intermediate representation. The backend for `ruff_python_formatter`. - `crates/ruff_index`: library crate inspired by `rustc_index`. - `crates/ruff_macros`: proc macro crate containing macros used by Ruff. +- `crates/ruff_notebook`: library crate for parsing and manipulating Jupyter notebooks. - `crates/ruff_python_ast`: library crate containing Python-specific AST types and utilities. - `crates/ruff_python_codegen`: library crate containing utilities for generating Python source code. - `crates/ruff_python_formatter`: library crate implementing the Python formatter. Emits an diff --git a/Cargo.lock b/Cargo.lock index 74123f7491..9cc831126a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2088,6 +2088,7 @@ dependencies = [ "ruff_diagnostics", "ruff_index", "ruff_macros", + "ruff_notebook", "ruff_python_ast", "ruff_python_codegen", "ruff_python_index", @@ -2103,7 +2104,6 @@ dependencies = [ "semver", "serde", "serde_json", - "serde_with", "similar", "smallvec", "strum", @@ -2115,7 +2115,6 @@ dependencies = [ "typed-arena", "unicode-width", "unicode_names2", - "uuid", "wsl", ] @@ -2185,6 +2184,7 @@ dependencies = [ "ruff_diagnostics", "ruff_formatter", "ruff_macros", + "ruff_notebook", "ruff_python_ast", "ruff_python_formatter", "ruff_python_stdlib", @@ -2227,6 +2227,7 @@ dependencies = [ "ruff_cli", "ruff_diagnostics", "ruff_formatter", + "ruff_notebook", "ruff_python_ast", "ruff_python_codegen", "ruff_python_formatter", @@ -2292,6 +2293,25 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "ruff_notebook" +version = "0.0.0" +dependencies = [ + "anyhow", + "insta", + "itertools", + "once_cell", + "ruff_diagnostics", + "ruff_source_file", + "ruff_text_size", + "serde", + "serde_json", + "serde_with", + "test-case", + "thiserror", + "uuid", +] + [[package]] name = "ruff_python_ast" version = "0.0.0" diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index 7b9d30ebfd..e46613093b 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -18,6 +18,7 @@ name = "ruff" ruff_cache = { path = "../ruff_cache" } ruff_diagnostics = { path = "../ruff_diagnostics", features = ["serde"] } ruff_index = { path = "../ruff_index" } +ruff_notebook = { path = "../ruff_notebook" } ruff_macros = { path = "../ruff_macros" } ruff_python_ast = { path = "../ruff_python_ast", features = ["serde"] } ruff_python_codegen = { path = "../ruff_python_codegen" } @@ -64,17 +65,15 @@ schemars = { workspace = true, optional = true } semver = { version = "1.0.16" } serde = { workspace = true } serde_json = { workspace = true } -serde_with = { version = "3.0.0" } similar = { workspace = true } smallvec = { workspace = true } strum = { workspace = true } strum_macros = { workspace = true } -thiserror = { version = "1.0.43" } +thiserror = { workspace = true } toml = { workspace = true } typed-arena = { version = "2.0.2" } unicode-width = { workspace = true } unicode_names2 = { version = "0.6.0", git = "https://github.com/youknowone/unicode_names2.git", rev = "4ce16aa85cbcdd9cc830410f1a72ef9a235f2fde" } -uuid = { workspace = true, features = ["v4", "fast-rng", "macro-diagnostics", "js"] } wsl = { version = "0.1.0" } [dev-dependencies] diff --git a/crates/ruff/src/autofix/mod.rs b/crates/ruff/src/autofix/mod.rs index b85f1b54d2..6e33cb99a1 100644 --- a/crates/ruff/src/autofix/mod.rs +++ b/crates/ruff/src/autofix/mod.rs @@ -4,17 +4,15 @@ use std::collections::BTreeSet; use ruff_text_size::{Ranged, TextLen, TextRange, TextSize}; use rustc_hash::{FxHashMap, FxHashSet}; -use ruff_diagnostics::{Diagnostic, Edit, Fix, IsolationLevel}; +use ruff_diagnostics::{Diagnostic, Edit, Fix, IsolationLevel, SourceMap}; use ruff_source_file::Locator; -use crate::autofix::source_map::SourceMap; use crate::linter::FixTable; use crate::registry::{AsRule, Rule}; pub(crate) mod codemods; pub(crate) mod edits; pub(crate) mod snippet; -pub(crate) mod source_map; pub(crate) struct FixResult { /// The resulting source code, after applying all fixes. @@ -140,10 +138,9 @@ fn cmp_fix(rule1: Rule, rule2: Rule, fix1: &Fix, fix2: &Fix) -> std::cmp::Orderi mod tests { use ruff_text_size::{Ranged, TextSize}; - use ruff_diagnostics::{Diagnostic, Edit, Fix}; + use ruff_diagnostics::{Diagnostic, Edit, Fix, SourceMarker}; use ruff_source_file::Locator; - use crate::autofix::source_map::SourceMarker; use crate::autofix::{apply_fixes, FixResult}; use crate::rules::pycodestyle::rules::MissingNewlineAtEndOfFile; @@ -207,14 +204,8 @@ print("hello world") assert_eq!( source_map.markers(), &[ - SourceMarker { - source: 10.into(), - dest: 10.into(), - }, - SourceMarker { - source: 10.into(), - dest: 21.into(), - }, + SourceMarker::new(10.into(), 10.into(),), + SourceMarker::new(10.into(), 21.into(),), ] ); } @@ -250,14 +241,8 @@ class A(Bar): assert_eq!( source_map.markers(), &[ - SourceMarker { - source: 8.into(), - dest: 8.into(), - }, - SourceMarker { - source: 14.into(), - dest: 11.into(), - }, + SourceMarker::new(8.into(), 8.into(),), + SourceMarker::new(14.into(), 11.into(),), ] ); } @@ -289,14 +274,8 @@ class A: assert_eq!( source_map.markers(), &[ - SourceMarker { - source: 7.into(), - dest: 7.into() - }, - SourceMarker { - source: 15.into(), - dest: 7.into() - } + SourceMarker::new(7.into(), 7.into()), + SourceMarker::new(15.into(), 7.into()), ] ); } @@ -332,22 +311,10 @@ class A(object): assert_eq!( source_map.markers(), &[ - SourceMarker { - source: 8.into(), - dest: 8.into() - }, - SourceMarker { - source: 16.into(), - dest: 8.into() - }, - SourceMarker { - source: 22.into(), - dest: 14.into(), - }, - SourceMarker { - source: 30.into(), - dest: 14.into(), - } + SourceMarker::new(8.into(), 8.into()), + SourceMarker::new(16.into(), 8.into()), + SourceMarker::new(22.into(), 14.into(),), + SourceMarker::new(30.into(), 14.into(),), ] ); } @@ -382,14 +349,8 @@ class A: assert_eq!( source_map.markers(), &[ - SourceMarker { - source: 7.into(), - dest: 7.into(), - }, - SourceMarker { - source: 15.into(), - dest: 7.into(), - } + SourceMarker::new(7.into(), 7.into(),), + SourceMarker::new(15.into(), 7.into(),), ] ); } diff --git a/crates/ruff/src/lib.rs b/crates/ruff/src/lib.rs index a623582ad8..676e521dfe 100644 --- a/crates/ruff/src/lib.rs +++ b/crates/ruff/src/lib.rs @@ -20,7 +20,6 @@ mod doc_lines; mod docstrings; pub mod fs; mod importer; -pub mod jupyter; mod lex; pub mod line_width; pub mod linter; diff --git a/crates/ruff/src/linter.rs b/crates/ruff/src/linter.rs index e247377b00..25a66ca836 100644 --- a/crates/ruff/src/linter.rs +++ b/crates/ruff/src/linter.rs @@ -6,8 +6,6 @@ use anyhow::{anyhow, Result}; use colored::Colorize; use itertools::Itertools; use log::error; -use ruff_python_parser::lexer::LexResult; -use ruff_python_parser::{AsMode, ParseError}; use rustc_hash::FxHashMap; use ruff_diagnostics::Diagnostic; @@ -15,7 +13,8 @@ use ruff_python_ast::imports::ImportMap; use ruff_python_ast::PySourceType; use ruff_python_codegen::Stylist; use ruff_python_index::Indexer; - +use ruff_python_parser::lexer::LexResult; +use ruff_python_parser::{AsMode, ParseError}; use ruff_source_file::{Locator, SourceFileBuilder}; use ruff_text_size::Ranged; @@ -609,3 +608,133 @@ This indicates a bug in `{}`. If you could open an issue at: ); } } + +#[cfg(test)] +mod tests { + use std::path::Path; + + use anyhow::Result; + use test_case::test_case; + + use ruff_notebook::{Notebook, NotebookError}; + + use crate::registry::Rule; + use crate::source_kind::SourceKind; + use crate::test::{test_contents, test_notebook_path, TestedNotebook}; + use crate::{assert_messages, settings}; + + /// Construct a path to a Jupyter notebook in the `resources/test/fixtures/jupyter` directory. + fn notebook_path(path: impl AsRef) -> std::path::PathBuf { + Path::new("../ruff_notebook/resources/test/fixtures/jupyter").join(path) + } + + #[test] + fn test_import_sorting() -> Result<(), NotebookError> { + let actual = notebook_path("isort.ipynb"); + let expected = notebook_path("isort_expected.ipynb"); + let TestedNotebook { + messages, + source_notebook, + .. + } = test_notebook_path( + &actual, + expected, + &settings::Settings::for_rule(Rule::UnsortedImports), + )?; + assert_messages!(messages, actual, source_notebook); + Ok(()) + } + + #[test] + fn test_ipy_escape_command() -> Result<(), NotebookError> { + let actual = notebook_path("ipy_escape_command.ipynb"); + let expected = notebook_path("ipy_escape_command_expected.ipynb"); + let TestedNotebook { + messages, + source_notebook, + .. + } = test_notebook_path( + &actual, + expected, + &settings::Settings::for_rule(Rule::UnusedImport), + )?; + assert_messages!(messages, actual, source_notebook); + Ok(()) + } + + #[test] + fn test_unused_variable() -> Result<(), NotebookError> { + let actual = notebook_path("unused_variable.ipynb"); + let expected = notebook_path("unused_variable_expected.ipynb"); + let TestedNotebook { + messages, + source_notebook, + .. + } = test_notebook_path( + &actual, + expected, + &settings::Settings::for_rule(Rule::UnusedVariable), + )?; + assert_messages!(messages, actual, source_notebook); + Ok(()) + } + + #[test] + fn test_json_consistency() -> Result<()> { + let actual_path = notebook_path("before_fix.ipynb"); + let expected_path = notebook_path("after_fix.ipynb"); + + let TestedNotebook { + linted_notebook: fixed_notebook, + .. + } = test_notebook_path( + actual_path, + &expected_path, + &settings::Settings::for_rule(Rule::UnusedImport), + )?; + let mut writer = Vec::new(); + fixed_notebook.write(&mut writer)?; + let actual = String::from_utf8(writer)?; + let expected = std::fs::read_to_string(expected_path)?; + assert_eq!(actual, expected); + Ok(()) + } + + #[test_case(Path::new("before_fix.ipynb"), true; "trailing_newline")] + #[test_case(Path::new("no_trailing_newline.ipynb"), false; "no_trailing_newline")] + fn test_trailing_newline(path: &Path, trailing_newline: bool) -> Result<()> { + let notebook = Notebook::from_path(¬ebook_path(path))?; + assert_eq!(notebook.trailing_newline(), trailing_newline); + + let mut writer = Vec::new(); + notebook.write(&mut writer)?; + let string = String::from_utf8(writer)?; + assert_eq!(string.ends_with('\n'), trailing_newline); + + Ok(()) + } + + // Version <4.5, don't emit cell ids + #[test_case(Path::new("no_cell_id.ipynb"), false; "no_cell_id")] + // Version 4.5, cell ids are missing and need to be added + #[test_case(Path::new("add_missing_cell_id.ipynb"), true; "add_missing_cell_id")] + fn test_cell_id(path: &Path, has_id: bool) -> Result<()> { + let source_notebook = Notebook::from_path(¬ebook_path(path))?; + let source_kind = SourceKind::IpyNotebook(source_notebook); + let (_, transformed) = test_contents( + &source_kind, + path, + &settings::Settings::for_rule(Rule::UnusedImport), + ); + let linted_notebook = transformed.into_owned().expect_ipy_notebook(); + let mut writer = Vec::new(); + linted_notebook.write(&mut writer)?; + let actual = String::from_utf8(writer)?; + if has_id { + assert!(actual.contains(r#""id": ""#)); + } else { + assert!(!actual.contains(r#""id":"#)); + } + Ok(()) + } +} diff --git a/crates/ruff/src/logging.rs b/crates/ruff/src/logging.rs index 6645e38eae..4624758d70 100644 --- a/crates/ruff/src/logging.rs +++ b/crates/ruff/src/logging.rs @@ -12,8 +12,8 @@ use ruff_python_parser::{ParseError, ParseErrorType}; use ruff_source_file::{OneIndexed, SourceCode, SourceLocation}; use crate::fs; -use crate::jupyter::Notebook; use crate::source_kind::SourceKind; +use ruff_notebook::Notebook; pub static WARNINGS: Lazy>> = Lazy::new(Mutex::default); diff --git a/crates/ruff/src/message/grouped.rs b/crates/ruff/src/message/grouped.rs index 467a5b5466..e0ab1ecbaf 100644 --- a/crates/ruff/src/message/grouped.rs +++ b/crates/ruff/src/message/grouped.rs @@ -4,10 +4,10 @@ use std::num::NonZeroUsize; use colored::Colorize; +use ruff_notebook::{Notebook, NotebookIndex}; use ruff_source_file::OneIndexed; use crate::fs::relativize_path; -use crate::jupyter::{Notebook, NotebookIndex}; use crate::message::diff::calculate_print_width; use crate::message::text::{MessageCodeFrame, RuleCodeAndBody}; use crate::message::{ diff --git a/crates/ruff/src/message/mod.rs b/crates/ruff/src/message/mod.rs index ea89872600..5e7effe145 100644 --- a/crates/ruff/src/message/mod.rs +++ b/crates/ruff/src/message/mod.rs @@ -14,12 +14,11 @@ pub use json_lines::JsonLinesEmitter; pub use junit::JunitEmitter; pub use pylint::PylintEmitter; use ruff_diagnostics::{Diagnostic, DiagnosticKind, Fix}; +use ruff_notebook::Notebook; use ruff_source_file::{SourceFile, SourceLocation}; use ruff_text_size::{Ranged, TextRange, TextSize}; pub use text::TextEmitter; -use crate::jupyter::Notebook; - mod azure; mod diff; mod github; diff --git a/crates/ruff/src/message/text.rs b/crates/ruff/src/message/text.rs index 1daec724d3..fd046ea366 100644 --- a/crates/ruff/src/message/text.rs +++ b/crates/ruff/src/message/text.rs @@ -7,11 +7,11 @@ use annotate_snippets::snippet::{Annotation, AnnotationType, Slice, Snippet, Sou use bitflags::bitflags; use colored::Colorize; +use ruff_notebook::{Notebook, NotebookIndex}; use ruff_source_file::{OneIndexed, SourceLocation}; use ruff_text_size::{Ranged, TextRange, TextSize}; use crate::fs::relativize_path; -use crate::jupyter::{Notebook, NotebookIndex}; use crate::line_width::{LineWidthBuilder, TabSize}; use crate::message::diff::Diff; use crate::message::{Emitter, EmitterContext, Message}; diff --git a/crates/ruff/src/rules/isort/block.rs b/crates/ruff/src/rules/isort/block.rs index b4fdee6d44..192608f4a4 100644 --- a/crates/ruff/src/rules/isort/block.rs +++ b/crates/ruff/src/rules/isort/block.rs @@ -1,13 +1,13 @@ -use ruff_python_ast::{self as ast, ElifElseClause, ExceptHandler, MatchCase, Stmt}; -use ruff_text_size::{Ranged, TextRange, TextSize}; use std::iter::Peekable; use std::slice; +use ruff_notebook::Notebook; use ruff_python_ast::statement_visitor::StatementVisitor; +use ruff_python_ast::{self as ast, ElifElseClause, ExceptHandler, MatchCase, Stmt}; use ruff_source_file::Locator; +use ruff_text_size::{Ranged, TextRange, TextSize}; use crate::directives::IsortDirectives; -use crate::jupyter::Notebook; use crate::rules::isort::helpers; use crate::source_kind::SourceKind; diff --git a/crates/ruff/src/jupyter/snapshots/ruff__jupyter__notebook__tests__import_sorting.snap b/crates/ruff/src/snapshots/ruff__linter__tests__import_sorting.snap similarity index 97% rename from crates/ruff/src/jupyter/snapshots/ruff__jupyter__notebook__tests__import_sorting.snap rename to crates/ruff/src/snapshots/ruff__linter__tests__import_sorting.snap index e0ab3572a8..1bba6e1056 100644 --- a/crates/ruff/src/jupyter/snapshots/ruff__jupyter__notebook__tests__import_sorting.snap +++ b/crates/ruff/src/snapshots/ruff__linter__tests__import_sorting.snap @@ -1,5 +1,5 @@ --- -source: crates/ruff/src/jupyter/notebook.rs +source: crates/ruff/src/linter.rs --- isort.ipynb:cell 1:1:1: I001 [*] Import block is un-sorted or un-formatted | diff --git a/crates/ruff/src/jupyter/snapshots/ruff__jupyter__notebook__tests__ipy_escape_command.snap b/crates/ruff/src/snapshots/ruff__linter__tests__ipy_escape_command.snap similarity index 87% rename from crates/ruff/src/jupyter/snapshots/ruff__jupyter__notebook__tests__ipy_escape_command.snap rename to crates/ruff/src/snapshots/ruff__linter__tests__ipy_escape_command.snap index 57f92d184e..c471bd56aa 100644 --- a/crates/ruff/src/jupyter/snapshots/ruff__jupyter__notebook__tests__ipy_escape_command.snap +++ b/crates/ruff/src/snapshots/ruff__linter__tests__ipy_escape_command.snap @@ -1,5 +1,5 @@ --- -source: crates/ruff/src/jupyter/notebook.rs +source: crates/ruff/src/linter.rs --- ipy_escape_command.ipynb:cell 1:5:8: F401 [*] `os` imported but unused | diff --git a/crates/ruff/src/jupyter/snapshots/ruff__jupyter__notebook__tests__unused_variable.snap b/crates/ruff/src/snapshots/ruff__linter__tests__unused_variable.snap similarity index 97% rename from crates/ruff/src/jupyter/snapshots/ruff__jupyter__notebook__tests__unused_variable.snap rename to crates/ruff/src/snapshots/ruff__linter__tests__unused_variable.snap index 689e20e25e..5557899715 100644 --- a/crates/ruff/src/jupyter/snapshots/ruff__jupyter__notebook__tests__unused_variable.snap +++ b/crates/ruff/src/snapshots/ruff__linter__tests__unused_variable.snap @@ -1,5 +1,5 @@ --- -source: crates/ruff/src/jupyter/notebook.rs +source: crates/ruff/src/linter.rs --- unused_variable.ipynb:cell 1:2:5: F841 [*] Local variable `foo1` is assigned to but never used | diff --git a/crates/ruff/src/source_kind.rs b/crates/ruff/src/source_kind.rs index ac2d650f37..4960be226f 100644 --- a/crates/ruff/src/source_kind.rs +++ b/crates/ruff/src/source_kind.rs @@ -1,5 +1,5 @@ -use crate::autofix::source_map::SourceMap; -use crate::jupyter::Notebook; +use ruff_diagnostics::SourceMap; +use ruff_notebook::Notebook; #[derive(Clone, Debug, PartialEq, is_macro::Is)] pub enum SourceKind { diff --git a/crates/ruff/src/test.rs b/crates/ruff/src/test.rs index f03de7e22b..9221091a0e 100644 --- a/crates/ruff/src/test.rs +++ b/crates/ruff/src/test.rs @@ -21,7 +21,6 @@ use ruff_text_size::Ranged; use crate::autofix::{fix_file, FixResult}; use crate::directives; -use crate::jupyter::{Notebook, NotebookError}; use crate::linter::{check_path, LinterResult}; use crate::message::{Emitter, EmitterContext, Message, TextEmitter}; use crate::packaging::detect_package_root; @@ -29,6 +28,7 @@ use crate::registry::AsRule; use crate::rules::pycodestyle::rules::syntax_error; use crate::settings::{flags, Settings}; use crate::source_kind::SourceKind; +use ruff_notebook::{Notebook, NotebookError}; #[cfg(not(fuzzing))] pub(crate) fn test_resource_path(path: impl AsRef) -> std::path::PathBuf { diff --git a/crates/ruff_cli/Cargo.toml b/crates/ruff_cli/Cargo.toml index 9f81c42389..115ade470a 100644 --- a/crates/ruff_cli/Cargo.toml +++ b/crates/ruff_cli/Cargo.toml @@ -25,6 +25,7 @@ ruff = { path = "../ruff", features = ["clap"] } ruff_cache = { path = "../ruff_cache" } ruff_diagnostics = { path = "../ruff_diagnostics" } ruff_formatter = { path = "../ruff_formatter" } +ruff_notebook = { path = "../ruff_notebook" } ruff_macros = { path = "../ruff_macros" } ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_formatter = { path = "../ruff_python_formatter" } diff --git a/crates/ruff_cli/src/diagnostics.rs b/crates/ruff_cli/src/diagnostics.rs index e15ac3d21e..2397a33cce 100644 --- a/crates/ruff_cli/src/diagnostics.rs +++ b/crates/ruff_cli/src/diagnostics.rs @@ -1,8 +1,8 @@ #![cfg_attr(target_family = "wasm", allow(dead_code))] -use std::fs::write; +use std::fs::{write, File}; use std::io; -use std::io::Write; +use std::io::{BufWriter, Write}; use std::ops::AddAssign; #[cfg(unix)] use std::os::unix::fs::PermissionsExt; @@ -16,7 +16,6 @@ use rustc_hash::FxHashMap; use similar::TextDiff; use thiserror::Error; -use ruff::jupyter::{Cell, Notebook, NotebookError}; use ruff::linter::{lint_fix, lint_only, FixTable, FixerResult, LinterResult}; use ruff::logging::DisplayParseError; use ruff::message::Message; @@ -27,6 +26,7 @@ use ruff::source_kind::SourceKind; use ruff::{fs, IOError, SyntaxError}; use ruff_diagnostics::Diagnostic; use ruff_macros::CacheKey; +use ruff_notebook::{Cell, Notebook, NotebookError}; use ruff_python_ast::imports::ImportMap; use ruff_python_ast::{PySourceType, SourceType, TomlSourceType}; use ruff_source_file::{LineIndex, SourceCode, SourceFileBuilder}; @@ -243,7 +243,8 @@ pub(crate) fn lint_path( write(path, transformed.as_bytes())?; } SourceKind::IpyNotebook(notebook) => { - notebook.write(path)?; + let mut writer = BufWriter::new(File::create(path)?); + notebook.write(&mut writer)?; } }, flags::FixMode::Diff => { @@ -565,8 +566,7 @@ impl From<&SourceExtractionError> for Diagnostic { } // Syntax errors. SourceExtractionError::Notebook( - NotebookError::PythonSource(_) - | NotebookError::InvalidJson(_) + NotebookError::InvalidJson(_) | NotebookError::InvalidSchema(_) | NotebookError::InvalidFormat(_), ) => Diagnostic::new( diff --git a/crates/ruff_dev/Cargo.toml b/crates/ruff_dev/Cargo.toml index 901b0c1de9..4460e7cfb7 100644 --- a/crates/ruff_dev/Cargo.toml +++ b/crates/ruff_dev/Cargo.toml @@ -18,6 +18,7 @@ ruff_formatter = { path = "../ruff_formatter" } ruff_python_ast = { path = "../ruff_python_ast" } ruff_python_codegen = { path = "../ruff_python_codegen" } ruff_python_formatter = { path = "../ruff_python_formatter" } +ruff_notebook = { path = "../ruff_notebook" } ruff_python_literal = { path = "../ruff_python_literal" } ruff_python_parser = { path = "../ruff_python_parser" } ruff_python_stdlib = { path = "../ruff_python_stdlib" } diff --git a/crates/ruff_dev/src/round_trip.rs b/crates/ruff_dev/src/round_trip.rs index a85d57e8cb..d99430ea31 100644 --- a/crates/ruff_dev/src/round_trip.rs +++ b/crates/ruff_dev/src/round_trip.rs @@ -6,7 +6,6 @@ use std::path::PathBuf; use anyhow::Result; -use ruff::jupyter; use ruff_python_codegen::round_trip; use ruff_python_stdlib::path::is_jupyter_notebook; @@ -20,7 +19,7 @@ pub(crate) struct Args { pub(crate) fn main(args: &Args) -> Result<()> { let path = args.file.as_path(); if is_jupyter_notebook(path) { - println!("{}", jupyter::round_trip(path)?); + println!("{}", ruff_notebook::round_trip(path)?); } else { let contents = fs::read_to_string(&args.file)?; println!("{}", round_trip(&contents, &args.file.to_string_lossy())?); diff --git a/crates/ruff_diagnostics/src/lib.rs b/crates/ruff_diagnostics/src/lib.rs index c166e8dbd8..f093861de7 100644 --- a/crates/ruff_diagnostics/src/lib.rs +++ b/crates/ruff_diagnostics/src/lib.rs @@ -1,9 +1,11 @@ pub use diagnostic::{Diagnostic, DiagnosticKind}; pub use edit::Edit; pub use fix::{Applicability, Fix, IsolationLevel}; +pub use source_map::{SourceMap, SourceMarker}; pub use violation::{AlwaysAutofixableViolation, AutofixKind, Violation}; mod diagnostic; mod edit; mod fix; +mod source_map; mod violation; diff --git a/crates/ruff/src/autofix/source_map.rs b/crates/ruff_diagnostics/src/source_map.rs similarity index 71% rename from crates/ruff/src/autofix/source_map.rs rename to crates/ruff_diagnostics/src/source_map.rs index 7871e51d9c..161496eadc 100644 --- a/crates/ruff/src/autofix/source_map.rs +++ b/crates/ruff_diagnostics/src/source_map.rs @@ -1,15 +1,29 @@ use ruff_text_size::{Ranged, TextSize}; -use ruff_diagnostics::Edit; +use crate::Edit; /// Lightweight sourcemap marker representing the source and destination /// position for an [`Edit`]. #[derive(Debug, PartialEq, Eq)] -pub(crate) struct SourceMarker { +pub struct SourceMarker { /// Position of the marker in the original source. - pub(crate) source: TextSize, + source: TextSize, /// Position of the marker in the transformed code. - pub(crate) dest: TextSize, + dest: TextSize, +} + +impl SourceMarker { + pub fn new(source: TextSize, dest: TextSize) -> Self { + Self { source, dest } + } + + pub const fn source(&self) -> TextSize { + self.source + } + + pub const fn dest(&self) -> TextSize { + self.dest + } } /// A collection of [`SourceMarker`]. @@ -18,12 +32,12 @@ pub(crate) struct SourceMarker { /// the transformed code. Here, only the boundaries of edits are tracked instead /// of every single character. #[derive(Default, PartialEq, Eq)] -pub(crate) struct SourceMap(Vec); +pub struct SourceMap(Vec); impl SourceMap { /// Returns a slice of all the markers in the sourcemap in the order they /// were added. - pub(crate) fn markers(&self) -> &[SourceMarker] { + pub fn markers(&self) -> &[SourceMarker] { &self.0 } @@ -31,7 +45,7 @@ impl SourceMap { /// /// The `output_length` is the length of the transformed string before the /// edit is applied. - pub(crate) fn push_start_marker(&mut self, edit: &Edit, output_length: TextSize) { + pub fn push_start_marker(&mut self, edit: &Edit, output_length: TextSize) { self.0.push(SourceMarker { source: edit.start(), dest: output_length, @@ -42,7 +56,7 @@ impl SourceMap { /// /// The `output_length` is the length of the transformed string after the /// edit has been applied. - pub(crate) fn push_end_marker(&mut self, edit: &Edit, output_length: TextSize) { + pub fn push_end_marker(&mut self, edit: &Edit, output_length: TextSize) { if edit.is_insertion() { self.0.push(SourceMarker { source: edit.start(), diff --git a/crates/ruff_notebook/Cargo.toml b/crates/ruff_notebook/Cargo.toml new file mode 100644 index 0000000000..e6a9f348fc --- /dev/null +++ b/crates/ruff_notebook/Cargo.toml @@ -0,0 +1,31 @@ +[package] +name = "ruff_notebook" +version = "0.0.0" +publish = false +authors = { workspace = true } +edition = { workspace = true } +rust-version = { workspace = true } +homepage = { workspace = true } +documentation = { workspace = true } +repository = { workspace = true } +license = { workspace = true } + +[lib] + +[dependencies] +ruff_diagnostics = { path = "../ruff_diagnostics" } +ruff_source_file = { path = "../ruff_source_file" } +ruff_text_size = { path = "../ruff_text_size" } + +anyhow = { workspace = true } +itertools = { workspace = true } +once_cell = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +serde_with = { version = "3.0.0" } +thiserror = { workspace = true } +uuid = { workspace = true } + +[dev-dependencies] +insta = { workspace = true } +test-case = { workspace = true } diff --git a/crates/ruff/resources/test/fixtures/jupyter/R.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/R.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/R.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/R.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/add_missing_cell_id.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/add_missing_cell_id.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/add_missing_cell_id.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/add_missing_cell_id.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/after_fix.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/after_fix.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/after_fix.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/after_fix.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/before_fix.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/before_fix.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/before_fix.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/before_fix.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/cell/cell_magic.json b/crates/ruff_notebook/resources/test/fixtures/jupyter/cell/cell_magic.json similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/cell/cell_magic.json rename to crates/ruff_notebook/resources/test/fixtures/jupyter/cell/cell_magic.json diff --git a/crates/ruff/resources/test/fixtures/jupyter/cell/code_and_magic.json b/crates/ruff_notebook/resources/test/fixtures/jupyter/cell/code_and_magic.json similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/cell/code_and_magic.json rename to crates/ruff_notebook/resources/test/fixtures/jupyter/cell/code_and_magic.json diff --git a/crates/ruff/resources/test/fixtures/jupyter/cell/markdown.json b/crates/ruff_notebook/resources/test/fixtures/jupyter/cell/markdown.json similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/cell/markdown.json rename to crates/ruff_notebook/resources/test/fixtures/jupyter/cell/markdown.json diff --git a/crates/ruff/resources/test/fixtures/jupyter/cell/only_code.json b/crates/ruff_notebook/resources/test/fixtures/jupyter/cell/only_code.json similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/cell/only_code.json rename to crates/ruff_notebook/resources/test/fixtures/jupyter/cell/only_code.json diff --git a/crates/ruff/resources/test/fixtures/jupyter/cell/only_magic.json b/crates/ruff_notebook/resources/test/fixtures/jupyter/cell/only_magic.json similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/cell/only_magic.json rename to crates/ruff_notebook/resources/test/fixtures/jupyter/cell/only_magic.json diff --git a/crates/ruff/resources/test/fixtures/jupyter/invalid_extension.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/invalid_extension.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/invalid_extension.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/invalid_extension.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/ipy_escape_command.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/ipy_escape_command.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/ipy_escape_command.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/ipy_escape_command.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/ipy_escape_command_expected.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/ipy_escape_command_expected.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/ipy_escape_command_expected.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/ipy_escape_command_expected.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/isort.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/isort.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/isort.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/isort.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/isort_expected.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/isort_expected.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/isort_expected.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/isort_expected.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/no_cell_id.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/no_cell_id.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/no_cell_id.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/no_cell_id.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/no_trailing_newline.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/no_trailing_newline.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/no_trailing_newline.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/no_trailing_newline.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/not_json.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/not_json.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/not_json.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/not_json.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/unused_variable.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/unused_variable.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/unused_variable.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/unused_variable.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/unused_variable_expected.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/unused_variable_expected.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/unused_variable_expected.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/unused_variable_expected.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/valid.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/valid.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/valid.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/valid.ipynb diff --git a/crates/ruff/resources/test/fixtures/jupyter/wrong_schema.ipynb b/crates/ruff_notebook/resources/test/fixtures/jupyter/wrong_schema.ipynb similarity index 100% rename from crates/ruff/resources/test/fixtures/jupyter/wrong_schema.ipynb rename to crates/ruff_notebook/resources/test/fixtures/jupyter/wrong_schema.ipynb diff --git a/crates/ruff/src/jupyter/index.rs b/crates/ruff_notebook/src/index.rs similarity index 100% rename from crates/ruff/src/jupyter/index.rs rename to crates/ruff_notebook/src/index.rs diff --git a/crates/ruff/src/jupyter/mod.rs b/crates/ruff_notebook/src/lib.rs similarity index 100% rename from crates/ruff/src/jupyter/mod.rs rename to crates/ruff_notebook/src/lib.rs diff --git a/crates/ruff/src/jupyter/notebook.rs b/crates/ruff_notebook/src/notebook.rs similarity index 73% rename from crates/ruff/src/jupyter/notebook.rs rename to crates/ruff_notebook/src/notebook.rs index aa04d2a3c3..66b91199a4 100644 --- a/crates/ruff/src/jupyter/notebook.rs +++ b/crates/ruff_notebook/src/notebook.rs @@ -1,7 +1,7 @@ use std::cmp::Ordering; use std::fmt::Display; use std::fs::File; -use std::io::{BufReader, BufWriter, Cursor, Read, Seek, SeekFrom, Write}; +use std::io::{BufReader, Cursor, Read, Seek, SeekFrom, Write}; use std::path::Path; use std::{io, iter}; @@ -12,14 +12,12 @@ use serde_json::error::Category; use thiserror::Error; use uuid::Uuid; -use ruff_python_parser::lexer::lex; -use ruff_python_parser::Mode; +use ruff_diagnostics::{SourceMap, SourceMarker}; use ruff_source_file::{NewlineWithTrailingNewline, UniversalNewlineIterator}; use ruff_text_size::TextSize; -use crate::autofix::source_map::{SourceMap, SourceMarker}; -use crate::jupyter::index::NotebookIndex; -use crate::jupyter::schema::{Cell, RawNotebook, SortAlphabetically, SourceValue}; +use crate::index::NotebookIndex; +use crate::schema::{Cell, RawNotebook, SortAlphabetically, SourceValue}; /// Run round-trip source code generation on a given Jupyter notebook file path. pub fn round_trip(path: &Path) -> anyhow::Result { @@ -33,7 +31,7 @@ pub fn round_trip(path: &Path) -> anyhow::Result { let code = notebook.source_code().to_string(); notebook.update_cell_content(&code); let mut writer = Vec::new(); - notebook.write_inner(&mut writer)?; + notebook.write(&mut writer)?; Ok(String::from_utf8(writer)?) } @@ -99,8 +97,6 @@ pub enum NotebookError { Io(#[from] io::Error), #[error(transparent)] Json(serde_json::Error), - #[error("Expected a Jupyter Notebook, which must be internally stored as JSON, but found a Python source file: {0}")] - PythonSource(serde_json::Error), #[error("Expected a Jupyter Notebook, which must be internally stored as JSON, but this file isn't valid JSON: {0}")] InvalidJson(serde_json::Error), #[error("This file does not match the schema expected of Jupyter Notebooks: {0}")] @@ -162,24 +158,10 @@ impl Notebook { // Translate the error into a diagnostic return Err(match err.classify() { Category::Io => NotebookError::Json(err), - Category::Syntax | Category::Eof => { - // Maybe someone saved the python sources (those with the `# %%` separator) - // as jupyter notebook instead. Let's help them. - let mut contents = String::new(); - reader - .rewind() - .and_then(|_| reader.read_to_string(&mut contents))?; - - // Check if tokenizing was successful and the file is non-empty - if lex(&contents, Mode::Module).any(|result| result.is_err()) { - NotebookError::InvalidJson(err) - } else { - NotebookError::PythonSource(err) - } - } + Category::Syntax | Category::Eof => NotebookError::InvalidJson(err), Category::Data => { // We could try to read the schema version here but if this fails it's - // a bug anyway + // a bug anyway. NotebookError::InvalidSchema(err) } }); @@ -256,13 +238,13 @@ impl Notebook { // The first offset is always going to be at 0, so skip it. for offset in self.cell_offsets.iter_mut().skip(1).rev() { let closest_marker = match last_marker { - Some(marker) if marker.source <= *offset => marker, + Some(marker) if marker.source() <= *offset => marker, _ => { let Some(marker) = source_map .markers() .iter() .rev() - .find(|m| m.source <= *offset) + .find(|marker| marker.source() <= *offset) else { // There are no markers above the current offset, so we can // stop here. @@ -273,9 +255,9 @@ impl Notebook { } }; - match closest_marker.source.cmp(&closest_marker.dest) { - Ordering::Less => *offset += closest_marker.dest - closest_marker.source, - Ordering::Greater => *offset -= closest_marker.source - closest_marker.dest, + match closest_marker.source().cmp(&closest_marker.dest()) { + Ordering::Less => *offset += closest_marker.dest() - closest_marker.source(), + Ordering::Greater => *offset -= closest_marker.source() - closest_marker.dest(), Ordering::Equal => (), } } @@ -383,18 +365,23 @@ impl Notebook { /// The index is built only once when required. This is only used to /// report diagnostics, so by that time all of the autofixes must have /// been applied if `--fix` was passed. - pub(crate) fn index(&self) -> &NotebookIndex { + pub fn index(&self) -> &NotebookIndex { self.index.get_or_init(|| self.build_index()) } /// Return the cell offsets for the concatenated source code corresponding /// the Jupyter notebook. - pub(crate) fn cell_offsets(&self) -> &[TextSize] { + pub fn cell_offsets(&self) -> &[TextSize] { &self.cell_offsets } + /// Return `true` if the notebook has a trailing newline, `false` otherwise. + pub fn trailing_newline(&self) -> bool { + self.trailing_newline + } + /// Update the notebook with the given sourcemap and transformed content. - pub(crate) fn update(&mut self, source_map: &SourceMap, transformed: String) { + pub fn update(&mut self, source_map: &SourceMap, transformed: String) { // Cell offsets must be updated before updating the cell content as // it depends on the offsets to extract the cell content. self.index.take(); @@ -417,7 +404,8 @@ impl Notebook { .map_or(true, |language| language.name == "python") } - fn write_inner(&self, writer: &mut impl Write) -> anyhow::Result<()> { + /// Write the notebook back to the given [`Write`] implementor. + pub fn write(&self, writer: &mut dyn Write) -> anyhow::Result<()> { // https://github.com/psf/black/blob/69ca0a4c7a365c5f5eea519a90980bab72cab764/src/black/__init__.py#LL1041 let formatter = serde_json::ser::PrettyFormatter::with_indent(b" "); let mut serializer = serde_json::Serializer::with_formatter(writer, formatter); @@ -427,13 +415,6 @@ impl Notebook { } Ok(()) } - - /// Write back with an indent of 1, just like black - pub fn write(&self, path: &Path) -> anyhow::Result<()> { - let mut writer = BufWriter::new(File::create(path)?); - self.write_inner(&mut writer)?; - Ok(()) - } } #[cfg(test)] @@ -443,17 +424,11 @@ mod tests { use anyhow::Result; use test_case::test_case; - use crate::jupyter::index::NotebookIndex; - use crate::jupyter::schema::Cell; - use crate::jupyter::{Notebook, NotebookError}; - use crate::registry::Rule; - use crate::source_kind::SourceKind; - use crate::test::{test_contents, test_notebook_path, test_resource_path, TestedNotebook}; - use crate::{assert_messages, settings}; + use crate::{Cell, Notebook, NotebookError, NotebookIndex}; /// Construct a path to a Jupyter notebook in the `resources/test/fixtures/jupyter` directory. fn notebook_path(path: impl AsRef) -> std::path::PathBuf { - test_resource_path("fixtures/jupyter").join(path) + Path::new("./resources/test/fixtures/jupyter").join(path) } #[test] @@ -474,7 +449,7 @@ mod tests { fn test_invalid() { assert!(matches!( Notebook::from_path(¬ebook_path("invalid_extension.ipynb")), - Err(NotebookError::PythonSource(_)) + Err(NotebookError::InvalidJson(_)) )); assert!(matches!( Notebook::from_path(¬ebook_path("not_json.ipynb")), @@ -545,114 +520,4 @@ print("after empty cells") ); Ok(()) } - - #[test] - fn test_import_sorting() -> Result<(), NotebookError> { - let actual = notebook_path("isort.ipynb"); - let expected = notebook_path("isort_expected.ipynb"); - let TestedNotebook { - messages, - source_notebook, - .. - } = test_notebook_path( - &actual, - expected, - &settings::Settings::for_rule(Rule::UnsortedImports), - )?; - assert_messages!(messages, actual, source_notebook); - Ok(()) - } - - #[test] - fn test_ipy_escape_command() -> Result<(), NotebookError> { - let actual = notebook_path("ipy_escape_command.ipynb"); - let expected = notebook_path("ipy_escape_command_expected.ipynb"); - let TestedNotebook { - messages, - source_notebook, - .. - } = test_notebook_path( - &actual, - expected, - &settings::Settings::for_rule(Rule::UnusedImport), - )?; - assert_messages!(messages, actual, source_notebook); - Ok(()) - } - - #[test] - fn test_unused_variable() -> Result<(), NotebookError> { - let actual = notebook_path("unused_variable.ipynb"); - let expected = notebook_path("unused_variable_expected.ipynb"); - let TestedNotebook { - messages, - source_notebook, - .. - } = test_notebook_path( - &actual, - expected, - &settings::Settings::for_rule(Rule::UnusedVariable), - )?; - assert_messages!(messages, actual, source_notebook); - Ok(()) - } - - #[test] - fn test_json_consistency() -> Result<()> { - let actual_path = notebook_path("before_fix.ipynb"); - let expected_path = notebook_path("after_fix.ipynb"); - - let TestedNotebook { - linted_notebook: fixed_notebook, - .. - } = test_notebook_path( - actual_path, - &expected_path, - &settings::Settings::for_rule(Rule::UnusedImport), - )?; - let mut writer = Vec::new(); - fixed_notebook.write_inner(&mut writer)?; - let actual = String::from_utf8(writer)?; - let expected = std::fs::read_to_string(expected_path)?; - assert_eq!(actual, expected); - Ok(()) - } - - #[test_case(Path::new("before_fix.ipynb"), true; "trailing_newline")] - #[test_case(Path::new("no_trailing_newline.ipynb"), false; "no_trailing_newline")] - fn test_trailing_newline(path: &Path, trailing_newline: bool) -> Result<()> { - let notebook = Notebook::from_path(¬ebook_path(path))?; - assert_eq!(notebook.trailing_newline, trailing_newline); - - let mut writer = Vec::new(); - notebook.write_inner(&mut writer)?; - let string = String::from_utf8(writer)?; - assert_eq!(string.ends_with('\n'), trailing_newline); - - Ok(()) - } - - // Version <4.5, don't emit cell ids - #[test_case(Path::new("no_cell_id.ipynb"), false; "no_cell_id")] - // Version 4.5, cell ids are missing and need to be added - #[test_case(Path::new("add_missing_cell_id.ipynb"), true; "add_missing_cell_id")] - fn test_cell_id(path: &Path, has_id: bool) -> Result<()> { - let source_notebook = Notebook::from_path(¬ebook_path(path))?; - let source_kind = SourceKind::IpyNotebook(source_notebook); - let (_, transformed) = test_contents( - &source_kind, - path, - &settings::Settings::for_rule(Rule::UnusedImport), - ); - let linted_notebook = transformed.into_owned().expect_ipy_notebook(); - let mut writer = Vec::new(); - linted_notebook.write_inner(&mut writer)?; - let actual = String::from_utf8(writer)?; - if has_id { - assert!(actual.contains(r#""id": ""#)); - } else { - assert!(!actual.contains(r#""id":"#)); - } - Ok(()) - } } diff --git a/crates/ruff/src/jupyter/schema.rs b/crates/ruff_notebook/src/schema.rs similarity index 99% rename from crates/ruff/src/jupyter/schema.rs rename to crates/ruff_notebook/src/schema.rs index e466615fec..63874def74 100644 --- a/crates/ruff/src/jupyter/schema.rs +++ b/crates/ruff_notebook/src/schema.rs @@ -46,7 +46,7 @@ fn sort_alphabetically( /// /// use serde::Serialize; /// -/// use ruff::jupyter::SortAlphabetically; +/// use ruff_notebook::SortAlphabetically; /// /// #[derive(Serialize)] /// struct MyStruct { From 33806b8b7c870b66371f9bafde9893bf09ccc429 Mon Sep 17 00:00:00 2001 From: Sergey Chudov <41333030+WindowGenerator@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:58:48 +0400 Subject: [PATCH 025/164] Fixed panic in `missing_copyright_notice` (#7029) --- crates/ruff/src/rules/flake8_copyright/mod.rs | 11 ++++ .../rules/missing_copyright_notice.rs | 9 +--- ...lake8_copyright__tests__char_boundary.snap | 10 ++++ crates/ruff_source_file/src/locator.rs | 53 +++++++++++++++++++ 4 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 crates/ruff/src/rules/flake8_copyright/snapshots/ruff__rules__flake8_copyright__tests__char_boundary.snap diff --git a/crates/ruff/src/rules/flake8_copyright/mod.rs b/crates/ruff/src/rules/flake8_copyright/mod.rs index 6e2a39c4cb..0d86c51cee 100644 --- a/crates/ruff/src/rules/flake8_copyright/mod.rs +++ b/crates/ruff/src/rules/flake8_copyright/mod.rs @@ -149,6 +149,17 @@ import os # Content Content Content Content Content Content Content Content Content Content # Copyright 2023 +"# + .trim(), + &settings::Settings::for_rules(vec![Rule::MissingCopyrightNotice]), + ); + assert_messages!(diagnostics); + } + + #[test] + fn char_boundary() { + let diagnostics = test_snippet( + r#"কককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককক "# .trim(), &settings::Settings::for_rules(vec![Rule::MissingCopyrightNotice]), diff --git a/crates/ruff/src/rules/flake8_copyright/rules/missing_copyright_notice.rs b/crates/ruff/src/rules/flake8_copyright/rules/missing_copyright_notice.rs index 3c99bb487f..6558580833 100644 --- a/crates/ruff/src/rules/flake8_copyright/rules/missing_copyright_notice.rs +++ b/crates/ruff/src/rules/flake8_copyright/rules/missing_copyright_notice.rs @@ -1,8 +1,7 @@ -use ruff_text_size::{TextRange, TextSize}; - use ruff_diagnostics::{Diagnostic, Violation}; use ruff_macros::{derive_message_formats, violation}; use ruff_source_file::Locator; +use ruff_text_size::{TextRange, TextSize}; use crate::settings::Settings; @@ -33,11 +32,7 @@ pub(crate) fn missing_copyright_notice( } // Only search the first 1024 bytes in the file. - let contents = if locator.len() < 1024 { - locator.contents() - } else { - locator.up_to(TextSize::from(1024)) - }; + let contents = locator.up_to(locator.floor_char_boundary(TextSize::new(1024))); // Locate the copyright notice. if let Some(match_) = settings.flake8_copyright.notice_rgx.find(contents) { diff --git a/crates/ruff/src/rules/flake8_copyright/snapshots/ruff__rules__flake8_copyright__tests__char_boundary.snap b/crates/ruff/src/rules/flake8_copyright/snapshots/ruff__rules__flake8_copyright__tests__char_boundary.snap new file mode 100644 index 0000000000..914f3528d0 --- /dev/null +++ b/crates/ruff/src/rules/flake8_copyright/snapshots/ruff__rules__flake8_copyright__tests__char_boundary.snap @@ -0,0 +1,10 @@ +--- +source: crates/ruff/src/rules/flake8_copyright/mod.rs +--- +:1:1: CPY001 Missing copyright notice at top of file + | +1 | কককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককককক + | CPY001 + | + + diff --git a/crates/ruff_source_file/src/locator.rs b/crates/ruff_source_file/src/locator.rs index 5198f1131f..9fc7a071bc 100644 --- a/crates/ruff_source_file/src/locator.rs +++ b/crates/ruff_source_file/src/locator.rs @@ -388,6 +388,59 @@ impl<'a> Locator<'a> { &self.contents[usize::from(offset)..] } + /// Finds the closest [`TextSize`] not exceeding the offset for which `is_char_boundary` is + /// `true`. + /// + /// Can be replaced with `str#floor_char_boundary` once it's stable. + /// + /// ## Examples + /// + /// ``` + /// # use ruff_text_size::{Ranged, TextRange, TextSize}; + /// # use ruff_source_file::Locator; + /// + /// let locator = Locator::new("Hello"); + /// + /// assert_eq!( + /// locator.floor_char_boundary(TextSize::from(0)), + /// TextSize::from(0) + /// ); + /// + /// assert_eq!( + /// locator.floor_char_boundary(TextSize::from(5)), + /// TextSize::from(5) + /// ); + /// + /// let locator = Locator::new("α"); + /// + /// assert_eq!( + /// locator.floor_char_boundary(TextSize::from(0)), + /// TextSize::from(0) + /// ); + /// + /// assert_eq!( + /// locator.floor_char_boundary(TextSize::from(1)), + /// TextSize::from(0) + /// ); + /// + /// assert_eq!( + /// locator.floor_char_boundary(TextSize::from(2)), + /// TextSize::from(2) + /// ); + /// ``` + pub fn floor_char_boundary(&self, offset: TextSize) -> TextSize { + if offset >= self.text_len() { + self.text_len() + } else { + // We know that the character boundary is within four bytes. + (0u32..=3u32) + .map(TextSize::from) + .filter_map(|index| offset.checked_sub(index)) + .find(|offset| self.contents.is_char_boundary(offset.to_usize())) + .unwrap_or_default() + } + } + /// Take the source code between the given [`TextRange`]. #[inline] pub fn slice(&self, ranged: T) -> &'a str { From 253a241f5d47f599a2e3f88dcbcde8d52cbcc2cc Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 1 Sep 2023 09:47:40 -0500 Subject: [PATCH 026/164] Add dependabot for `cargo` dependencies (#7034) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ideally we shouldn't have to run `cargo update` manually — it requires us to remember to do so and groups all updates into a single pull request making it challenging to determine which upgrade introduces regressions e.g. #6964. Here we add daily checks for cargo dependency updates. This pull request also simplifies dependabot configuration for GitHub Actions versions. --- .github/dependabot.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 67412d272c..eea20ebbe8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,8 +4,10 @@ updates: directory: "/" schedule: interval: "weekly" - day: "monday" - time: "12:00" - timezone: "America/New_York" - commit-message: - prefix: "ci(deps)" + labels: ["internal"] + + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "daily" + labels: ["internal"] From fbc9b5a604c98ab0e676a576a6e26be275efc364 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 15:00:11 +0000 Subject: [PATCH 027/164] Bump cloudflare/wrangler-action from 3.1.0 to 3.1.1 (#7045) --- .github/workflows/docs.yaml | 2 +- .github/workflows/playground.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index e340f0aa5a..f7d38be85c 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -40,7 +40,7 @@ jobs: run: mkdocs build --strict -f mkdocs.generated.yml - name: "Deploy to Cloudflare Pages" if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }} - uses: cloudflare/wrangler-action@v3.1.0 + uses: cloudflare/wrangler-action@v3.1.1 with: apiToken: ${{ secrets.CF_API_TOKEN }} accountId: ${{ secrets.CF_ACCOUNT_ID }} diff --git a/.github/workflows/playground.yaml b/.github/workflows/playground.yaml index 1c1e2ec857..116b3f6bb3 100644 --- a/.github/workflows/playground.yaml +++ b/.github/workflows/playground.yaml @@ -40,7 +40,7 @@ jobs: working-directory: playground - name: "Deploy to Cloudflare Pages" if: ${{ env.CF_API_TOKEN_EXISTS == 'true' }} - uses: cloudflare/wrangler-action@v3.1.0 + uses: cloudflare/wrangler-action@v3.1.1 with: apiToken: ${{ secrets.CF_API_TOKEN }} accountId: ${{ secrets.CF_ACCOUNT_ID }} From dea65536e9581c68f5393b05647697607e5eb26e Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 1 Sep 2023 17:27:32 +0100 Subject: [PATCH 028/164] Fix placement for comments within f-strings concatenations (#7047) ## Summary Restores the dangling comment handling for f-strings, which broke with the parenthesized expression code. Closes https://github.com/astral-sh/ruff/issues/6898. ## Test Plan `cargo test` No change in any of the similarity indexes or changed file counts: | project | similarity index | total files | changed files | |--------------|------------------:|------------------:|------------------:| | cpython | 0.76083 | 1789 | 1632 | | django | 0.99957 | 2760 | 67 | | transformers | 0.99927 | 2587 | 468 | | twine | 0.99982 | 33 | 1 | | typeshed | 0.99978 | 3496 | 2173 | | warehouse | 0.99818 | 648 | 24 | | zulip | 0.99942 | 1437 | 32 | --- .../test/fixtures/ruff/expression/fstring.py | 24 ++++++++++ .../src/comments/placement.rs | 14 ++++++ .../format@expression__fstring.py.snap | 48 +++++++++++++++++++ 3 files changed, 86 insertions(+) diff --git a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/fstring.py b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/fstring.py index a60efa1cdd..f808f11e94 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/fstring.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/fstring.py @@ -33,3 +33,27 @@ result_f = ( # comment '' ) + +( + f'{1}' # comment + f'{2}' +) + +( + f'{1}' + f'{2}' # comment +) + +( + 1, ( # comment + f'{2}' + ) +) + +( + ( + f'{1}' + # comment + ), + 2 +) diff --git a/crates/ruff_python_formatter/src/comments/placement.rs b/crates/ruff_python_formatter/src/comments/placement.rs index 1fb7fb7f4c..e1f299e531 100644 --- a/crates/ruff_python_formatter/src/comments/placement.rs +++ b/crates/ruff_python_formatter/src/comments/placement.rs @@ -70,6 +70,20 @@ fn handle_parenthesized_comment<'a>( comment: DecoratedComment<'a>, locator: &Locator, ) -> CommentPlacement<'a> { + // As a special-case, ignore comments within f-strings, like: + // ```python + // ( + // f'{1}' # comment + // f'{2}' + // ) + // ``` + // These can't be parenthesized, as they must fall between two string tokens in an implicit + // concatenation. But the expression ranges only include the `1` and `2` above, so we also + // can't lex the contents between them. + if comment.enclosing_node().is_expr_f_string() { + return CommentPlacement::Default(comment); + } + let Some(preceding) = comment.preceding_node() else { return CommentPlacement::Default(comment); }; diff --git a/crates/ruff_python_formatter/tests/snapshots/format@expression__fstring.py.snap b/crates/ruff_python_formatter/tests/snapshots/format@expression__fstring.py.snap index aa3f0a5133..37fa5a5e40 100644 --- a/crates/ruff_python_formatter/tests/snapshots/format@expression__fstring.py.snap +++ b/crates/ruff_python_formatter/tests/snapshots/format@expression__fstring.py.snap @@ -39,6 +39,30 @@ result_f = ( # comment '' ) + +( + f'{1}' # comment + f'{2}' +) + +( + f'{1}' + f'{2}' # comment +) + +( + 1, ( # comment + f'{2}' + ) +) + +( + ( + f'{1}' + # comment + ), + 2 +) ``` ## Output @@ -76,6 +100,30 @@ result_f = ( # comment "" ) + +( + f"{1}" # comment + f"{2}" +) + +( + f"{1}" f"{2}" # comment +) + +( + 1, + ( # comment + f"{2}" + ), +) + +( + ( + f"{1}" + # comment + ), + 2, +) ``` From 2f3a950f6f2e2060b6c083b08ad9adacfae87185 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Fri, 1 Sep 2023 17:32:26 +0100 Subject: [PATCH 029/164] Bump version to 0.0.287 (#7038) --- Cargo.lock | 6 +++--- README.md | 2 +- crates/flake8_to_ruff/Cargo.toml | 2 +- crates/ruff/Cargo.toml | 2 +- crates/ruff_cli/Cargo.toml | 2 +- docs/tutorial.md | 2 +- docs/usage.md | 6 +++--- pyproject.toml | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9cc831126a..5d9734e49a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -823,7 +823,7 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flake8-to-ruff" -version = "0.0.286" +version = "0.0.287" dependencies = [ "anyhow", "clap", @@ -2054,7 +2054,7 @@ dependencies = [ [[package]] name = "ruff" -version = "0.0.286" +version = "0.0.287" dependencies = [ "annotate-snippets 0.9.1", "anyhow", @@ -2152,7 +2152,7 @@ dependencies = [ [[package]] name = "ruff_cli" -version = "0.0.286" +version = "0.0.287" dependencies = [ "annotate-snippets 0.9.1", "anyhow", diff --git a/README.md b/README.md index 05e87ff3e4..e7dd44d3bc 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ Ruff can also be used as a [pre-commit](https://pre-commit.com) hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.286 + rev: v0.0.287 hooks: - id: ruff ``` diff --git a/crates/flake8_to_ruff/Cargo.toml b/crates/flake8_to_ruff/Cargo.toml index 91c8695e6b..ee23c68566 100644 --- a/crates/flake8_to_ruff/Cargo.toml +++ b/crates/flake8_to_ruff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flake8-to-ruff" -version = "0.0.286" +version = "0.0.287" description = """ Convert Flake8 configuration files to Ruff configuration files. """ diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml index e46613093b..d893573d65 100644 --- a/crates/ruff/Cargo.toml +++ b/crates/ruff/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff" -version = "0.0.286" +version = "0.0.287" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/crates/ruff_cli/Cargo.toml b/crates/ruff_cli/Cargo.toml index 115ade470a..28331cd31d 100644 --- a/crates/ruff_cli/Cargo.toml +++ b/crates/ruff_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ruff_cli" -version = "0.0.286" +version = "0.0.287" publish = false authors = { workspace = true } edition = { workspace = true } diff --git a/docs/tutorial.md b/docs/tutorial.md index f23a167e9e..d3529a44ce 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -242,7 +242,7 @@ This tutorial has focused on Ruff's command-line interface, but Ruff can also be ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.286 + rev: v0.0.287 hooks: - id: ruff ``` diff --git a/docs/usage.md b/docs/usage.md index 17c2e99db7..23fb1174bc 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -22,7 +22,7 @@ Ruff can also be used as a [pre-commit](https://pre-commit.com) hook: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.286 + rev: v0.0.287 hooks: - id: ruff ``` @@ -32,7 +32,7 @@ Or, to enable autofix: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.286 + rev: v0.0.287 hooks: - id: ruff args: [ --fix, --exit-non-zero-on-fix ] @@ -43,7 +43,7 @@ Or, to run the hook on Jupyter Notebooks too: ```yaml - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.286 + rev: v0.0.287 hooks: - id: ruff types_or: [python, pyi, jupyter] diff --git a/pyproject.toml b/pyproject.toml index f2d8851443..94d57b5df4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "maturin" [project] name = "ruff" -version = "0.0.286" +version = "0.0.287" description = "An extremely fast Python linter, written in Rust." authors = [{ name = "Charlie Marsh", email = "charlie.r.marsh@gmail.com" }] maintainers = [{ name = "Charlie Marsh", email = "charlie.r.marsh@gmail.com" }] From c05e4628b1d385d106e7e3d355f5d1d76fbfe401 Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Sat, 2 Sep 2023 10:05:47 +0200 Subject: [PATCH 030/164] Introduce Token element (#7048) --- crates/ruff_formatter/src/arguments.rs | 16 +- crates/ruff_formatter/src/buffer.rs | 34 +- crates/ruff_formatter/src/builders.rs | 436 +++++++++--------- crates/ruff_formatter/src/format_element.rs | 26 +- .../src/format_element/document.rs | 181 ++++---- .../ruff_formatter/src/format_extensions.rs | 10 +- crates/ruff_formatter/src/formatter.rs | 32 +- crates/ruff_formatter/src/lib.rs | 10 +- crates/ruff_formatter/src/macros.rs | 150 +++--- crates/ruff_formatter/src/printer/mod.rs | 237 +++++----- crates/ruff_python_formatter/src/builders.rs | 8 +- .../src/comments/format.rs | 2 +- .../src/expression/expr_attribute.rs | 2 +- .../src/expression/expr_await.rs | 2 +- .../src/expression/expr_bin_op.rs | 2 +- .../src/expression/expr_bool_op.rs | 2 +- .../src/expression/expr_compare.rs | 2 +- .../src/expression/expr_constant.rs | 8 +- .../src/expression/expr_dict.rs | 4 +- .../src/expression/expr_dict_comp.rs | 4 +- .../src/expression/expr_if_exp.rs | 4 +- .../src/expression/expr_lambda.rs | 4 +- .../src/expression/expr_named_expr.rs | 2 +- .../src/expression/expr_slice.rs | 4 +- .../src/expression/expr_starred.rs | 2 +- .../src/expression/expr_subscript.rs | 4 +- .../src/expression/expr_tuple.rs | 6 +- .../src/expression/expr_unary_op.rs | 2 +- .../src/expression/expr_yield.rs | 4 +- .../src/expression/mod.rs | 8 +- .../src/expression/number.rs | 8 +- .../src/expression/parentheses.rs | 12 +- .../src/expression/string.rs | 18 +- crates/ruff_python_formatter/src/lib.rs | 14 +- .../ruff_python_formatter/src/other/alias.rs | 2 +- .../src/other/comprehension.rs | 8 +- .../src/other/decorator.rs | 2 +- .../other/except_handler_except_handler.rs | 6 +- .../src/other/keyword.rs | 4 +- .../src/other/match_case.rs | 4 +- .../src/other/parameter.rs | 2 +- .../src/other/parameter_with_default.rs | 2 +- .../src/other/parameters.rs | 18 +- .../src/other/with_item.rs | 2 +- .../src/pattern/pattern_keyword.rs | 2 +- .../src/pattern/pattern_match_as.rs | 4 +- .../src/pattern/pattern_match_mapping.rs | 4 +- .../src/pattern/pattern_match_or.rs | 2 +- .../src/pattern/pattern_match_singleton.rs | 6 +- .../src/pattern/pattern_match_star.rs | 4 +- .../src/statement/clause.rs | 2 +- .../src/statement/stmt_ann_assign.rs | 4 +- .../src/statement/stmt_assert.rs | 6 +- .../src/statement/stmt_assign.rs | 8 +- .../src/statement/stmt_aug_assign.rs | 2 +- .../src/statement/stmt_break.rs | 2 +- .../src/statement/stmt_class_def.rs | 2 +- .../src/statement/stmt_continue.rs | 2 +- .../src/statement/stmt_delete.rs | 6 +- .../src/statement/stmt_for.rs | 8 +- .../src/statement/stmt_function_def.rs | 6 +- .../src/statement/stmt_global.rs | 12 +- .../src/statement/stmt_if.rs | 6 +- .../src/statement/stmt_import.rs | 4 +- .../src/statement/stmt_import_from.rs | 8 +- .../src/statement/stmt_match.rs | 2 +- .../src/statement/stmt_nonlocal.rs | 12 +- .../src/statement/stmt_pass.rs | 2 +- .../src/statement/stmt_raise.rs | 4 +- .../src/statement/stmt_return.rs | 2 +- .../src/statement/stmt_try.rs | 2 +- .../src/statement/stmt_type_alias.rs | 4 +- .../src/statement/stmt_while.rs | 4 +- .../src/statement/stmt_with.rs | 6 +- .../src/type_param/type_param_param_spec.rs | 2 +- .../src/type_param/type_param_type_var.rs | 2 +- .../type_param/type_param_type_var_tuple.rs | 2 +- crates/ruff_python_formatter/src/verbatim.rs | 2 +- 78 files changed, 733 insertions(+), 723 deletions(-) diff --git a/crates/ruff_formatter/src/arguments.rs b/crates/ruff_formatter/src/arguments.rs index 850a734f04..28a1638db8 100644 --- a/crates/ruff_formatter/src/arguments.rs +++ b/crates/ruff_formatter/src/arguments.rs @@ -70,7 +70,7 @@ impl<'fmt, Context> Argument<'fmt, Context> { /// /// # fn main() -> FormatResult<()> { /// let formatted = format!(SimpleFormatContext::default(), [ -/// format_args!(text("a"), space(), text("b")) +/// format_args!(token("a"), space(), token("b")) /// ])?; /// /// assert_eq!("a b", formatted.print()?.as_code()); @@ -135,11 +135,11 @@ mod tests { write!( &mut buffer, [ - text("function"), + token("function"), space(), - text("a"), + token("a"), space(), - group(&format_args!(text("("), text(")"))) + group(&format_args!(token("("), token(")"))) ] ) .unwrap(); @@ -147,14 +147,14 @@ mod tests { assert_eq!( buffer.into_vec(), vec![ - FormatElement::StaticText { text: "function" }, + FormatElement::Token { text: "function" }, FormatElement::Space, - FormatElement::StaticText { text: "a" }, + FormatElement::Token { text: "a" }, FormatElement::Space, // Group FormatElement::Tag(Tag::StartGroup(tag::Group::new())), - FormatElement::StaticText { text: "(" }, - FormatElement::StaticText { text: ")" }, + FormatElement::Token { text: "(" }, + FormatElement::Token { text: ")" }, FormatElement::Tag(Tag::EndGroup) ] ); diff --git a/crates/ruff_formatter/src/buffer.rs b/crates/ruff_formatter/src/buffer.rs index d2eec095fb..80ba8f15e7 100644 --- a/crates/ruff_formatter/src/buffer.rs +++ b/crates/ruff_formatter/src/buffer.rs @@ -25,9 +25,9 @@ pub trait Buffer { /// let mut state = FormatState::new(SimpleFormatContext::default()); /// let mut buffer = VecBuffer::new(&mut state); /// - /// buffer.write_element(FormatElement::StaticText { text: "test"}); + /// buffer.write_element(FormatElement::Token { text: "test"}); /// - /// assert_eq!(buffer.into_vec(), vec![FormatElement::StaticText { text: "test" }]); + /// assert_eq!(buffer.into_vec(), vec![FormatElement::Token { text: "test" }]); /// ``` fn write_element(&mut self, element: FormatElement); @@ -50,9 +50,9 @@ pub trait Buffer { /// let mut state = FormatState::new(SimpleFormatContext::default()); /// let mut buffer = VecBuffer::new(&mut state); /// - /// buffer.write_fmt(format_args!(text("Hello World"))).unwrap(); + /// buffer.write_fmt(format_args!(token("Hello World"))).unwrap(); /// - /// assert_eq!(buffer.into_vec(), vec![FormatElement::StaticText{ text: "Hello World" }]); + /// assert_eq!(buffer.into_vec(), vec![FormatElement::Token{ text: "Hello World" }]); /// ``` fn write_fmt(mut self: &mut Self, arguments: Arguments) -> FormatResult<()> { write(&mut self, arguments) @@ -316,11 +316,11 @@ where /// write!( /// buffer, /// [ -/// text("The next soft line or space gets replaced by a space"), +/// token("The next soft line or space gets replaced by a space"), /// soft_line_break_or_space(), -/// text("and the line here"), +/// token("and the line here"), /// soft_line_break(), -/// text("is removed entirely.") +/// token("is removed entirely.") /// ] /// ) /// })] @@ -329,10 +329,10 @@ where /// assert_eq!( /// formatted.document().as_ref(), /// &[ -/// FormatElement::StaticText { text: "The next soft line or space gets replaced by a space" }, +/// FormatElement::Token { text: "The next soft line or space gets replaced by a space" }, /// FormatElement::Space, -/// FormatElement::StaticText { text: "and the line here" }, -/// FormatElement::StaticText { text: "is removed entirely." } +/// FormatElement::Token { text: "and the line here" }, +/// FormatElement::Token { text: "is removed entirely." } /// ] /// ); /// @@ -488,19 +488,19 @@ pub trait BufferExtensions: Buffer + Sized { /// let formatted = format!(SimpleFormatContext::default(), [format_with(|f| { /// let mut recording = f.start_recording(); /// - /// write!(recording, [text("A")])?; - /// write!(recording, [text("B")])?; + /// write!(recording, [token("A")])?; + /// write!(recording, [token("B")])?; /// - /// write!(recording, [format_with(|f| write!(f, [text("C"), text("D")]))])?; + /// write!(recording, [format_with(|f| write!(f, [token("C"), token("D")]))])?; /// /// let recorded = recording.stop(); /// assert_eq!( /// recorded.deref(), /// &[ - /// FormatElement::StaticText{ text: "A" }, - /// FormatElement::StaticText{ text: "B" }, - /// FormatElement::StaticText{ text: "C" }, - /// FormatElement::StaticText{ text: "D" } + /// FormatElement::Token{ text: "A" }, + /// FormatElement::Token{ text: "B" }, + /// FormatElement::Token{ text: "C" }, + /// FormatElement::Token{ text: "D" } /// ] /// ); /// diff --git a/crates/ruff_formatter/src/builders.rs b/crates/ruff_formatter/src/builders.rs index 05fce999fb..0f69624484 100644 --- a/crates/ruff_formatter/src/builders.rs +++ b/crates/ruff_formatter/src/builders.rs @@ -26,7 +26,7 @@ use crate::{Buffer, VecBuffer}; /// /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ -/// group(&format_args![text("a,"), soft_line_break(), text("b")]) +/// group(&format_args![token("a,"), soft_line_break(), token("b")]) /// ])?; /// /// assert_eq!( @@ -52,9 +52,9 @@ use crate::{Buffer, VecBuffer}; /// /// let elements = format!(context, [ /// group(&format_args![ -/// text("a long word,"), +/// token("a long word,"), /// soft_line_break(), -/// text("so that the group doesn't fit on a single line"), +/// token("so that the group doesn't fit on a single line"), /// ]) /// ])?; /// @@ -83,9 +83,9 @@ pub const fn soft_line_break() -> Line { /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("a,"), +/// token("a,"), /// hard_line_break(), -/// text("b"), +/// token("b"), /// hard_line_break() /// ]) /// ])?; @@ -115,9 +115,9 @@ pub const fn hard_line_break() -> Line { /// let elements = format!( /// SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("a,"), +/// token("a,"), /// empty_line(), -/// text("b"), +/// token("b"), /// empty_line() /// ]) /// ])?; @@ -146,9 +146,9 @@ pub const fn empty_line() -> Line { /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("a,"), +/// token("a,"), /// soft_line_break_or_space(), -/// text("b"), +/// token("b"), /// ]) /// ])?; /// @@ -173,9 +173,9 @@ pub const fn empty_line() -> Line { /// /// let elements = format!(context, [ /// group(&format_args![ -/// text("a long word,"), +/// token("a long word,"), /// soft_line_break_or_space(), -/// text("so that the group doesn't fit on a single line"), +/// token("so that the group doesn't fit on a single line"), /// ]) /// ])?; /// @@ -215,12 +215,8 @@ impl std::fmt::Debug for Line { } } -/// Creates a token that gets written as is to the output. Make sure to properly escape the text if -/// it's user generated (e.g. a string and not a language keyword). -/// -/// # Line feeds -/// Tokens may contain line breaks but they must use the line feeds (`\n`). -/// The [`crate::Printer`] converts the line feed characters to the character specified in the [`crate::PrinterOptions`]. +/// Creates a token that gets written as is to the output. A token must be ASCII only and is not allowed +/// to contain any line breaks or tab characters. /// /// # Examples /// @@ -229,7 +225,7 @@ impl std::fmt::Debug for Line { /// use ruff_formatter::prelude::*; /// /// # fn main() -> FormatResult<()> { -/// let elements = format!(SimpleFormatContext::default(), [text("Hello World")])?; +/// let elements = format!(SimpleFormatContext::default(), [token("Hello World")])?; /// /// assert_eq!( /// "Hello World", @@ -248,34 +244,38 @@ impl std::fmt::Debug for Line { /// /// # fn main() -> FormatResult<()> { /// // the tab must be encoded as \\t to not literally print a tab character ("Hello{tab}World" vs "Hello\tWorld") -/// let elements = format!(SimpleFormatContext::default(), [text("\"Hello\\tWorld\"")])?; +/// let elements = format!(SimpleFormatContext::default(), [token("\"Hello\\tWorld\"")])?; /// /// assert_eq!(r#""Hello\tWorld""#, elements.print()?.as_code()); /// # Ok(()) /// # } /// ``` #[inline] -pub fn text(text: &'static str) -> StaticText { - debug_assert_no_newlines(text); +pub fn token(text: &'static str) -> Token { + debug_assert!(text.is_ascii(), "Token must be ASCII text only"); + debug_assert!( + !text.contains(['\n', '\r', '\t']), + "A token should not contain any newlines or tab characters" + ); - StaticText { text } + Token { text } } #[derive(Clone, Copy, Eq, PartialEq)] -pub struct StaticText { +pub struct Token { text: &'static str, } -impl Format for StaticText { +impl Format for Token { fn fmt(&self, f: &mut Formatter) -> FormatResult<()> { - f.write_element(FormatElement::StaticText { text: self.text }); + f.write_element(FormatElement::Token { text: self.text }); Ok(()) } } -impl std::fmt::Debug for StaticText { +impl std::fmt::Debug for Token { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - std::write!(f, "StaticToken({})", self.text) + std::write!(f, "Token({})", self.text) } } @@ -295,11 +295,11 @@ impl std::fmt::Debug for StaticText { /// /// let elements = format!(SimpleFormatContext::default(), [ /// source_position(TextSize::new(0)), -/// text("\"Hello "), +/// token("\"Hello "), /// source_position(TextSize::new(8)), -/// text("'Ruff'"), +/// token("'Ruff'"), /// source_position(TextSize::new(14)), -/// text("\""), +/// token("\""), /// source_position(TextSize::new(20)) /// ])?; /// @@ -336,25 +336,25 @@ impl Format for SourcePosition { /// Creates a text from a dynamic string with its optional start-position in the source document. /// This is done by allocating a new string internally. -pub fn dynamic_text(text: &str, position: Option) -> DynamicText { +pub fn text(text: &str, position: Option) -> Text { debug_assert_no_newlines(text); - DynamicText { text, position } + Text { text, position } } #[derive(Eq, PartialEq)] -pub struct DynamicText<'a> { +pub struct Text<'a> { text: &'a str, position: Option, } -impl Format for DynamicText<'_> { +impl Format for Text<'_> { fn fmt(&self, f: &mut Formatter) -> FormatResult<()> { if let Some(source_position) = self.position { f.write_element(FormatElement::SourcePosition(source_position)); } - f.write_element(FormatElement::DynamicText { + f.write_element(FormatElement::Text { text: self.text.to_string().into_boxed_str(), }); @@ -362,9 +362,9 @@ impl Format for DynamicText<'_> { } } -impl std::fmt::Debug for DynamicText<'_> { +impl std::fmt::Debug for Text<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - std::write!(f, "DynamicToken({})", self.text) + std::write!(f, "Text({})", self.text) } } @@ -446,9 +446,9 @@ fn debug_assert_no_newlines(text: &str) { /// /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ -/// text("a"), -/// line_suffix(&text("c"), 0), -/// text("b") +/// token("a"), +/// line_suffix(&token("c"), 0), +/// token("b") /// ])?; /// /// assert_eq!("abc", elements.print()?.as_code()); @@ -470,16 +470,16 @@ fn debug_assert_no_newlines(text: &str) { /// let elements = format!(context, [ /// // Breaks /// group(&format_args![ -/// if_group_breaks(&text("(")), -/// soft_block_indent(&format_args![text("a"), line_suffix(&text(" // a comment"), 13)]), -/// if_group_breaks(&text(")")) +/// if_group_breaks(&token("(")), +/// soft_block_indent(&format_args![token("a"), line_suffix(&token(" // a comment"), 13)]), +/// if_group_breaks(&token(")")) /// ]), /// /// // Fits /// group(&format_args![ -/// if_group_breaks(&text("(")), -/// soft_block_indent(&format_args![text("a"), line_suffix(&text(" // a comment"), 0)]), -/// if_group_breaks(&text(")")) +/// if_group_breaks(&token("(")), +/// soft_block_indent(&format_args![token("a"), line_suffix(&token(" // a comment"), 0)]), +/// if_group_breaks(&token(")")) /// ]), /// ])?; /// # assert_eq!("(\n\ta // a comment\n)a // a comment", elements.print()?.as_code()); @@ -533,11 +533,11 @@ impl std::fmt::Debug for LineSuffix<'_, Context> { /// /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ -/// text("a"), -/// line_suffix(&text("c"), 0), -/// text("b"), +/// token("a"), +/// line_suffix(&token("c"), 0), +/// token("b"), /// line_suffix_boundary(), -/// text("d") +/// token("d") /// ])?; /// /// assert_eq!( @@ -599,7 +599,7 @@ impl Format for LineSuffixBoundary { /// write!(recording, [ /// labelled( /// LabelId::of(MyLabels::Main), -/// &text("'I have a label'") +/// &token("'I have a label'") /// ) /// ])?; /// @@ -608,9 +608,9 @@ impl Format for LineSuffixBoundary { /// let is_labelled = recorded.first().is_some_and( |element| element.has_label(LabelId::of(MyLabels::Main))); /// /// if is_labelled { -/// write!(f, [text(" has label `Main`")]) +/// write!(f, [token(" has label `Main`")]) /// } else { -/// write!(f, [text(" doesn't have label `Main`")]) +/// write!(f, [token(" doesn't have label `Main`")]) /// } /// })] /// )?; @@ -670,7 +670,7 @@ impl std::fmt::Debug for FormatLabelled<'_, Context> { /// /// # fn main() -> FormatResult<()> { /// // the tab must be encoded as \\t to not literally print a tab character ("Hello{tab}World" vs "Hello\tWorld") -/// let elements = format!(SimpleFormatContext::default(), [text("a"), space(), text("b")])?; +/// let elements = format!(SimpleFormatContext::default(), [token("a"), space(), token("b")])?; /// /// assert_eq!("a b", elements.print()?.as_code()); /// # Ok(()) @@ -708,16 +708,16 @@ impl Format for Space { /// /// # fn main() -> FormatResult<()> { /// let block = format!(SimpleFormatContext::default(), [ -/// text("switch {"), +/// token("switch {"), /// block_indent(&format_args![ -/// text("default:"), +/// token("default:"), /// indent(&format_args![ /// // this is where we want to use a /// hard_line_break(), -/// text("break;"), +/// token("break;"), /// ]) /// ]), -/// text("}"), +/// token("}"), /// ])?; /// /// assert_eq!( @@ -772,22 +772,22 @@ impl std::fmt::Debug for Indent<'_, Context> { /// /// # fn main() -> FormatResult<()> { /// let block = format!(SimpleFormatContext::default(), [ -/// text("root"), +/// token("root"), /// align(2, &format_args![ /// hard_line_break(), -/// text("aligned"), +/// token("aligned"), /// dedent(&format_args![ /// hard_line_break(), -/// text("not aligned"), +/// token("not aligned"), /// ]), /// dedent(&indent(&format_args![ /// hard_line_break(), -/// text("Indented, not aligned") +/// token("Indented, not aligned") /// ])) /// ]), /// dedent(&format_args![ /// hard_line_break(), -/// text("Dedent on root level is a no-op.") +/// token("Dedent on root level is a no-op.") /// ]) /// ])?; /// @@ -841,23 +841,23 @@ impl std::fmt::Debug for Dedent<'_, Context> { /// /// # fn main() -> FormatResult<()> { /// let block = format!(SimpleFormatContext::default(), [ -/// text("root"), +/// token("root"), /// indent(&format_args![ /// hard_line_break(), -/// text("indent level 1"), +/// token("indent level 1"), /// indent(&format_args![ /// hard_line_break(), -/// text("indent level 2"), +/// token("indent level 2"), /// align(2, &format_args![ /// hard_line_break(), -/// text("two space align"), +/// token("two space align"), /// dedent_to_root(&format_args![ /// hard_line_break(), -/// text("starts at the beginning of the line") +/// token("starts at the beginning of the line") /// ]), /// ]), /// hard_line_break(), -/// text("end indent level 2"), +/// token("end indent level 2"), /// ]) /// ]), /// ])?; @@ -903,24 +903,24 @@ where /// /// # fn main() -> FormatResult<()> { /// let block = format!(SimpleFormatContext::default(), [ -/// text("a"), +/// token("a"), /// hard_line_break(), -/// text("?"), +/// token("?"), /// space(), /// align(2, &format_args![ -/// text("function () {"), +/// token("function () {"), /// hard_line_break(), -/// text("}"), +/// token("}"), /// ]), /// hard_line_break(), -/// text(":"), +/// token(":"), /// space(), /// align(2, &format_args![ -/// text("function () {"), -/// block_indent(&text("console.log('test');")), -/// text("}"), +/// token("function () {"), +/// block_indent(&token("console.log('test');")), +/// token("}"), /// ]), -/// text(";") +/// token(";") /// ])?; /// /// assert_eq!( @@ -953,24 +953,24 @@ where /// }); /// /// let block = format!(context, [ -/// text("a"), +/// token("a"), /// hard_line_break(), -/// text("?"), +/// token("?"), /// space(), /// align(2, &format_args![ -/// text("function () {"), +/// token("function () {"), /// hard_line_break(), -/// text("}"), +/// token("}"), /// ]), /// hard_line_break(), -/// text(":"), +/// token(":"), /// space(), /// align(2, &format_args![ -/// text("function () {"), -/// block_indent(&text("console.log('test');")), -/// text("}"), +/// token("function () {"), +/// block_indent(&token("console.log('test');")), +/// token("}"), /// ]), -/// text(";") +/// token(";") /// ])?; /// /// assert_eq!( @@ -1038,13 +1038,13 @@ impl std::fmt::Debug for Align<'_, Context> { /// let block = format![ /// SimpleFormatContext::default(), /// [ -/// text("{"), +/// token("{"), /// block_indent(&format_args![ -/// text("let a = 10;"), +/// token("let a = 10;"), /// hard_line_break(), -/// text("let c = a + 5;"), +/// token("let c = a + 5;"), /// ]), -/// text("}"), +/// token("}"), /// ] /// ]?; /// @@ -1083,13 +1083,13 @@ pub fn block_indent(content: &impl Format) -> BlockIndent(content: &impl Format) -> BlockIndent FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("5,"), +/// token("5,"), /// soft_line_break_or_space(), -/// text("10"), +/// token("10"), /// ]), -/// text("]"), +/// token("]"), /// ]) /// ])?; /// @@ -1157,15 +1157,15 @@ pub fn soft_block_indent(content: &impl Format) -> BlockIndent /// /// let elements = format!(context, [ /// group(&format_args![ -/// text("name"), +/// token("name"), /// space(), -/// text("="), +/// token("="), /// soft_line_indent_or_space(&format_args![ -/// text("firstName"), +/// token("firstName"), /// space(), -/// text("+"), +/// token("+"), /// space(), -/// text("lastName"), +/// token("lastName"), /// ]), /// ]) /// ])?; @@ -1186,10 +1186,10 @@ pub fn soft_block_indent(content: &impl Format) -> BlockIndent /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("a"), +/// token("a"), /// space(), -/// text("="), -/// soft_line_indent_or_space(&text("10")), +/// token("="), +/// soft_line_indent_or_space(&token("10")), /// ]) /// ])?; /// @@ -1289,14 +1289,14 @@ impl std::fmt::Debug for BlockIndent<'_, Context> { /// /// let elements = format!(context, [ /// group(&format_args![ -/// text("{"), +/// token("{"), /// soft_space_or_block_indent(&format_args![ -/// text("aPropertyThatExceeds"), -/// text(":"), +/// token("aPropertyThatExceeds"), +/// token(":"), /// space(), -/// text("'line width'"), +/// token("'line width'"), /// ]), -/// text("}") +/// token("}") /// ]) /// ])?; /// @@ -1316,14 +1316,14 @@ impl std::fmt::Debug for BlockIndent<'_, Context> { /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("{"), +/// token("{"), /// soft_space_or_block_indent(&format_args![ -/// text("a"), -/// text(":"), +/// token("a"), +/// token(":"), /// space(), -/// text("5"), +/// token("5"), /// ]), -/// text("}") +/// token("}") /// ]) /// ])?; /// @@ -1361,15 +1361,15 @@ pub fn soft_space_or_block_indent(content: &impl Format) -> Bl /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("1,"), +/// token("1,"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// soft_line_break_or_space(), -/// text("3"), +/// token("3"), /// ]), -/// text("]"), +/// token("]"), /// ]) /// ])?; /// @@ -1394,15 +1394,15 @@ pub fn soft_space_or_block_indent(content: &impl Format) -> Bl /// /// let elements = format!(context, [ /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("'Good morning! How are you today?',"), +/// token("'Good morning! How are you today?',"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// soft_line_break_or_space(), -/// text("3"), +/// token("3"), /// ]), -/// text("]"), +/// token("]"), /// ]) /// ])?; /// @@ -1495,37 +1495,37 @@ impl std::fmt::Debug for Group<'_, Context> { /// let content = format_with(|f| { /// let parentheses_id = f.group_id("parentheses"); /// group(&format_args![ -/// if_group_breaks(&text("(")), +/// if_group_breaks(&token("(")), /// indent_if_group_breaks(&format_args![ /// soft_line_break(), /// conditional_group(&format_args![ -/// text("'aaaaaaa'"), +/// token("'aaaaaaa'"), /// soft_line_break_or_space(), -/// text("+"), +/// token("+"), /// space(), /// fits_expanded(&conditional_group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("'Good morning!',"), +/// token("'Good morning!',"), /// soft_line_break_or_space(), -/// text("'How are you?'"), +/// token("'How are you?'"), /// ]), -/// text("]"), +/// token("]"), /// ], tag::Condition::if_group_fits_on_line(parentheses_id))), /// soft_line_break_or_space(), -/// text("+"), +/// token("+"), /// space(), /// conditional_group(&format_args![ -/// text("'bbbb'"), +/// token("'bbbb'"), /// soft_line_break_or_space(), -/// text("and"), +/// token("and"), /// space(), -/// text("'c'") +/// token("'c'") /// ], tag::Condition::if_group_fits_on_line(parentheses_id)) /// ], tag::Condition::if_breaks()), /// ], parentheses_id), /// soft_line_break(), -/// if_group_breaks(&text(")")) +/// if_group_breaks(&token(")")) /// ]) /// .with_group_id(Some(parentheses_id)) /// .fmt(f) @@ -1623,16 +1623,16 @@ impl std::fmt::Debug for ConditionalGroup<'_, Context> { /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("'Good morning! How are you today?',"), +/// token("'Good morning! How are you today?',"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// expand_parent(), // Forces the parent to expand /// soft_line_break_or_space(), -/// text("3"), +/// token("3"), /// ]), -/// text("]"), +/// token("]"), /// ]) /// ])?; /// @@ -1679,16 +1679,16 @@ impl Format for ExpandParent { /// # fn main() -> FormatResult<()> { /// let elements = format!(SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("1,"), +/// token("1,"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// soft_line_break_or_space(), -/// text("3"), -/// if_group_breaks(&text(",")) +/// token("3"), +/// if_group_breaks(&token(",")) /// ]), -/// text("]"), +/// token("]"), /// ]) /// ])?; /// @@ -1713,16 +1713,16 @@ impl Format for ExpandParent { /// /// let elements = format!(context, [ /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("'A somewhat longer string to force a line break',"), +/// token("'A somewhat longer string to force a line break',"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// soft_line_break_or_space(), -/// text("3"), -/// if_group_breaks(&text(",")) +/// token("3"), +/// if_group_breaks(&token(",")) /// ]), -/// text("]"), +/// token("]"), /// ]) /// ])?; /// @@ -1760,16 +1760,16 @@ where /// # fn main() -> FormatResult<()> { /// let formatted = format!(SimpleFormatContext::default(), [ /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("1,"), +/// token("1,"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// soft_line_break_or_space(), -/// text("3"), -/// if_group_fits_on_line(&text(",")) +/// token("3"), +/// if_group_fits_on_line(&token(",")) /// ]), -/// text("]"), +/// token("]"), /// ]) /// ])?; /// @@ -1794,16 +1794,16 @@ where /// /// let formatted = format!(context, [ /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("'A somewhat longer string to force a line break',"), +/// token("'A somewhat longer string to force a line break',"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// soft_line_break_or_space(), -/// text("3"), -/// if_group_fits_on_line(&text(",")) +/// token("3"), +/// if_group_fits_on_line(&token(",")) /// ]), -/// text("]"), +/// token("]"), /// ]) /// ])?; /// @@ -1860,21 +1860,21 @@ impl IfGroupBreaks<'_, Context> { /// write!(f, [ /// group( /// &format_args![ - /// text("["), + /// token("["), /// soft_block_indent(&format_with(|f| { /// f.fill() - /// .entry(&soft_line_break_or_space(), &text("1,")) - /// .entry(&soft_line_break_or_space(), &text("234568789,")) - /// .entry(&soft_line_break_or_space(), &text("3456789,")) + /// .entry(&soft_line_break_or_space(), &token("1,")) + /// .entry(&soft_line_break_or_space(), &token("234568789,")) + /// .entry(&soft_line_break_or_space(), &token("3456789,")) /// .entry(&soft_line_break_or_space(), &format_args!( - /// text("["), - /// soft_block_indent(&text("4")), - /// text("]"), - /// if_group_breaks(&text(",")).with_group_id(Some(group_id)) + /// token("["), + /// soft_block_indent(&token("4")), + /// token("]"), + /// if_group_breaks(&token(",")).with_group_id(Some(group_id)) /// )) /// .finish() /// })), - /// text("]") + /// token("]") /// ], /// ).with_group_id(Some(group_id)) /// ]) @@ -1931,9 +1931,9 @@ impl std::fmt::Debug for IfGroupBreaks<'_, Context> { /// let id = f.group_id("head"); /// /// write!(f, [ -/// group(&text("Head")).with_group_id(Some(id)), -/// if_group_breaks(&indent(&text("indented"))).with_group_id(Some(id)), -/// if_group_fits_on_line(&text("indented")).with_group_id(Some(id)) +/// group(&token("Head")).with_group_id(Some(id)), +/// if_group_breaks(&indent(&token("indented"))).with_group_id(Some(id)), +/// if_group_fits_on_line(&token("indented")).with_group_id(Some(id)) /// ]) /// /// # }); @@ -1956,8 +1956,8 @@ impl std::fmt::Debug for IfGroupBreaks<'_, Context> { /// let group_id = f.group_id("header"); /// /// write!(f, [ -/// group(&text("(aLongHeaderThatBreaksForSomeReason) =>")).with_group_id(Some(group_id)), -/// indent_if_group_breaks(&format_args![hard_line_break(), text("a => b")], group_id) +/// group(&token("(aLongHeaderThatBreaksForSomeReason) =>")).with_group_id(Some(group_id)), +/// indent_if_group_breaks(&format_args![hard_line_break(), token("a => b")], group_id) /// ]) /// }); /// @@ -1986,8 +1986,8 @@ impl std::fmt::Debug for IfGroupBreaks<'_, Context> { /// let group_id = f.group_id("header"); /// /// write!(f, [ -/// group(&text("(aLongHeaderThatBreaksForSomeReason) =>")).with_group_id(Some(group_id)), -/// indent_if_group_breaks(&format_args![hard_line_break(), text("a => b")], group_id) +/// group(&token("(aLongHeaderThatBreaksForSomeReason) =>")).with_group_id(Some(group_id)), +/// indent_if_group_breaks(&format_args![hard_line_break(), token("a => b")], group_id) /// ]) /// }); /// @@ -2059,17 +2059,17 @@ impl std::fmt::Debug for IndentIfGroupBreaks<'_, Context> { /// /// write!(f, [ /// group(&format_args![ -/// text("a"), +/// token("a"), /// soft_line_break_or_space(), -/// text("+"), +/// token("+"), /// space(), /// fits_expanded(&group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("a,"), space(), text("# comment"), expand_parent(), soft_line_break_or_space(), -/// text("b") +/// token("a,"), space(), token("# comment"), expand_parent(), soft_line_break_or_space(), +/// token("b") /// ]), -/// text("]") +/// token("]") /// ])) /// ]), /// ]) @@ -2161,17 +2161,17 @@ impl std::fmt::Debug for FormatWith { /// impl Format for MyFormat { /// fn fmt(&self, f: &mut Formatter) -> FormatResult<()> { /// write!(f, [ -/// text("("), +/// token("("), /// block_indent(&format_with(|f| { /// let separator = space(); /// let mut join = f.join_with(&separator); /// /// for item in &self.items { -/// join.entry(&format_with(|f| write!(f, [dynamic_text(item, None)]))); +/// join.entry(&format_with(|f| write!(f, [text(item, None)]))); /// } /// join.finish() /// })), -/// text(")") +/// token(")") /// ]) /// } /// } @@ -2212,8 +2212,8 @@ where /// /// struct MyFormat; /// -/// fn generate_values() -> impl Iterator { -/// vec![text("1"), text("2"), text("3"), text("4")].into_iter() +/// fn generate_values() -> impl Iterator { +/// vec![token("1"), token("2"), token("3"), token("4")].into_iter() /// } /// /// impl Format for MyFormat { @@ -2244,7 +2244,7 @@ where /// /// Formatting the same value twice results in a panic. /// -/// ```panics +/// ```should_panic /// use ruff_formatter::prelude::*; /// use ruff_formatter::{SimpleFormatContext, format, write, Buffer}; /// use ruff_text_size::TextSize; @@ -2252,7 +2252,7 @@ where /// let mut count = 0; /// /// let value = format_once(|f| { -/// write!(f, [dynamic_token(&std::format!("Formatted {count}."), TextSize::default())]) +/// write!(f, [text(&std::format!("Formatted {count}."), None)]) /// }); /// /// format!(SimpleFormatContext::default(), [value]).expect("Formatting once works fine"); @@ -2476,54 +2476,54 @@ impl<'a, Context> BestFitting<'a, Context> { /// // Everything fits on a single line /// format_args!( /// group(&format_args![ - /// text("["), + /// token("["), /// soft_block_indent(&format_args![ - /// text("1,"), + /// token("1,"), /// soft_line_break_or_space(), - /// text("2,"), + /// token("2,"), /// soft_line_break_or_space(), - /// text("3"), + /// token("3"), /// ]), - /// text("]") + /// token("]") /// ]), /// space(), - /// text("+"), + /// token("+"), /// space(), - /// text("aVeryLongIdentifier") + /// token("aVeryLongIdentifier") /// ), /// /// // Breaks after `[` and prints each elements on a single line /// // The group is necessary because the variant, by default is printed in flat mode and a /// // hard line break indicates that the content doesn't fit. /// format_args!( - /// text("["), - /// group(&block_indent(&format_args![text("1,"), hard_line_break(), text("2,"), hard_line_break(), text("3")])).should_expand(true), - /// text("]"), + /// token("["), + /// group(&block_indent(&format_args![token("1,"), hard_line_break(), token("2,"), hard_line_break(), token("3")])).should_expand(true), + /// token("]"), /// space(), - /// text("+"), + /// token("+"), /// space(), - /// text("aVeryLongIdentifier") + /// token("aVeryLongIdentifier") /// ), /// /// // Adds parentheses and indents the body, breaks after the operator /// format_args!( - /// text("("), + /// token("("), /// block_indent(&format_args![ - /// text("["), + /// token("["), /// block_indent(&format_args![ - /// text("1,"), + /// token("1,"), /// hard_line_break(), - /// text("2,"), + /// token("2,"), /// hard_line_break(), - /// text("3"), + /// token("3"), /// ]), - /// text("]"), + /// token("]"), /// hard_line_break(), - /// text("+"), + /// token("+"), /// space(), - /// text("aVeryLongIdentifier") + /// token("aVeryLongIdentifier") /// ]), - /// text(")") + /// token(")") /// ) /// ).with_mode(BestFittingMode::AllLines) /// ] diff --git a/crates/ruff_formatter/src/format_element.rs b/crates/ruff_formatter/src/format_element.rs index 14a15cfaf2..ee927292cd 100644 --- a/crates/ruff_formatter/src/format_element.rs +++ b/crates/ruff_formatter/src/format_element.rs @@ -30,12 +30,11 @@ pub enum FormatElement { /// formatted position. SourcePosition(TextSize), - /// Token constructed by the formatter from a static string - StaticText { text: &'static str }, + /// A ASCII only Token that contains no line breaks or tab characters. + Token { text: &'static str }, - /// Token constructed from the input source as a dynamic - /// string. - DynamicText { + /// An arbitrary text that can contain tabs, newlines, and unicode characters. + Text { /// There's no need for the text to be mutable, using `Box` safes 8 bytes over `String`. text: Box, }, @@ -72,12 +71,8 @@ impl std::fmt::Debug for FormatElement { FormatElement::Space => write!(fmt, "Space"), FormatElement::Line(mode) => fmt.debug_tuple("Line").field(mode).finish(), FormatElement::ExpandParent => write!(fmt, "ExpandParent"), - FormatElement::StaticText { text } => { - fmt.debug_tuple("StaticText").field(text).finish() - } - FormatElement::DynamicText { text, .. } => { - fmt.debug_tuple("DynamicText").field(text).finish() - } + FormatElement::Token { text } => fmt.debug_tuple("Token").field(text).finish(), + FormatElement::Text { text, .. } => fmt.debug_tuple("DynamicText").field(text).finish(), FormatElement::SourceCodeSlice { slice, contains_newlines, @@ -244,8 +239,8 @@ impl FormatElement { matches!( self, FormatElement::SourceCodeSlice { .. } - | FormatElement::DynamicText { .. } - | FormatElement::StaticText { .. } + | FormatElement::Text { .. } + | FormatElement::Token { .. } ) } @@ -260,8 +255,8 @@ impl FormatElements for FormatElement { FormatElement::ExpandParent => true, FormatElement::Tag(Tag::StartGroup(group)) => !group.mode().is_flat(), FormatElement::Line(line_mode) => matches!(line_mode, LineMode::Hard | LineMode::Empty), - FormatElement::StaticText { text } => text.contains('\n'), - FormatElement::DynamicText { text, .. } => text.contains('\n'), + + FormatElement::Text { text, .. } => text.contains('\n'), FormatElement::SourceCodeSlice { contains_newlines, .. } => *contains_newlines, @@ -275,6 +270,7 @@ impl FormatElements for FormatElement { FormatElement::LineSuffixBoundary | FormatElement::Space | FormatElement::Tag(_) + | FormatElement::Token { .. } | FormatElement::SourcePosition(_) => false, } } diff --git a/crates/ruff_formatter/src/format_element/document.rs b/crates/ruff_formatter/src/format_element/document.rs index 46ca5a7104..ae6761296c 100644 --- a/crates/ruff_formatter/src/format_element/document.rs +++ b/crates/ruff_formatter/src/format_element/document.rs @@ -104,8 +104,7 @@ impl Document { expands = false; continue; } - FormatElement::StaticText { text } => text.contains('\n'), - FormatElement::DynamicText { text, .. } => text.contains('\n'), + FormatElement::Text { text, .. } => text.contains('\n'), FormatElement::SourceCodeSlice { contains_newlines, .. } => *contains_newlines, @@ -249,20 +248,20 @@ impl Format> for &[FormatElement] { while let Some(element) = iter.next() { if !first_element && !in_text && !element.is_end_tag() { // Write a separator between every two elements - write!(f, [text(","), soft_line_break_or_space()])?; + write!(f, [token(","), soft_line_break_or_space()])?; } first_element = false; match element { element @ (FormatElement::Space - | FormatElement::StaticText { .. } - | FormatElement::DynamicText { .. } + | FormatElement::Token { .. } + | FormatElement::Text { .. } | FormatElement::SourceCodeSlice { .. }) => { fn write_escaped(element: &FormatElement, f: &mut Formatter) { let text = match element { - FormatElement::StaticText { text } => text, - FormatElement::DynamicText { text } => text.as_ref(), + FormatElement::Token { text } => text, + FormatElement::Text { text } => text.as_ref(), FormatElement::SourceCodeSlice { slice, .. } => { slice.text(f.context().source_code()) } @@ -270,7 +269,7 @@ impl Format> for &[FormatElement] { }; if text.contains('"') { - f.write_element(FormatElement::DynamicText { + f.write_element(FormatElement::Text { text: text.replace('"', r#"\""#).into(), }); } else { @@ -279,14 +278,14 @@ impl Format> for &[FormatElement] { } if !in_text { - write!(f, [text("\"")])?; + write!(f, [token("\"")])?; } in_text = true; match element { FormatElement::Space => { - write!(f, [text(" ")])?; + write!(f, [token(" ")])?; } element if element.is_text() => { write_escaped(element, f); @@ -297,45 +296,42 @@ impl Format> for &[FormatElement] { let is_next_text = iter.peek().is_some_and(|e| e.is_text() || e.is_space()); if !is_next_text { - write!(f, [text("\"")])?; + write!(f, [token("\"")])?; in_text = false; } } FormatElement::Line(mode) => match mode { LineMode::SoftOrSpace => { - write!(f, [text("soft_line_break_or_space")])?; + write!(f, [token("soft_line_break_or_space")])?; } LineMode::Soft => { - write!(f, [text("soft_line_break")])?; + write!(f, [token("soft_line_break")])?; } LineMode::Hard => { - write!(f, [text("hard_line_break")])?; + write!(f, [token("hard_line_break")])?; } LineMode::Empty => { - write!(f, [text("empty_line")])?; + write!(f, [token("empty_line")])?; } }, FormatElement::ExpandParent => { - write!(f, [text("expand_parent")])?; + write!(f, [token("expand_parent")])?; } FormatElement::SourcePosition(position) => { write!( f, - [dynamic_text( - &std::format!("source_position({position:?})"), - None - )] + [text(&std::format!("source_position({position:?})"), None)] )?; } FormatElement::LineSuffixBoundary => { - write!(f, [text("line_suffix_boundary")])?; + write!(f, [token("line_suffix_boundary")])?; } FormatElement::BestFitting { variants, mode } => { - write!(f, [text("best_fitting([")])?; + write!(f, [token("best_fitting([")])?; f.write_elements([ FormatElement::Tag(StartIndent), FormatElement::Line(LineMode::Hard), @@ -350,13 +346,13 @@ impl Format> for &[FormatElement] { FormatElement::Line(LineMode::Hard), ]); - write!(f, [text("]")])?; + write!(f, [token("]")])?; if *mode != BestFittingMode::FirstLine { - write!(f, [dynamic_text(&std::format!(", mode: {mode:?}"), None),])?; + write!(f, [text(&std::format!(", mode: {mode:?}"), None),])?; } - write!(f, [text(")")])?; + write!(f, [token(")")])?; } FormatElement::Interned(interned) => { @@ -370,7 +366,7 @@ impl Format> for &[FormatElement] { write!( f, [ - dynamic_text(&std::format!(""), None), + text(&std::format!(""), None), space(), &&**interned, ] @@ -379,10 +375,7 @@ impl Format> for &[FormatElement] { Some(reference) => { write!( f, - [dynamic_text( - &std::format!(""), - None - )] + [text(&std::format!(""), None)] )?; } } @@ -401,9 +394,9 @@ impl Format> for &[FormatElement] { write!( f, [ - text(">"), + token(">"), ] )?; first_element = false; @@ -414,13 +407,13 @@ impl Format> for &[FormatElement] { f, [ ContentArrayEnd, - text(")"), + token(")"), soft_line_break_or_space(), - text("ERROR>") + token("ERROR>") ] )?; first_element = false; @@ -434,7 +427,7 @@ impl Format> for &[FormatElement] { match tag { StartIndent => { - write!(f, [text("indent(")])?; + write!(f, [token("indent(")])?; } StartDedent(mode) => { @@ -443,16 +436,16 @@ impl Format> for &[FormatElement] { DedentMode::Root => "dedentRoot", }; - write!(f, [text(label), text("(")])?; + write!(f, [token(label), token("(")])?; } StartAlign(tag::Align(count)) => { write!( f, [ - text("align("), - dynamic_text(&count.to_string(), None), - text(","), + token("align("), + text(&count.to_string(), None), + token(","), space(), ] )?; @@ -462,27 +455,27 @@ impl Format> for &[FormatElement] { write!( f, [ - text("line_suffix("), - dynamic_text(&std::format!("{reserved_width:?}"), None), - text(","), + token("line_suffix("), + text(&std::format!("{reserved_width:?}"), None), + token(","), space(), ] )?; } StartVerbatim(_) => { - write!(f, [text("verbatim(")])?; + write!(f, [token("verbatim(")])?; } StartGroup(group) => { - write!(f, [text("group(")])?; + write!(f, [token("group(")])?; if let Some(group_id) = group.id() { write!( f, [ - dynamic_text(&std::format!("\"{group_id:?}\""), None), - text(","), + text(&std::format!("\"{group_id:?}\""), None), + token(","), space(), ] )?; @@ -491,10 +484,10 @@ impl Format> for &[FormatElement] { match group.mode() { GroupMode::Flat => {} GroupMode::Expand => { - write!(f, [text("expand: true,"), space()])?; + write!(f, [token("expand: true,"), space()])?; } GroupMode::Propagated => { - write!(f, [text("expand: propagated,"), space()])?; + write!(f, [token("expand: propagated,"), space()])?; } } } @@ -503,10 +496,10 @@ impl Format> for &[FormatElement] { write!( f, [ - text("conditional_group(condition:"), + token("conditional_group(condition:"), space(), group.condition(), - text(","), + token(","), space() ] )?; @@ -514,10 +507,10 @@ impl Format> for &[FormatElement] { match group.mode() { GroupMode::Flat => {} GroupMode::Expand => { - write!(f, [text("expand: true,"), space()])?; + write!(f, [token("expand: true,"), space()])?; } GroupMode::Propagated => { - write!(f, [text("expand: propagated,"), space()])?; + write!(f, [token("expand: propagated,"), space()])?; } } } @@ -526,9 +519,9 @@ impl Format> for &[FormatElement] { write!( f, [ - text("indent_if_group_breaks("), - dynamic_text(&std::format!("\"{id:?}\""), None), - text(","), + token("indent_if_group_breaks("), + text(&std::format!("\"{id:?}\""), None), + token(","), space(), ] )?; @@ -537,10 +530,10 @@ impl Format> for &[FormatElement] { StartConditionalContent(condition) => { match condition.mode { PrintMode::Flat => { - write!(f, [text("if_group_fits_on_line(")])?; + write!(f, [token("if_group_fits_on_line(")])?; } PrintMode::Expanded => { - write!(f, [text("if_group_breaks(")])?; + write!(f, [token("if_group_breaks(")])?; } } @@ -548,8 +541,8 @@ impl Format> for &[FormatElement] { write!( f, [ - dynamic_text(&std::format!("\"{group_id:?}\""), None), - text(","), + text(&std::format!("\"{group_id:?}\""), None), + token(","), space(), ] )?; @@ -560,36 +553,36 @@ impl Format> for &[FormatElement] { write!( f, [ - text("label("), - dynamic_text(&std::format!("\"{label_id:?}\""), None), - text(","), + token("label("), + text(&std::format!("\"{label_id:?}\""), None), + token(","), space(), ] )?; } StartFill => { - write!(f, [text("fill(")])?; + write!(f, [token("fill(")])?; } StartFitsExpanded(tag::FitsExpanded { condition, propagate_expand, }) => { - write!(f, [text("fits_expanded(propagate_expand:"), space()])?; + write!(f, [token("fits_expanded(propagate_expand:"), space()])?; if propagate_expand.get() { - write!(f, [text("true")])?; + write!(f, [token("true")])?; } else { - write!(f, [text("false")])?; + write!(f, [token("false")])?; } - write!(f, [text(","), space()])?; + write!(f, [token(","), space()])?; if let Some(condition) = condition { write!( f, - [text("condition:"), space(), condition, text(","), space()] + [token("condition:"), space(), condition, token(","), space()] )?; } } @@ -611,7 +604,7 @@ impl Format> for &[FormatElement] { | EndDedent | EndFitsExpanded | EndVerbatim => { - write!(f, [ContentArrayEnd, text(")")])?; + write!(f, [ContentArrayEnd, token(")")])?; } }; @@ -627,9 +620,9 @@ impl Format> for &[FormatElement] { f, [ ContentArrayEnd, - text(")"), + token(")"), soft_line_break_or_space(), - dynamic_text(&std::format!(">"), None), + text(&std::format!(">"), None), ] )?; } @@ -644,7 +637,7 @@ impl Format> for ContentArrayStart { fn fmt(&self, f: &mut Formatter) -> FormatResult<()> { use Tag::{StartGroup, StartIndent}; - write!(f, [text("[")])?; + write!(f, [token("[")])?; f.write_elements([ FormatElement::Tag(StartGroup(tag::Group::new())), @@ -667,7 +660,7 @@ impl Format> for ContentArrayEnd { FormatElement::Tag(EndGroup), ]); - write!(f, [text("]")]) + write!(f, [token("]")]) } } @@ -767,22 +760,22 @@ impl FormatElements for [FormatElement] { impl Format> for Condition { fn fmt(&self, f: &mut Formatter) -> FormatResult<()> { match (self.mode, self.group_id) { - (PrintMode::Flat, None) => write!(f, [text("if_fits_on_line")]), + (PrintMode::Flat, None) => write!(f, [token("if_fits_on_line")]), (PrintMode::Flat, Some(id)) => write!( f, [ - text("if_group_fits_on_line("), - dynamic_text(&std::format!("\"{id:?}\""), None), - text(")") + token("if_group_fits_on_line("), + text(&std::format!("\"{id:?}\""), None), + token(")") ] ), - (PrintMode::Expanded, None) => write!(f, [text("if_breaks")]), + (PrintMode::Expanded, None) => write!(f, [token("if_breaks")]), (PrintMode::Expanded, Some(id)) => write!( f, [ - text("if_group_breaks("), - dynamic_text(&std::format!("\"{id:?}\""), None), - text(")") + token("if_group_breaks("), + text(&std::format!("\"{id:?}\""), None), + token(")") ] ), } @@ -805,11 +798,11 @@ mod tests { write!( f, [group(&format_args![ - text("("), + token("("), soft_block_indent(&format_args![ - text("Some longer content"), + token("Some longer content"), space(), - text("That should ultimately break"), + token("That should ultimately break"), ]) ])] ) @@ -838,7 +831,7 @@ mod tests { fn escapes_quotes() { let formatted = format!( SimpleFormatContext::default(), - [text(r#""""Python docstring""""#)] + [token(r#""""Python docstring""""#)] ) .unwrap(); @@ -859,7 +852,7 @@ mod tests { write!( f, [group(&format_args![ - text("("), + token("("), soft_block_indent(&format_args![ source_text_slice( TextRange::at(TextSize::new(0), TextSize::new(19)), @@ -899,16 +892,16 @@ mod tests { use Tag::*; let document = Document::from(vec![ - FormatElement::StaticText { text: "[" }, + FormatElement::Token { text: "[" }, FormatElement::Tag(StartGroup(tag::Group::new())), FormatElement::Tag(StartIndent), FormatElement::Line(LineMode::Soft), - FormatElement::StaticText { text: "a" }, + FormatElement::Token { text: "a" }, // Close group instead of indent FormatElement::Tag(EndGroup), FormatElement::Line(LineMode::Soft), FormatElement::Tag(EndIndent), - FormatElement::StaticText { text: "]" }, + FormatElement::Token { text: "]" }, // End tag without start FormatElement::Tag(EndIndent), // Start tag without an end diff --git a/crates/ruff_formatter/src/format_extensions.rs b/crates/ruff_formatter/src/format_extensions.rs index 1964ad246b..6c2aa85e19 100644 --- a/crates/ruff_formatter/src/format_extensions.rs +++ b/crates/ruff_formatter/src/format_extensions.rs @@ -34,7 +34,7 @@ pub trait MemoizeFormat { /// let value = self.value.get(); /// self.value.set(value + 1); /// - /// write!(f, [dynamic_text(&std::format!("Formatted {value} times."), None)]) + /// write!(f, [text(&std::format!("Formatted {value} times."), None)]) /// } /// } /// @@ -110,9 +110,9 @@ where /// let current = self.value.get(); /// /// write!(f, [ - /// text("Count:"), + /// token("Count:"), /// space(), - /// dynamic_text(&std::format!("{current}"), None), + /// text(&std::format!("{current}"), None), /// hard_line_break() /// ])?; /// @@ -127,9 +127,9 @@ where /// let counter_content = counter.inspect(f)?; /// /// if counter_content.will_break() { - /// write!(f, [text("Counter:"), block_indent(&counter)]) + /// write!(f, [token("Counter:"), block_indent(&counter)]) /// } else { - /// write!(f, [text("Counter:"), counter]) + /// write!(f, [token("Counter:"), counter]) /// }?; /// /// write!(f, [counter]) diff --git a/crates/ruff_formatter/src/formatter.rs b/crates/ruff_formatter/src/formatter.rs index 9a43635807..8274485bc5 100644 --- a/crates/ruff_formatter/src/formatter.rs +++ b/crates/ruff_formatter/src/formatter.rs @@ -52,11 +52,11 @@ impl<'buf, Context> Formatter<'buf, Context> { /// # fn main() -> FormatResult<()> { /// let formatted = format!(SimpleFormatContext::default(), [format_with(|f| { /// f.join() - /// .entry(&text("a")) + /// .entry(&token("a")) /// .entry(&space()) - /// .entry(&text("+")) + /// .entry(&token("+")) /// .entry(&space()) - /// .entry(&text("b")) + /// .entry(&token("b")) /// .finish() /// })])?; /// @@ -83,11 +83,11 @@ impl<'buf, Context> Formatter<'buf, Context> { /// /// # fn main() -> FormatResult<()> { /// let formatted = format!(SimpleFormatContext::default(), [format_with(|f| { - /// f.join_with(&format_args!(text(","), space())) - /// .entry(&text("1")) - /// .entry(&text("2")) - /// .entry(&text("3")) - /// .entry(&text("4")) + /// f.join_with(&format_args!(token(","), space())) + /// .entry(&token("1")) + /// .entry(&token("2")) + /// .entry(&token("3")) + /// .entry(&token("4")) /// .finish() /// })])?; /// @@ -121,10 +121,10 @@ impl<'buf, Context> Formatter<'buf, Context> { /// # fn main() -> FormatResult<()> { /// let formatted = format!(SimpleFormatContext::default(), [format_with(|f| { /// f.fill() - /// .entry(&soft_line_break_or_space(), &text("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")) - /// .entry(&soft_line_break_or_space(), &text("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")) - /// .entry(&soft_line_break_or_space(), &text("cccccccccccccccccccccccccccccc")) - /// .entry(&soft_line_break_or_space(), &text("dddddddddddddddddddddddddddddd")) + /// .entry(&soft_line_break_or_space(), &token("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")) + /// .entry(&soft_line_break_or_space(), &token("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")) + /// .entry(&soft_line_break_or_space(), &token("cccccccccccccccccccccccccccccc")) + /// .entry(&soft_line_break_or_space(), &token("dddddddddddddddddddddddddddddd")) /// .finish() /// })])?; /// @@ -142,10 +142,10 @@ impl<'buf, Context> Formatter<'buf, Context> { /// /// # fn main() -> FormatResult<()> { /// let entries = vec![ - /// text("Important: "), - /// text("Please do not commit memory bugs such as segfaults, buffer overflows, etc. otherwise you "), - /// text("will"), - /// text(" be reprimanded") + /// token("Important: "), + /// token("Please do not commit memory bugs such as segfaults, buffer overflows, etc. otherwise you "), + /// token("will"), + /// token(" be reprimanded") /// ]; /// /// let formatted = format!(SimpleFormatContext::default(), [format_with(|f| { diff --git a/crates/ruff_formatter/src/lib.rs b/crates/ruff_formatter/src/lib.rs index 41a3b43f1e..a90788e1e4 100644 --- a/crates/ruff_formatter/src/lib.rs +++ b/crates/ruff_formatter/src/lib.rs @@ -455,7 +455,7 @@ pub type FormatResult = Result; /// fn fmt(&self, f: &mut Formatter) -> FormatResult<()> { /// write!(f, [ /// hard_line_break(), -/// dynamic_text(&self.0, None), +/// text(&self.0, None), /// hard_line_break(), /// ]) /// } @@ -704,7 +704,7 @@ where /// let mut state = FormatState::new(SimpleFormatContext::default()); /// let mut buffer = VecBuffer::new(&mut state); /// -/// write!(&mut buffer, [format_args!(text("Hello World"))])?; +/// write!(&mut buffer, [format_args!(token("Hello World"))])?; /// /// let formatted = Formatted::new(Document::from(buffer.into_vec()), SimpleFormatContext::default()); /// @@ -723,7 +723,7 @@ where /// let mut state = FormatState::new(SimpleFormatContext::default()); /// let mut buffer = VecBuffer::new(&mut state); /// -/// write!(&mut buffer, [text("Hello World")])?; +/// write!(&mut buffer, [token("Hello World")])?; /// /// let formatted = Formatted::new(Document::from(buffer.into_vec()), SimpleFormatContext::default()); /// @@ -754,7 +754,7 @@ pub fn write( /// use ruff_formatter::{format, format_args}; /// /// # fn main() -> FormatResult<()> { -/// let formatted = format!(SimpleFormatContext::default(), [&format_args!(text("test"))])?; +/// let formatted = format!(SimpleFormatContext::default(), [&format_args!(token("test"))])?; /// assert_eq!("test", formatted.print()?.as_code()); /// # Ok(()) /// # } @@ -767,7 +767,7 @@ pub fn write( /// use ruff_formatter::{format}; /// /// # fn main() -> FormatResult<()> { -/// let formatted = format!(SimpleFormatContext::default(), [text("test")])?; +/// let formatted = format!(SimpleFormatContext::default(), [token("test")])?; /// assert_eq!("test", formatted.print()?.as_code()); /// # Ok(()) /// # } diff --git a/crates/ruff_formatter/src/macros.rs b/crates/ruff_formatter/src/macros.rs index 2e6b28bf23..d3745d1d3c 100644 --- a/crates/ruff_formatter/src/macros.rs +++ b/crates/ruff_formatter/src/macros.rs @@ -16,7 +16,7 @@ /// /// # fn main() -> FormatResult<()> { /// let formatted = format!(SimpleFormatContext::default(), [ -/// format_args!(text("Hello World")) +/// format_args!(token("Hello World")) /// ])?; /// /// assert_eq!("Hello World", formatted.print()?.as_code()); @@ -52,15 +52,15 @@ macro_rules! format_args { /// # fn main() -> FormatResult<()> { /// let mut state = FormatState::new(SimpleFormatContext::default()); /// let mut buffer = VecBuffer::new(&mut state); -/// write!(&mut buffer, [text("Hello"), space()])?; -/// write!(&mut buffer, [text("World")])?; +/// write!(&mut buffer, [token("Hello"), space()])?; +/// write!(&mut buffer, [token("World")])?; /// /// assert_eq!( /// buffer.into_vec(), /// vec![ -/// FormatElement::StaticText { text: "Hello" }, +/// FormatElement::Token { text: "Hello" }, /// FormatElement::Space, -/// FormatElement::StaticText { text: "World" }, +/// FormatElement::Token { text: "World" }, /// ] /// ); /// # Ok(()) @@ -86,10 +86,10 @@ macro_rules! write { /// let mut state = FormatState::new(SimpleFormatContext::default()); /// let mut buffer = VecBuffer::new(&mut state); /// -/// dbg_write!(buffer, [text("Hello")])?; +/// dbg_write!(buffer, [token("Hello")])?; /// // ^-- prints: [src/main.rs:7][0] = StaticToken("Hello") /// -/// assert_eq!(buffer.into_vec(), vec![FormatElement::StaticText { text: "Hello" }]); +/// assert_eq!(buffer.into_vec(), vec![FormatElement::Token { text: "Hello" }]); /// # Ok(()) /// # } /// ``` @@ -126,14 +126,14 @@ macro_rules! dbg_write { /// use ruff_formatter::prelude::*; /// use ruff_formatter::format; /// -/// let formatted = format!(SimpleFormatContext::default(), [text("("), text("a"), text(")")]).unwrap(); +/// let formatted = format!(SimpleFormatContext::default(), [token("("), token("a"), token(")")]).unwrap(); /// /// assert_eq!( /// formatted.into_document(), /// Document::from(vec![ -/// FormatElement::StaticText { text: "(" }, -/// FormatElement::StaticText { text: "a" }, -/// FormatElement::StaticText { text: ")" }, +/// FormatElement::Token { text: "(" }, +/// FormatElement::Token { text: "a" }, +/// FormatElement::Token { text: ")" }, /// ]) /// ); /// ``` @@ -160,49 +160,49 @@ macro_rules! format { /// let formatted = format!( /// SimpleFormatContext::default(), /// [ -/// text("aVeryLongIdentifier"), +/// token("aVeryLongIdentifier"), /// best_fitting!( /// // Everything fits on a single line /// format_args!( -/// text("("), +/// token("("), /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("1,"), +/// token("1,"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// soft_line_break_or_space(), -/// text("3"), +/// token("3"), /// ]), -/// text("]") +/// token("]") /// ]), -/// text(")") +/// token(")") /// ), /// /// // Breaks after `[`, but prints all elements on a single line /// format_args!( -/// text("("), -/// text("["), -/// block_indent(&text("1, 2, 3")), -/// text("]"), -/// text(")"), +/// token("("), +/// token("["), +/// block_indent(&token("1, 2, 3")), +/// token("]"), +/// token(")"), /// ), /// /// // Breaks after `[` and prints each element on a single line /// format_args!( -/// text("("), +/// token("("), /// block_indent(&format_args![ -/// text("["), +/// token("["), /// block_indent(&format_args![ -/// text("1,"), +/// token("1,"), /// hard_line_break(), -/// text("2,"), +/// token("2,"), /// hard_line_break(), -/// text("3"), +/// token("3"), /// ]), -/// text("]"), +/// token("]"), /// ]), -/// text(")") +/// token(")") /// ) /// ) /// ] @@ -251,38 +251,38 @@ macro_rules! format { /// best_fitting!( /// // Prints the method call on the line but breaks the array. /// format_args!( -/// text("expect(a).toMatch("), +/// token("expect(a).toMatch("), /// group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("1,"), +/// token("1,"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// soft_line_break_or_space(), -/// text("3"), +/// token("3"), /// ]), -/// text("]") +/// token("]") /// ]).should_expand(true), -/// text(")") +/// token(")") /// ), /// /// // Breaks after `(` /// format_args!( -/// text("expect(a).toMatch("), +/// token("expect(a).toMatch("), /// group(&soft_block_indent( /// &group(&format_args![ -/// text("["), +/// token("["), /// soft_block_indent(&format_args![ -/// text("1,"), +/// token("1,"), /// soft_line_break_or_space(), -/// text("2,"), +/// token("2,"), /// soft_line_break_or_space(), -/// text("3"), +/// token("3"), /// ]), -/// text("]") +/// token("]") /// ]).should_expand(true), /// )).should_expand(true), -/// text(")") +/// token(")") /// ), /// ) /// ] @@ -345,7 +345,7 @@ mod tests { impl Format<()> for TestFormat { fn fmt(&self, f: &mut Formatter<()>) -> FormatResult<()> { - write!(f, [text("test")]) + write!(f, [token("test")]) } } @@ -358,7 +358,7 @@ mod tests { assert_eq!( buffer.into_vec(), - vec![FormatElement::StaticText { text: "test" }] + vec![FormatElement::Token { text: "test" }] ); } @@ -369,18 +369,18 @@ mod tests { write![ &mut buffer, - [text("a"), space(), text("simple"), space(), TestFormat] + [token("a"), space(), token("simple"), space(), TestFormat] ] .unwrap(); assert_eq!( buffer.into_vec(), vec![ - FormatElement::StaticText { text: "a" }, + FormatElement::Token { text: "a" }, FormatElement::Space, - FormatElement::StaticText { text: "simple" }, + FormatElement::Token { text: "simple" }, FormatElement::Space, - FormatElement::StaticText { text: "test" } + FormatElement::Token { text: "test" } ] ); } @@ -394,41 +394,41 @@ mod tests { let formatted_best_fitting = format!( SimpleFormatContext::default(), [ - text("aVeryLongIdentifier"), + token("aVeryLongIdentifier"), soft_line_break_or_space(), best_fitting![ - format_args![text( + format_args![token( "Something that will not fit on a line with 30 character print width." )], format_args![group(&format_args![ - text("Start"), + token("Start"), soft_line_break(), group(&soft_block_indent(&format_args![ - text("1,"), + token("1,"), soft_line_break_or_space(), - text("2,"), + token("2,"), soft_line_break_or_space(), - text("3"), + token("3"), ])), soft_line_break_or_space(), soft_block_indent(&format_args![ - text("1,"), + token("1,"), soft_line_break_or_space(), - text("2,"), + token("2,"), soft_line_break_or_space(), group(&format_args!( - text("A,"), + token("A,"), soft_line_break_or_space(), - text("B") + token("B") )), soft_line_break_or_space(), - text("3") + token("3") ]), soft_line_break_or_space(), - text("End") + token("End") ]) .should_expand(true)], - format_args!(text("Most"), hard_line_break(), text("Expanded")) + format_args!(token("Most"), hard_line_break(), token("Expanded")) ] ] ) @@ -439,34 +439,34 @@ mod tests { let formatted_normal_list = format!( SimpleFormatContext::default(), [ - text("aVeryLongIdentifier"), + token("aVeryLongIdentifier"), soft_line_break_or_space(), format_args![ - text("Start"), + token("Start"), soft_line_break(), &group(&soft_block_indent(&format_args![ - text("1,"), + token("1,"), soft_line_break_or_space(), - text("2,"), + token("2,"), soft_line_break_or_space(), - text("3"), + token("3"), ])), soft_line_break_or_space(), &soft_block_indent(&format_args![ - text("1,"), + token("1,"), soft_line_break_or_space(), - text("2,"), + token("2,"), soft_line_break_or_space(), group(&format_args!( - text("A,"), + token("A,"), soft_line_break_or_space(), - text("B") + token("B") )), soft_line_break_or_space(), - text("3") + token("3") ]), soft_line_break_or_space(), - text("End") + token("End") ], ] ) diff --git a/crates/ruff_formatter/src/printer/mod.rs b/crates/ruff_formatter/src/printer/mod.rs index f1cbe097c3..c732c125e8 100644 --- a/crates/ruff_formatter/src/printer/mod.rs +++ b/crates/ruff_formatter/src/printer/mod.rs @@ -95,31 +95,31 @@ impl<'a> Printer<'a> { let args = stack.top(); match element { - FormatElement::Space => self.print_text(" ", None), - FormatElement::StaticText { text } => self.print_text(text, None), - FormatElement::DynamicText { text } => self.print_text(text, None), + FormatElement::Space => self.print_text(Text::Token(" "), None), + FormatElement::Token { text } => self.print_text(Text::Token(text), None), + FormatElement::Text { text } => self.print_text(Text::Text(text), None), FormatElement::SourceCodeSlice { slice, .. } => { let text = slice.text(self.source_code); - self.print_text(text, Some(slice.range())); + self.print_text(Text::Text(text), Some(slice.range())); } FormatElement::Line(line_mode) => { if args.mode().is_flat() && matches!(line_mode, LineMode::Soft | LineMode::SoftOrSpace) { if line_mode == &LineMode::SoftOrSpace { - self.print_text(" ", None); + self.print_text(Text::Token(" "), None); } } else if self.state.line_suffixes.has_pending() { self.flush_line_suffixes(queue, stack, Some(element)); } else { // Only print a newline if the current line isn't already empty if self.state.line_width > 0 { - self.print_str("\n"); + self.print_char('\n'); } // Print a second line break if this is an empty line if line_mode == &LineMode::Empty { - self.print_str("\n"); + self.print_char('\n'); } self.state.pending_indent = args.indention(); @@ -352,7 +352,7 @@ impl<'a> Printer<'a> { Ok(print_mode) } - fn print_text(&mut self, text: &str, source_range: Option) { + fn print_text(&mut self, text: Text, source_range: Option) { if !self.state.pending_indent.is_empty() { let (indent_char, repeat_count) = match self.options.indent_style() { IndentStyle::Tab => ('\t', 1), @@ -390,7 +390,18 @@ impl<'a> Printer<'a> { self.push_marker(); - self.print_str(text); + match text { + #[allow(clippy::cast_possible_truncation)] + Text::Token(token) => { + self.state.buffer.push_str(token); + self.state.line_width += token.len() as u32; + } + Text::Text(text) => { + for char in text.chars() { + self.print_char(char); + } + } + } if let Some(range) = source_range { self.state.source_position = range.end(); @@ -718,12 +729,6 @@ impl<'a> Printer<'a> { invalid_end_tag(TagKind::Entry, stack.top_kind()) } - fn print_str(&mut self, content: &str) { - for char in content.chars() { - self.print_char(char); - } - } - fn print_char(&mut self, char: char) { if char == '\n' { self.state @@ -1047,12 +1052,12 @@ impl<'a, 'print> FitsMeasurer<'a, 'print> { let args = self.stack.top(); match element { - FormatElement::Space => return Ok(self.fits_text(" ", args)), + FormatElement::Space => return Ok(self.fits_text(Text::Token(" "), args)), FormatElement::Line(line_mode) => { match args.mode() { PrintMode::Flat => match line_mode { - LineMode::SoftOrSpace => return Ok(self.fits_text(" ", args)), + LineMode::SoftOrSpace => return Ok(self.fits_text(Text::Token(" "), args)), LineMode::Soft => {} LineMode::Hard | LineMode::Empty => { return Ok(if self.must_be_flat { @@ -1081,11 +1086,11 @@ impl<'a, 'print> FitsMeasurer<'a, 'print> { } } - FormatElement::StaticText { text } => return Ok(self.fits_text(text, args)), - FormatElement::DynamicText { text, .. } => return Ok(self.fits_text(text, args)), + FormatElement::Token { text } => return Ok(self.fits_text(Text::Token(text), args)), + FormatElement::Text { text, .. } => return Ok(self.fits_text(Text::Text(text), args)), FormatElement::SourceCodeSlice { slice, .. } => { let text = slice.text(self.printer.source_code); - return Ok(self.fits_text(text, args)); + return Ok(self.fits_text(Text::Text(text), args)); } FormatElement::LineSuffixBoundary => { if self.state.has_line_suffix { @@ -1293,31 +1298,39 @@ impl<'a, 'print> FitsMeasurer<'a, 'print> { Fits::Maybe } - fn fits_text(&mut self, text: &str, args: PrintElementArgs) -> Fits { + fn fits_text(&mut self, text: Text, args: PrintElementArgs) -> Fits { let indent = std::mem::take(&mut self.state.pending_indent); self.state.line_width += u32::from(indent.level()) * self.options().indent_width() + u32::from(indent.align()); - for c in text.chars() { - let char_width = match c { - '\t' => self.options().tab_width.value(), - '\n' => { - if self.must_be_flat { - return Fits::No; - } - match args.measure_mode() { - MeasureMode::FirstLine => return Fits::Yes, - MeasureMode::AllLines => { - self.state.line_width = 0; - continue; + match text { + #[allow(clippy::cast_possible_truncation)] + Text::Token(token) => { + self.state.line_width += token.len() as u32; + } + Text::Text(text) => { + for c in text.chars() { + let char_width = match c { + '\t' => self.options().tab_width.value(), + '\n' => { + if self.must_be_flat { + return Fits::No; + } + match args.measure_mode() { + MeasureMode::FirstLine => return Fits::Yes, + MeasureMode::AllLines => { + self.state.line_width = 0; + continue; + } + } } - } + // SAFETY: A u32 is sufficient to format files <= 4GB + #[allow(clippy::cast_possible_truncation)] + c => c.width().unwrap_or(0) as u32, + }; + self.state.line_width += char_width; } - // SAFETY: A u32 is sufficient to format files <= 4GB - #[allow(clippy::cast_possible_truncation)] - c => c.width().unwrap_or(0) as u32, - }; - self.state.line_width += char_width; + } } if self.state.line_width > self.options().line_width.into() { @@ -1434,6 +1447,14 @@ impl From for MeasureMode { } } +#[derive(Copy, Clone, Debug)] +enum Text<'a> { + /// ASCII only text that contains no line breaks or tab characters. + Token(&'a str), + /// Arbitrary text. May contain `\n` line breaks, tab characters, or unicode characters. + Text(&'a str), +} + #[cfg(test)] mod tests { use crate::prelude::*; @@ -1469,10 +1490,10 @@ mod tests { fn it_prints_a_group_on_a_single_line_if_it_fits() { let result = format(&FormatArrayElements { items: vec![ - &text("\"a\""), - &text("\"b\""), - &text("\"c\""), - &text("\"d\""), + &token("\"a\""), + &token("\"b\""), + &token("\"c\""), + &token("\"d\""), ], }); @@ -1482,17 +1503,17 @@ mod tests { #[test] fn it_tracks_the_indent_for_each_token() { let formatted = format(&format_args!( - text("a"), + token("a"), soft_block_indent(&format_args!( - text("b"), + token("b"), soft_block_indent(&format_args!( - text("c"), - soft_block_indent(&format_args!(text("d"), soft_line_break(), text("d"),)), - text("c"), + token("c"), + soft_block_indent(&format_args!(token("d"), soft_line_break(), token("d"),)), + token("c"), )), - text("b"), + token("b"), )), - text("a") + token("a") )); assert_eq!( @@ -1517,9 +1538,9 @@ a"#, let result = format_with_options( &format_args![ - text("function main() {"), - block_indent(&text("let x = `This is a multiline\nstring`;")), - text("}"), + token("function main() {"), + block_indent(&text("let x = `This is a multiline\nstring`;", None)), + token("}"), hard_line_break() ], options, @@ -1535,8 +1556,8 @@ a"#, fn it_breaks_a_group_if_a_string_contains_a_newline() { let result = format(&FormatArrayElements { items: vec![ - &text("`This is a string spanning\ntwo lines`"), - &text("\"b\""), + &text("`This is a string spanning\ntwo lines`", None), + &token("\"b\""), ], }); @@ -1551,7 +1572,7 @@ two lines`, } #[test] fn it_breaks_a_group_if_it_contains_a_hard_line_break() { - let result = format(&group(&format_args![text("a"), block_indent(&text("b"))])); + let result = format(&group(&format_args![token("a"), block_indent(&token("b"))])); assert_eq!("a\n b\n", result.as_code()); } @@ -1560,17 +1581,17 @@ two lines`, fn it_breaks_parent_groups_if_they_dont_fit_on_a_single_line() { let result = format(&FormatArrayElements { items: vec![ - &text("\"a\""), - &text("\"b\""), - &text("\"c\""), - &text("\"d\""), + &token("\"a\""), + &token("\"b\""), + &token("\"c\""), + &token("\"d\""), &FormatArrayElements { items: vec![ - &text("\"0123456789\""), - &text("\"0123456789\""), - &text("\"0123456789\""), - &text("\"0123456789\""), - &text("\"0123456789\""), + &token("\"0123456789\""), + &token("\"0123456789\""), + &token("\"0123456789\""), + &token("\"0123456789\""), + &token("\"0123456789\""), ], }, ], @@ -1599,7 +1620,7 @@ two lines`, let result = format_with_options( &FormatArrayElements { - items: vec![&text("'a'"), &text("'b'"), &text("'c'"), &text("'d'")], + items: vec![&token("'a'"), &token("'b'"), &token("'c'"), &token("'d'")], }, options, ); @@ -1610,11 +1631,11 @@ two lines`, #[test] fn it_prints_consecutive_hard_lines_as_one() { let result = format(&format_args![ - text("a"), + token("a"), hard_line_break(), hard_line_break(), hard_line_break(), - text("b"), + token("b"), ]); assert_eq!("a\nb", result.as_code()); @@ -1623,11 +1644,11 @@ two lines`, #[test] fn it_prints_consecutive_empty_lines_as_many() { let result = format(&format_args![ - text("a"), + token("a"), empty_line(), empty_line(), empty_line(), - text("b"), + token("b"), ]); assert_eq!("a\n\n\n\nb", result.as_code()); @@ -1636,12 +1657,12 @@ two lines`, #[test] fn it_prints_consecutive_mixed_lines_as_many() { let result = format(&format_args![ - text("a"), + token("a"), empty_line(), hard_line_break(), empty_line(), hard_line_break(), - text("b"), + token("b"), ]); assert_eq!("a\n\n\nb", result.as_code()); @@ -1658,37 +1679,37 @@ two lines`, // These all fit on the same line together .entry( &soft_line_break_or_space(), - &format_args!(text("1"), text(",")), + &format_args!(token("1"), token(",")), ) .entry( &soft_line_break_or_space(), - &format_args!(text("2"), text(",")), + &format_args!(token("2"), token(",")), ) .entry( &soft_line_break_or_space(), - &format_args!(text("3"), text(",")), + &format_args!(token("3"), token(",")), ) // This one fits on a line by itself, .entry( &soft_line_break_or_space(), - &format_args!(text("723493294"), text(",")), + &format_args!(token("723493294"), token(",")), ) // fits without breaking .entry( &soft_line_break_or_space(), &group(&format_args!( - text("["), - soft_block_indent(&text("5")), - text("],") + token("["), + soft_block_indent(&token("5")), + token("],") )), ) // this one must be printed in expanded mode to fit .entry( &soft_line_break_or_space(), &group(&format_args!( - text("["), - soft_block_indent(&text("123456789")), - text("]"), + token("["), + soft_block_indent(&token("123456789")), + token("]"), )), ) .finish() @@ -1713,27 +1734,27 @@ two lines`, fn line_suffix_printed_at_end() { let printed = format(&format_args![ group(&format_args![ - text("["), + token("["), soft_block_indent(&format_with(|f| { f.fill() .entry( &soft_line_break_or_space(), - &format_args!(text("1"), text(",")), + &format_args!(token("1"), token(",")), ) .entry( &soft_line_break_or_space(), - &format_args!(text("2"), text(",")), + &format_args!(token("2"), token(",")), ) .entry( &soft_line_break_or_space(), - &format_args!(text("3"), if_group_breaks(&text(","))), + &format_args!(token("3"), if_group_breaks(&token(","))), ) .finish() })), - text("]") + token("]") ]), - text(";"), - line_suffix(&format_args![space(), text("// trailing")], 0) + token(";"), + line_suffix(&format_args![space(), token("// trailing")], 0) ]); assert_eq!(printed.as_code(), "[1, 2, 3]; // trailing"); @@ -1743,27 +1764,27 @@ two lines`, fn line_suffix_with_reserved_width() { let printed = format(&format_args![ group(&format_args![ - text("["), + token("["), soft_block_indent(&format_with(|f| { f.fill() .entry( &soft_line_break_or_space(), - &format_args!(text("1"), text(",")), + &format_args!(token("1"), token(",")), ) .entry( &soft_line_break_or_space(), - &format_args!(text("2"), text(",")), + &format_args!(token("2"), token(",")), ) .entry( &soft_line_break_or_space(), - &format_args!(text("3"), if_group_breaks(&text(","))), + &format_args!(token("3"), if_group_breaks(&token(","))), ) .finish() })), - text("]") + token("]") ]), - text(";"), - line_suffix(&format_args![space(), text("// Using reserved width causes this content to not fit even though it's a line suffix element")], 93) + token(";"), + line_suffix(&format_args![space(), token("// Using reserved width causes this content to not fit even though it's a line suffix element")], 93) ]); assert_eq!(printed.as_code(), "[\n 1, 2, 3\n]; // Using reserved width causes this content to not fit even though it's a line suffix element"); @@ -1777,15 +1798,15 @@ two lines`, f, [ group(&format_args![ - text("The referenced group breaks."), + token("The referenced group breaks."), hard_line_break() ]) .with_group_id(Some(group_id)), group(&format_args![ - text("This group breaks because:"), + token("This group breaks because:"), soft_line_break_or_space(), - if_group_fits_on_line(&text("This content fits but should not be printed.")).with_group_id(Some(group_id)), - if_group_breaks(&text("It measures with the 'if_group_breaks' variant because the referenced group breaks and that's just way too much text.")).with_group_id(Some(group_id)), + if_group_fits_on_line(&token("This content fits but should not be printed.")).with_group_id(Some(group_id)), + if_group_breaks(&token("It measures with the 'if_group_breaks' variant because the referenced group breaks and that's just way too much text.")).with_group_id(Some(group_id)), ]) ] ) @@ -1805,7 +1826,7 @@ two lines`, write!( f, [ - group(&text("Group with id-2")).with_group_id(Some(id_2)), + group(&token("Group with id-2")).with_group_id(Some(id_2)), hard_line_break() ] )?; @@ -1813,7 +1834,7 @@ two lines`, write!( f, [ - group(&text("Group with id-1 does not fit on the line because it exceeds the line width of 80 characters by")).with_group_id(Some(id_1)), + group(&token("Group with id-1 does not fit on the line because it exceeds the line width of 80 characters by")).with_group_id(Some(id_1)), hard_line_break() ] )?; @@ -1821,9 +1842,9 @@ two lines`, write!( f, [ - if_group_fits_on_line(&text("Group 2 fits")).with_group_id(Some(id_2)), + if_group_fits_on_line(&token("Group 2 fits")).with_group_id(Some(id_2)), hard_line_break(), - if_group_breaks(&text("Group 1 breaks")).with_group_id(Some(id_1)) + if_group_breaks(&token("Group 1 breaks")).with_group_id(Some(id_1)) ] ) }); @@ -1848,15 +1869,15 @@ Group 1 breaks"# write!( f, [group(&format_args!( - text("["), + token("["), soft_block_indent(&format_args!( format_with(|f| f - .join_with(format_args!(text(","), soft_line_break_or_space())) + .join_with(format_args!(token(","), soft_line_break_or_space())) .entries(&self.items) .finish()), - if_group_breaks(&text(",")), + if_group_breaks(&token(",")), )), - text("]") + token("]") ))] ) } diff --git a/crates/ruff_python_formatter/src/builders.rs b/crates/ruff_python_formatter/src/builders.rs index 40327ce7da..fa4e30ea79 100644 --- a/crates/ruff_python_formatter/src/builders.rs +++ b/crates/ruff_python_formatter/src/builders.rs @@ -27,9 +27,9 @@ impl<'ast> Format> for ParenthesizeIfExpands<'_, 'ast> { write!( f, [group(&format_args![ - if_group_breaks(&text("(")), + if_group_breaks(&token("(")), soft_block_indent(&Arguments::from(&self.inner)), - if_group_breaks(&text(")")), + if_group_breaks(&token(")")), ])] ) } @@ -152,7 +152,7 @@ impl<'fmt, 'ast, 'buf> JoinCommaSeparatedBuilder<'fmt, 'ast, 'buf> { { self.result = self.result.and_then(|_| { if self.entries.is_one_or_more() { - write!(self.fmt, [text(","), separator])?; + write!(self.fmt, [token(","), separator])?; } self.entries = self.entries.next(node.end()); @@ -204,7 +204,7 @@ impl<'fmt, 'ast, 'buf> JoinCommaSeparatedBuilder<'fmt, 'ast, 'buf> { || self.trailing_comma == TrailingComma::OneOrMore || self.entries.is_more_than_one() { - if_group_breaks(&text(",")).fmt(self.fmt)?; + if_group_breaks(&token(",")).fmt(self.fmt)?; } if magic_trailing_comma { diff --git a/crates/ruff_python_formatter/src/comments/format.rs b/crates/ruff_python_formatter/src/comments/format.rs index 6a6cb33768..376590e019 100644 --- a/crates/ruff_python_formatter/src/comments/format.rs +++ b/crates/ruff_python_formatter/src/comments/format.rs @@ -434,7 +434,7 @@ impl Format> for FormatNormalizedComment<'_> { write!( f, [ - dynamic_text(owned, Some(self.range.start())), + text(owned, Some(self.range.start())), source_position(self.range.end()) ] ) diff --git a/crates/ruff_python_formatter/src/expression/expr_attribute.rs b/crates/ruff_python_formatter/src/expression/expr_attribute.rs index b2566242cb..047e88d980 100644 --- a/crates/ruff_python_formatter/src/expression/expr_attribute.rs +++ b/crates/ruff_python_formatter/src/expression/expr_attribute.rs @@ -113,7 +113,7 @@ impl FormatNodeRule for FormatExprAttribute { f, [ dangling_comments(before_dot), - text("."), + token("."), dangling_comments(after_dot), attr.format() ] diff --git a/crates/ruff_python_formatter/src/expression/expr_await.rs b/crates/ruff_python_formatter/src/expression/expr_await.rs index 25fd244e75..665fec2489 100644 --- a/crates/ruff_python_formatter/src/expression/expr_await.rs +++ b/crates/ruff_python_formatter/src/expression/expr_await.rs @@ -16,7 +16,7 @@ impl FormatNodeRule for FormatExprAwait { write!( f, [ - text("await"), + token("await"), space(), maybe_parenthesize_expression(value, item, Parenthesize::IfBreaks) ] diff --git a/crates/ruff_python_formatter/src/expression/expr_bin_op.rs b/crates/ruff_python_formatter/src/expression/expr_bin_op.rs index 2241d014cb..e19566e3c2 100644 --- a/crates/ruff_python_formatter/src/expression/expr_bin_op.rs +++ b/crates/ruff_python_formatter/src/expression/expr_bin_op.rs @@ -260,7 +260,7 @@ impl FormatRule> for FormatOperator { Operator::FloorDiv => "//", }; - text(operator).fmt(f) + token(operator).fmt(f) } } diff --git a/crates/ruff_python_formatter/src/expression/expr_bool_op.rs b/crates/ruff_python_formatter/src/expression/expr_bool_op.rs index 8b2f9feeda..ee96ddd369 100644 --- a/crates/ruff_python_formatter/src/expression/expr_bool_op.rs +++ b/crates/ruff_python_formatter/src/expression/expr_bool_op.rs @@ -132,6 +132,6 @@ impl FormatRule> for FormatBoolOp { BoolOp::Or => "or", }; - text(operator).fmt(f) + token(operator).fmt(f) } } diff --git a/crates/ruff_python_formatter/src/expression/expr_compare.rs b/crates/ruff_python_formatter/src/expression/expr_compare.rs index 2dd82e497b..61e60a0cc8 100644 --- a/crates/ruff_python_formatter/src/expression/expr_compare.rs +++ b/crates/ruff_python_formatter/src/expression/expr_compare.rs @@ -113,6 +113,6 @@ impl FormatRule> for FormatCmpOp { CmpOp::NotIn => "not in", }; - text(operator).fmt(f) + token(operator).fmt(f) } } diff --git a/crates/ruff_python_formatter/src/expression/expr_constant.rs b/crates/ruff_python_formatter/src/expression/expr_constant.rs index 8f3de76916..4877ad30aa 100644 --- a/crates/ruff_python_formatter/src/expression/expr_constant.rs +++ b/crates/ruff_python_formatter/src/expression/expr_constant.rs @@ -42,11 +42,11 @@ impl FormatNodeRule for FormatExprConstant { } = item; match value { - Constant::Ellipsis => text("...").fmt(f), - Constant::None => text("None").fmt(f), + Constant::Ellipsis => token("...").fmt(f), + Constant::None => token("None").fmt(f), Constant::Bool(value) => match value { - true => text("True").fmt(f), - false => text("False").fmt(f), + true => token("True").fmt(f), + false => token("False").fmt(f), }, Constant::Int(_) => FormatInt::new(item).fmt(f), Constant::Float(_) => FormatFloat::new(item).fmt(f), diff --git a/crates/ruff_python_formatter/src/expression/expr_dict.rs b/crates/ruff_python_formatter/src/expression/expr_dict.rs index d53e6b6b5f..66630dac7c 100644 --- a/crates/ruff_python_formatter/src/expression/expr_dict.rs +++ b/crates/ruff_python_formatter/src/expression/expr_dict.rs @@ -34,7 +34,7 @@ impl Format> for KeyValuePair<'_> { f, [group(&format_args![ key.format(), - text(":"), + token(":"), space(), self.value.format() ])] @@ -49,7 +49,7 @@ impl Format> for KeyValuePair<'_> { [ // make sure the leading comments are hoisted past the `**` leading_comments(leading_value_comments), - group(&format_args![text("**"), self.value.format()]) + group(&format_args![token("**"), self.value.format()]) ] ) } diff --git a/crates/ruff_python_formatter/src/expression/expr_dict_comp.rs b/crates/ruff_python_formatter/src/expression/expr_dict_comp.rs index 9b615d0461..4fcbbe35e9 100644 --- a/crates/ruff_python_formatter/src/expression/expr_dict_comp.rs +++ b/crates/ruff_python_formatter/src/expression/expr_dict_comp.rs @@ -1,5 +1,5 @@ use ruff_formatter::prelude::{ - format_args, format_with, group, soft_line_break_or_space, space, text, + format_args, format_with, group, soft_line_break_or_space, space, token, }; use ruff_formatter::write; use ruff_python_ast::node::AnyNodeRef; @@ -35,7 +35,7 @@ impl FormatNodeRule for FormatExprDictComp { "{", &group(&format_args!( group(&key.format()), - text(":"), + token(":"), space(), value.format(), soft_line_break_or_space(), diff --git a/crates/ruff_python_formatter/src/expression/expr_if_exp.rs b/crates/ruff_python_formatter/src/expression/expr_if_exp.rs index 07236000c1..1b22fb568c 100644 --- a/crates/ruff_python_formatter/src/expression/expr_if_exp.rs +++ b/crates/ruff_python_formatter/src/expression/expr_if_exp.rs @@ -62,12 +62,12 @@ impl FormatNodeRule for FormatExprIfExp { body.format(), in_parentheses_only_soft_line_break_or_space(), leading_comments(comments.leading(test.as_ref())), - text("if"), + token("if"), space(), test.format(), in_parentheses_only_soft_line_break_or_space(), leading_comments(comments.leading(orelse.as_ref())), - text("else"), + token("else"), space(), ] )?; diff --git a/crates/ruff_python_formatter/src/expression/expr_lambda.rs b/crates/ruff_python_formatter/src/expression/expr_lambda.rs index 3498325222..54cd619b13 100644 --- a/crates/ruff_python_formatter/src/expression/expr_lambda.rs +++ b/crates/ruff_python_formatter/src/expression/expr_lambda.rs @@ -21,7 +21,7 @@ impl FormatNodeRule for FormatExprLambda { let comments = f.context().comments().clone(); let dangling = comments.dangling(item); - write!(f, [text("lambda")])?; + write!(f, [token("lambda")])?; if let Some(parameters) = parameters { write!( @@ -35,7 +35,7 @@ impl FormatNodeRule for FormatExprLambda { )?; } - write!(f, [text(":")])?; + write!(f, [token(":")])?; if dangling.is_empty() { write!(f, [space()])?; diff --git a/crates/ruff_python_formatter/src/expression/expr_named_expr.rs b/crates/ruff_python_formatter/src/expression/expr_named_expr.rs index 01371565eb..2ec759ab5f 100644 --- a/crates/ruff_python_formatter/src/expression/expr_named_expr.rs +++ b/crates/ruff_python_formatter/src/expression/expr_named_expr.rs @@ -25,7 +25,7 @@ impl FormatNodeRule for FormatExprNamedExpr { f, [ group(&format_args!(target.format(), soft_line_break_or_space())), - text(":=") + token(":=") ] )?; diff --git a/crates/ruff_python_formatter/src/expression/expr_slice.rs b/crates/ruff_python_formatter/src/expression/expr_slice.rs index 8d1dfc627c..c8177e9f80 100644 --- a/crates/ruff_python_formatter/src/expression/expr_slice.rs +++ b/crates/ruff_python_formatter/src/expression/expr_slice.rs @@ -91,7 +91,7 @@ impl FormatNodeRule for FormatExprSlice { if !all_simple && lower.is_some() { space().fmt(f)?; } - text(":").fmt(f)?; + token(":").fmt(f)?; // No upper node, no need for a space, e.g. `x[a() :]` if !all_simple && upper.is_some() { space().fmt(f)?; @@ -125,7 +125,7 @@ impl FormatNodeRule for FormatExprSlice { if !all_simple && (upper.is_some() || step.is_none()) { space().fmt(f)?; } - text(":").fmt(f)?; + token(":").fmt(f)?; // No step node, no need for a space if !all_simple && step.is_some() { space().fmt(f)?; diff --git a/crates/ruff_python_formatter/src/expression/expr_starred.rs b/crates/ruff_python_formatter/src/expression/expr_starred.rs index 9bea9e6e87..da3e5e208c 100644 --- a/crates/ruff_python_formatter/src/expression/expr_starred.rs +++ b/crates/ruff_python_formatter/src/expression/expr_starred.rs @@ -21,7 +21,7 @@ impl FormatNodeRule for FormatExprStarred { let comments = f.context().comments().clone(); let dangling = comments.dangling(item); - write!(f, [text("*"), dangling_comments(dangling), value.format()]) + write!(f, [token("*"), dangling_comments(dangling), value.format()]) } fn fmt_dangling_comments( diff --git a/crates/ruff_python_formatter/src/expression/expr_subscript.rs b/crates/ruff_python_formatter/src/expression/expr_subscript.rs index 5eadfeb4d0..a7f0fa306b 100644 --- a/crates/ruff_python_formatter/src/expression/expr_subscript.rs +++ b/crates/ruff_python_formatter/src/expression/expr_subscript.rs @@ -70,10 +70,10 @@ impl FormatNodeRule for FormatExprSubscript { write!( f, [group(&format_args![ - text("["), + token("["), trailing_comments(dangling_comments), soft_block_indent(&format_slice), - text("]") + token("]") ])] ) } diff --git a/crates/ruff_python_formatter/src/expression/expr_tuple.rs b/crates/ruff_python_formatter/src/expression/expr_tuple.rs index f62d40f138..cb3f848f2d 100644 --- a/crates/ruff_python_formatter/src/expression/expr_tuple.rs +++ b/crates/ruff_python_formatter/src/expression/expr_tuple.rs @@ -140,12 +140,12 @@ impl FormatNodeRule for FormatExprTuple { TupleParentheses::Preserve if !is_tuple_parenthesized(item, f.context().source()) => { - write!(f, [single.format(), text(",")]) + write!(f, [single.format(), token(",")]) } _ => // A single element tuple always needs parentheses and a trailing comma, except when inside of a subscript { - parenthesized("(", &format_args![single.format(), text(",")], ")") + parenthesized("(", &format_args![single.format(), token(",")], ")") .with_dangling_comments(dangling) .fmt(f) } @@ -166,7 +166,7 @@ impl FormatNodeRule for FormatExprTuple { _ => match self.parentheses { TupleParentheses::Never => { let separator = - format_with(|f| group(&format_args![text(","), space()]).fmt(f)); + format_with(|f| group(&format_args![token(","), space()]).fmt(f)); f.join_with(separator) .entries(elts.iter().formatted()) .finish() diff --git a/crates/ruff_python_formatter/src/expression/expr_unary_op.rs b/crates/ruff_python_formatter/src/expression/expr_unary_op.rs index f83ac33a4c..2a75c243a4 100644 --- a/crates/ruff_python_formatter/src/expression/expr_unary_op.rs +++ b/crates/ruff_python_formatter/src/expression/expr_unary_op.rs @@ -26,7 +26,7 @@ impl FormatNodeRule for FormatExprUnaryOp { UnaryOp::USub => "-", }; - text(operator).fmt(f)?; + token(operator).fmt(f)?; let comments = f.context().comments().clone(); diff --git a/crates/ruff_python_formatter/src/expression/expr_yield.rs b/crates/ruff_python_formatter/src/expression/expr_yield.rs index 4d8334c64f..a0d9526dc6 100644 --- a/crates/ruff_python_formatter/src/expression/expr_yield.rs +++ b/crates/ruff_python_formatter/src/expression/expr_yield.rs @@ -87,14 +87,14 @@ impl Format> for AnyExpressionYield<'_> { write!( f, [ - text(keyword), + token(keyword), space(), maybe_parenthesize_expression(val, self, Parenthesize::Optional) ] )?; } else { // ExprYieldFrom always has Some(value) so we should never get a bare `yield from` - write!(f, [&text(keyword)])?; + write!(f, [&token(keyword)])?; } Ok(()) } diff --git a/crates/ruff_python_formatter/src/expression/mod.rs b/crates/ruff_python_formatter/src/expression/mod.rs index 9594ab08f6..91e2e54065 100644 --- a/crates/ruff_python_formatter/src/expression/mod.rs +++ b/crates/ruff_python_formatter/src/expression/mod.rs @@ -248,9 +248,9 @@ impl Format> for MaybeParenthesizeExpression<'_> { // The group here is necessary because `format_expression` may contain IR elements // that refer to the group id group(&format_args![ - text("("), + token("("), soft_block_indent(&format_expression), - text(")") + token(")") ]) .with_group_id(Some(group_id)) .fmt(f) @@ -267,9 +267,9 @@ impl Format> for MaybeParenthesizeExpression<'_> { // Variant 2: // Try to fit the expression by adding parentheses and indenting the expression. group(&format_args![ - text("("), + token("("), soft_block_indent(&format_expression), - text(")") + token(")") ]) .with_group_id(Some(group_id)) .should_expand(true), diff --git a/crates/ruff_python_formatter/src/expression/number.rs b/crates/ruff_python_formatter/src/expression/number.rs index bef3b476e0..8bf6d266a8 100644 --- a/crates/ruff_python_formatter/src/expression/number.rs +++ b/crates/ruff_python_formatter/src/expression/number.rs @@ -25,7 +25,7 @@ impl Format> for FormatInt<'_> { match normalized { Cow::Borrowed(_) => source_text_slice(range, ContainsNewlines::No).fmt(f), - Cow::Owned(normalized) => dynamic_text(&normalized, Some(range.start())).fmt(f), + Cow::Owned(normalized) => text(&normalized, Some(range.start())).fmt(f), } } } @@ -50,7 +50,7 @@ impl Format> for FormatFloat<'_> { match normalized { Cow::Borrowed(_) => source_text_slice(range, ContainsNewlines::No).fmt(f), - Cow::Owned(normalized) => dynamic_text(&normalized, Some(range.start())).fmt(f), + Cow::Owned(normalized) => text(&normalized, Some(range.start())).fmt(f), } } } @@ -78,11 +78,11 @@ impl Format> for FormatComplex<'_> { source_text_slice(range.sub_end(TextSize::from(1)), ContainsNewlines::No).fmt(f)?; } Cow::Owned(normalized) => { - dynamic_text(&normalized, Some(range.start())).fmt(f)?; + text(&normalized, Some(range.start())).fmt(f)?; } } - text("j").fmt(f) + token("j").fmt(f) } } diff --git a/crates/ruff_python_formatter/src/expression/parentheses.rs b/crates/ruff_python_formatter/src/expression/parentheses.rs index 0a0b85a864..b43395c570 100644 --- a/crates/ruff_python_formatter/src/expression/parentheses.rs +++ b/crates/ruff_python_formatter/src/expression/parentheses.rs @@ -172,10 +172,10 @@ impl<'ast> Format> for FormatParenthesized<'_, 'ast> { fn fmt(&self, f: &mut Formatter>) -> FormatResult<()> { let inner = format_with(|f| { group(&format_args![ - text(self.left), + token(self.left), dangling_open_parenthesis_comments(self.comments), soft_block_indent(&Arguments::from(&self.content)), - text(self.right) + token(self.right) ]) .fmt(f) }); @@ -232,13 +232,13 @@ impl<'ast> Format> for FormatOptionalParentheses<'_, 'ast> write!( f, [group(&format_args![ - if_group_breaks(&text("(")), + if_group_breaks(&token("(")), indent_if_group_breaks( &format_args![soft_line_break(), Arguments::from(&self.content)], parens_id ), soft_line_break(), - if_group_breaks(&text(")")) + if_group_breaks(&token(")")) ]) .with_group_id(Some(parens_id))] ) @@ -375,7 +375,7 @@ impl Format> for FormatEmptyParenthesized<'_> { write!( f, [group(&format_args![ - text(self.left), + token(self.left), // end-of-line comments trailing_comments(&self.comments[..end_of_line_split]), // Avoid unstable formatting with @@ -390,7 +390,7 @@ impl Format> for FormatEmptyParenthesized<'_> { (!self.comments[..end_of_line_split].is_empty()).then_some(hard_line_break()), // own line comments, which need to be indented soft_block_indent(&dangling_comments(&self.comments[end_of_line_split..])), - text(self.right) + token(self.right) ])] ) } diff --git a/crates/ruff_python_formatter/src/expression/string.rs b/crates/ruff_python_formatter/src/expression/string.rs index c4e53a1064..e6165942ba 100644 --- a/crates/ruff_python_formatter/src/expression/string.rs +++ b/crates/ruff_python_formatter/src/expression/string.rs @@ -326,7 +326,7 @@ impl Format> for FormatStringPart { source_text_slice(self.range(), contains_newlines).fmt(f)?; } Cow::Owned(normalized) => { - dynamic_text(&normalized, Some(self.start())).fmt(f)?; + text(&normalized, Some(self.start())).fmt(f)?; } } self.preferred_quotes.fmt(f) @@ -386,17 +386,17 @@ impl Format> for StringPrefix { // Retain the casing for the raw prefix: // https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#r-strings-and-r-strings if self.contains(StringPrefix::RAW) { - text("r").fmt(f)?; + token("r").fmt(f)?; } else if self.contains(StringPrefix::RAW_UPPER) { - text("R").fmt(f)?; + token("R").fmt(f)?; } if self.contains(StringPrefix::BYTE) { - text("b").fmt(f)?; + token("b").fmt(f)?; } if self.contains(StringPrefix::F_STRING) { - text("f").fmt(f)?; + token("f").fmt(f)?; } // Remove the unicode prefix `u` if any because it is meaningless in Python 3+. @@ -596,7 +596,7 @@ impl Format> for StringQuotes { (QuoteStyle::Double, true) => "\"\"\"", }; - text(quotes).fmt(f) + token(quotes).fmt(f) } } @@ -839,7 +839,7 @@ fn format_docstring(string_part: &FormatStringPart, f: &mut PyFormatter) -> Form if already_normalized { source_text_slice(trimmed_line_range, ContainsNewlines::No).fmt(f)?; } else { - dynamic_text(trim_both, Some(trimmed_line_range.start())).fmt(f)?; + text(trim_both, Some(trimmed_line_range.start())).fmt(f)?; } } offset += first.text_len(); @@ -947,7 +947,7 @@ fn format_docstring_line( let indent_len = count_indentation_like_black(trim_end, f.options().tab_width()) - stripped_indentation; let in_docstring_indent = " ".repeat(indent_len.to_usize()) + trim_end.trim_start(); - dynamic_text(&in_docstring_indent, Some(offset)).fmt(f)?; + text(&in_docstring_indent, Some(offset)).fmt(f)?; } else { // Take the string with the trailing whitespace removed, then also skip the leading // whitespace @@ -957,7 +957,7 @@ fn format_docstring_line( source_text_slice(trimmed_line_range, ContainsNewlines::No).fmt(f)?; } else { // All indents are ascii spaces, so the slicing is correct - dynamic_text( + text( &trim_end[stripped_indentation.to_usize()..], Some(trimmed_line_range.start()), ) diff --git a/crates/ruff_python_formatter/src/lib.rs b/crates/ruff_python_formatter/src/lib.rs index 17193b8444..98ab2a19d8 100644 --- a/crates/ruff_python_formatter/src/lib.rs +++ b/crates/ruff_python_formatter/src/lib.rs @@ -276,16 +276,16 @@ for converter in connection.ops.get_db_converters( f: &mut ruff_formatter::formatter::Formatter, ) -> FormatResult<()> { let format_str = format_with(|f| { - write!(f, [text("\"")])?; + write!(f, [token("\"")])?; let mut words = self.0.split_whitespace().peekable(); let mut fill = f.fill(); let separator = format_with(|f| { group(&format_args![ - if_group_breaks(&text("\"")), + if_group_breaks(&token("\"")), soft_line_break_or_space(), - if_group_breaks(&text("\" ")) + if_group_breaks(&token("\" ")) ]) .fmt(f) }); @@ -293,10 +293,10 @@ for converter in connection.ops.get_db_converters( while let Some(word) = words.next() { let is_last = words.peek().is_none(); let format_word = format_with(|f| { - write!(f, [dynamic_text(word, None)])?; + write!(f, [text(word, None)])?; if is_last { - write!(f, [text("\"")])?; + write!(f, [token("\"")])?; } Ok(()) @@ -311,9 +311,9 @@ for converter in connection.ops.get_db_converters( write!( f, [group(&format_args![ - if_group_breaks(&text("(")), + if_group_breaks(&token("(")), soft_block_indent(&format_str), - if_group_breaks(&text(")")) + if_group_breaks(&token(")")) ])] ) } diff --git a/crates/ruff_python_formatter/src/other/alias.rs b/crates/ruff_python_formatter/src/other/alias.rs index 020c0d77fd..0020c872cc 100644 --- a/crates/ruff_python_formatter/src/other/alias.rs +++ b/crates/ruff_python_formatter/src/other/alias.rs @@ -15,7 +15,7 @@ impl FormatNodeRule for FormatAlias { } = item; name.format().fmt(f)?; if let Some(asname) = asname { - write!(f, [space(), text("as"), space(), asname.format()])?; + write!(f, [space(), token("as"), space(), asname.format()])?; } Ok(()) } diff --git a/crates/ruff_python_formatter/src/other/comprehension.rs b/crates/ruff_python_formatter/src/other/comprehension.rs index 23224f56c8..d5f439a676 100644 --- a/crates/ruff_python_formatter/src/other/comprehension.rs +++ b/crates/ruff_python_formatter/src/other/comprehension.rs @@ -32,7 +32,7 @@ impl FormatNodeRule for FormatComprehension { } = item; if *is_async { - write!(f, [text("async"), space()])?; + write!(f, [token("async"), space()])?; } let comments = f.context().comments().clone(); @@ -54,14 +54,14 @@ impl FormatNodeRule for FormatComprehension { write!( f, [ - text("for"), + token("for"), trailing_comments(before_target_comments), group(&format_args!( Spacer(target), ExprTupleWithoutParentheses(target), in_spacer, leading_comments(before_in_comments), - text("in"), + token("in"), trailing_comments(trailing_in_comments), Spacer(iter), iter.format(), @@ -81,7 +81,7 @@ impl FormatNodeRule for FormatComprehension { ); joiner.entry(&group(&format_args!( leading_comments(own_line_if_comments), - text("if"), + token("if"), trailing_comments(end_of_line_if_comments), Spacer(if_case), if_case.format(), diff --git a/crates/ruff_python_formatter/src/other/decorator.rs b/crates/ruff_python_formatter/src/other/decorator.rs index 241afcd125..9754ac4b4a 100644 --- a/crates/ruff_python_formatter/src/other/decorator.rs +++ b/crates/ruff_python_formatter/src/other/decorator.rs @@ -19,7 +19,7 @@ impl FormatNodeRule for FormatDecorator { write!( f, [ - text("@"), + token("@"), maybe_parenthesize_expression(expression, item, Parenthesize::Optional) ] ) diff --git a/crates/ruff_python_formatter/src/other/except_handler_except_handler.rs b/crates/ruff_python_formatter/src/other/except_handler_except_handler.rs index 73d4a08195..387628af1d 100644 --- a/crates/ruff_python_formatter/src/other/except_handler_except_handler.rs +++ b/crates/ruff_python_formatter/src/other/except_handler_except_handler.rs @@ -57,10 +57,10 @@ impl FormatNodeRule for FormatExceptHandlerExceptHan write!( f, [ - text("except"), + token("except"), match self.except_handler_kind { ExceptHandlerKind::Regular => None, - ExceptHandlerKind::Starred => Some(text("*")), + ExceptHandlerKind::Starred => Some(token("*")), } ] )?; @@ -78,7 +78,7 @@ impl FormatNodeRule for FormatExceptHandlerExceptHan ] )?; if let Some(name) = name { - write!(f, [space(), text("as"), space(), name.format()])?; + write!(f, [space(), token("as"), space(), name.format()])?; } } diff --git a/crates/ruff_python_formatter/src/other/keyword.rs b/crates/ruff_python_formatter/src/other/keyword.rs index 914a467ef8..6c56883242 100644 --- a/crates/ruff_python_formatter/src/other/keyword.rs +++ b/crates/ruff_python_formatter/src/other/keyword.rs @@ -15,9 +15,9 @@ impl FormatNodeRule for FormatKeyword { } = item; // Comments after the `=` or `**` are reassigned as leading comments on the value. if let Some(arg) = arg { - write!(f, [arg.format(), text("="), value.format()]) + write!(f, [arg.format(), token("="), value.format()]) } else { - write!(f, [text("**"), value.format()]) + write!(f, [token("**"), value.format()]) } } } diff --git a/crates/ruff_python_formatter/src/other/match_case.rs b/crates/ruff_python_formatter/src/other/match_case.rs index 10b60921ca..0b965583d5 100644 --- a/crates/ruff_python_formatter/src/other/match_case.rs +++ b/crates/ruff_python_formatter/src/other/match_case.rs @@ -30,7 +30,7 @@ impl FormatNodeRule for FormatMatchCase { ClauseHeader::MatchCase(item), dangling_item_comments, &format_with(|f| { - write!(f, [text("case"), space()])?; + write!(f, [token("case"), space()])?; let has_comments = comments.has_leading(pattern) || comments.has_trailing_own_line(pattern); @@ -58,7 +58,7 @@ impl FormatNodeRule for FormatMatchCase { } if let Some(guard) = guard { - write!(f, [space(), text("if"), space(), guard.format()])?; + write!(f, [space(), token("if"), space(), guard.format()])?; } Ok(()) diff --git a/crates/ruff_python_formatter/src/other/parameter.rs b/crates/ruff_python_formatter/src/other/parameter.rs index a204e3e8a4..fb0e84fbcd 100644 --- a/crates/ruff_python_formatter/src/other/parameter.rs +++ b/crates/ruff_python_formatter/src/other/parameter.rs @@ -17,7 +17,7 @@ impl FormatNodeRule for FormatParameter { name.format().fmt(f)?; if let Some(annotation) = annotation { - write!(f, [text(":"), space(), annotation.format()])?; + write!(f, [token(":"), space(), annotation.format()])?; } Ok(()) diff --git a/crates/ruff_python_formatter/src/other/parameter_with_default.rs b/crates/ruff_python_formatter/src/other/parameter_with_default.rs index 40e7508d8d..7afcb1b31a 100644 --- a/crates/ruff_python_formatter/src/other/parameter_with_default.rs +++ b/crates/ruff_python_formatter/src/other/parameter_with_default.rs @@ -18,7 +18,7 @@ impl FormatNodeRule for FormatParameterWithDefault { if let Some(default) = default { let space = parameter.annotation.is_some().then_some(space()); - write!(f, [space, text("="), space, group(&default.format())])?; + write!(f, [space, token("="), space, group(&default.format())])?; } Ok(()) diff --git a/crates/ruff_python_formatter/src/other/parameters.rs b/crates/ruff_python_formatter/src/other/parameters.rs index cb5666fbed..2194a579f4 100644 --- a/crates/ruff_python_formatter/src/other/parameters.rs +++ b/crates/ruff_python_formatter/src/other/parameters.rs @@ -102,7 +102,7 @@ impl FormatNodeRule for FormatParameters { dangling.split_at(parenthesis_comments_end); let format_inner = format_with(|f: &mut PyFormatter| { - let separator = format_with(|f| write!(f, [text(","), soft_line_break_or_space()])); + let separator = format_with(|f| write!(f, [token(","), soft_line_break_or_space()])); let mut joiner = f.join_with(separator); let mut last_node: Option = None; @@ -156,7 +156,7 @@ impl FormatNodeRule for FormatParameters { if let Some(vararg) = vararg { joiner.entry(&format_args![ leading_node_comments(vararg.as_ref()), - text("*"), + token("*"), vararg.format() ]); last_node = Some(vararg.as_any_node_ref()); @@ -192,7 +192,7 @@ impl FormatNodeRule for FormatParameters { if let Some(kwarg) = kwarg { joiner.entry(&format_args![ leading_node_comments(kwarg.as_ref()), - text("**"), + token("**"), kwarg.format() ]); last_node = Some(kwarg.as_any_node_ref()); @@ -216,10 +216,10 @@ impl FormatNodeRule for FormatParameters { // 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()) { - write!(f, [text(",")])?; + write!(f, [token(",")])?; } } else { - write!(f, [if_group_breaks(&text(","))])?; + write!(f, [if_group_breaks(&token(","))])?; if f.options().magic_trailing_comma().is_respect() && has_trailing_comma(item, last_node, f.context().source()) @@ -252,10 +252,10 @@ impl FormatNodeRule for FormatParameters { write!( f, [ - text("("), + token("("), dangling_open_parenthesis_comments(parenthesis_dangling), soft_block_indent(&group(&format_inner)), - text(")") + token(")") ] ) } @@ -279,7 +279,7 @@ struct CommentsAroundText<'a> { impl Format> for CommentsAroundText<'_> { fn fmt(&self, f: &mut PyFormatter) -> FormatResult<()> { if self.comments.is_empty() { - text(self.text).fmt(f) + token(self.text).fmt(f) } else { // There might be own line comments in trailing, but those are weird and we can kinda // ignore them @@ -301,7 +301,7 @@ impl Format> for CommentsAroundText<'_> { f, [ leading_comments(leading), - text(self.text), + token(self.text), trailing_comments(trailing) ] ) diff --git a/crates/ruff_python_formatter/src/other/with_item.rs b/crates/ruff_python_formatter/src/other/with_item.rs index fd91501c06..0559e4a993 100644 --- a/crates/ruff_python_formatter/src/other/with_item.rs +++ b/crates/ruff_python_formatter/src/other/with_item.rs @@ -30,7 +30,7 @@ impl FormatNodeRule for FormatWithItem { )?; if let Some(optional_vars) = optional_vars { - write!(f, [space(), text("as"), space()])?; + write!(f, [space(), token("as"), space()])?; if trailing_as_comments.is_empty() { write!(f, [optional_vars.format()])?; diff --git a/crates/ruff_python_formatter/src/pattern/pattern_keyword.rs b/crates/ruff_python_formatter/src/pattern/pattern_keyword.rs index 35bae9ddf4..974e653474 100644 --- a/crates/ruff_python_formatter/src/pattern/pattern_keyword.rs +++ b/crates/ruff_python_formatter/src/pattern/pattern_keyword.rs @@ -12,6 +12,6 @@ impl FormatNodeRule for FormatPatternKeyword { attr, pattern, } = item; - write!(f, [attr.format(), text("="), pattern.format()]) + write!(f, [attr.format(), token("="), pattern.format()]) } } diff --git a/crates/ruff_python_formatter/src/pattern/pattern_match_as.rs b/crates/ruff_python_formatter/src/pattern/pattern_match_as.rs index d16f4884d3..921e548ac0 100644 --- a/crates/ruff_python_formatter/src/pattern/pattern_match_as.rs +++ b/crates/ruff_python_formatter/src/pattern/pattern_match_as.rs @@ -29,7 +29,7 @@ impl FormatNodeRule for FormatPatternMatchAs { write!(f, [space()])?; } - write!(f, [text("as")])?; + write!(f, [token("as")])?; let trailing_as_comments = comments.dangling(item); if trailing_as_comments.is_empty() { @@ -45,7 +45,7 @@ impl FormatNodeRule for FormatPatternMatchAs { name.format().fmt(f) } else { debug_assert!(pattern.is_none()); - text("_").fmt(f) + token("_").fmt(f) } } diff --git a/crates/ruff_python_formatter/src/pattern/pattern_match_mapping.rs b/crates/ruff_python_formatter/src/pattern/pattern_match_mapping.rs index f6584be7a7..1145f64bdd 100644 --- a/crates/ruff_python_formatter/src/pattern/pattern_match_mapping.rs +++ b/crates/ruff_python_formatter/src/pattern/pattern_match_mapping.rs @@ -130,7 +130,7 @@ impl Format> for RestPattern<'_> { f, [ leading_comments(self.comments), - text("**"), + token("**"), self.identifier.format() ] ) @@ -156,7 +156,7 @@ impl Format> for KeyPatternPair<'_> { f, [group(&format_args![ self.key.format(), - text(":"), + token(":"), space(), self.pattern.format() ])] diff --git a/crates/ruff_python_formatter/src/pattern/pattern_match_or.rs b/crates/ruff_python_formatter/src/pattern/pattern_match_or.rs index 8d84a240e9..4de2af6c3e 100644 --- a/crates/ruff_python_formatter/src/pattern/pattern_match_or.rs +++ b/crates/ruff_python_formatter/src/pattern/pattern_match_or.rs @@ -35,7 +35,7 @@ impl FormatNodeRule for FormatPatternMatchOr { [hard_line_break(), leading_comments(leading_value_comments)] )?; } - write!(f, [text("|"), space(), pattern.format()])?; + write!(f, [token("|"), space(), pattern.format()])?; } Ok(()) diff --git a/crates/ruff_python_formatter/src/pattern/pattern_match_singleton.rs b/crates/ruff_python_formatter/src/pattern/pattern_match_singleton.rs index 56b0c223da..f1aabfddc3 100644 --- a/crates/ruff_python_formatter/src/pattern/pattern_match_singleton.rs +++ b/crates/ruff_python_formatter/src/pattern/pattern_match_singleton.rs @@ -10,9 +10,9 @@ pub struct FormatPatternMatchSingleton; impl FormatNodeRule for FormatPatternMatchSingleton { fn fmt_fields(&self, item: &PatternMatchSingleton, f: &mut PyFormatter) -> FormatResult<()> { match item.value { - Constant::None => text("None").fmt(f), - Constant::Bool(true) => text("True").fmt(f), - Constant::Bool(false) => text("False").fmt(f), + Constant::None => token("None").fmt(f), + Constant::Bool(true) => token("True").fmt(f), + Constant::Bool(false) => token("False").fmt(f), _ => unreachable!(), } } diff --git a/crates/ruff_python_formatter/src/pattern/pattern_match_star.rs b/crates/ruff_python_formatter/src/pattern/pattern_match_star.rs index 8b93d2b81c..c8a88fe773 100644 --- a/crates/ruff_python_formatter/src/pattern/pattern_match_star.rs +++ b/crates/ruff_python_formatter/src/pattern/pattern_match_star.rs @@ -16,11 +16,11 @@ impl FormatNodeRule for FormatPatternMatchStar { let comments = f.context().comments().clone(); let dangling = comments.dangling(item); - write!(f, [text("*"), dangling_comments(dangling)])?; + write!(f, [token("*"), dangling_comments(dangling)])?; match name { Some(name) => write!(f, [name.format()]), - None => write!(f, [text("_")]), + None => write!(f, [token("_")]), } } diff --git a/crates/ruff_python_formatter/src/statement/clause.rs b/crates/ruff_python_formatter/src/statement/clause.rs index 348de0e4fa..449b64e299 100644 --- a/crates/ruff_python_formatter/src/statement/clause.rs +++ b/crates/ruff_python_formatter/src/statement/clause.rs @@ -349,7 +349,7 @@ impl<'ast> Format> for FormatClauseHeader<'_, 'ast> { write_suppressed_clause_header(self.header, f)?; } else { f.write_fmt(Arguments::from(&self.formatter))?; - text(":").fmt(f)?; + token(":").fmt(f)?; } trailing_comments(self.trailing_colon_comment).fmt(f) diff --git a/crates/ruff_python_formatter/src/statement/stmt_ann_assign.rs b/crates/ruff_python_formatter/src/statement/stmt_ann_assign.rs index 6edc0a1320..a29798d4c3 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_ann_assign.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_ann_assign.rs @@ -23,7 +23,7 @@ impl FormatNodeRule for FormatStmtAnnAssign { f, [ target.format(), - text(":"), + token(":"), space(), maybe_parenthesize_expression(annotation, item, Parenthesize::IfBreaks) ] @@ -34,7 +34,7 @@ impl FormatNodeRule for FormatStmtAnnAssign { f, [ space(), - text("="), + token("="), space(), maybe_parenthesize_expression(value, item, Parenthesize::IfBreaks) ] diff --git a/crates/ruff_python_formatter/src/statement/stmt_assert.rs b/crates/ruff_python_formatter/src/statement/stmt_assert.rs index ae47813283..7b3930d252 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_assert.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_assert.rs @@ -1,4 +1,4 @@ -use ruff_formatter::prelude::{space, text}; +use ruff_formatter::prelude::{space, token}; use ruff_formatter::write; use ruff_python_ast::StmtAssert; @@ -22,7 +22,7 @@ impl FormatNodeRule for FormatStmtAssert { write!( f, [ - text("assert"), + token("assert"), space(), maybe_parenthesize_expression(test, item, Parenthesize::IfBreaks) ] @@ -32,7 +32,7 @@ impl FormatNodeRule for FormatStmtAssert { write!( f, [ - text(","), + token(","), space(), maybe_parenthesize_expression(msg, item, Parenthesize::IfBreaks), ] diff --git a/crates/ruff_python_formatter/src/statement/stmt_assign.rs b/crates/ruff_python_formatter/src/statement/stmt_assign.rs index 3f9b36aa0a..475a21a58b 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_assign.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_assign.rs @@ -27,7 +27,7 @@ impl FormatNodeRule for FormatStmtAssign { [ first.format(), space(), - text("="), + token("="), space(), FormatTargets { targets: rest } ] @@ -89,9 +89,9 @@ impl Format> for FormatTargets<'_> { write!( f, [ - if_group_breaks(&text("(")), + if_group_breaks(&token("(")), soft_block_indent(&first.format().with_options(Parentheses::Never)), - if_group_breaks(&text(")")) + if_group_breaks(&token(")")) ] ) } @@ -103,7 +103,7 @@ impl Format> for FormatTargets<'_> { [group(&format_args![ format_first, space(), - text("="), + token("="), space(), FormatTargets { targets: rest } ]) diff --git a/crates/ruff_python_formatter/src/statement/stmt_aug_assign.rs b/crates/ruff_python_formatter/src/statement/stmt_aug_assign.rs index 652247db46..df15aaa121 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_aug_assign.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_aug_assign.rs @@ -24,7 +24,7 @@ impl FormatNodeRule for FormatStmtAugAssign { target.format(), space(), op.format(), - text("="), + token("="), space(), maybe_parenthesize_expression(value, item, Parenthesize::IfBreaks) ] diff --git a/crates/ruff_python_formatter/src/statement/stmt_break.rs b/crates/ruff_python_formatter/src/statement/stmt_break.rs index 394cd03f74..67926e0a0e 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_break.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_break.rs @@ -8,7 +8,7 @@ pub struct FormatStmtBreak; impl FormatNodeRule for FormatStmtBreak { fn fmt_fields(&self, _item: &StmtBreak, f: &mut PyFormatter) -> FormatResult<()> { - text("break").fmt(f) + token("break").fmt(f) } fn is_suppressed( diff --git a/crates/ruff_python_formatter/src/statement/stmt_class_def.rs b/crates/ruff_python_formatter/src/statement/stmt_class_def.rs index f3c170902a..fa27970b90 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_class_def.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_class_def.rs @@ -44,7 +44,7 @@ impl FormatNodeRule for FormatStmtClassDef { ClauseHeader::Class(item), trailing_definition_comments, &format_with(|f| { - write!(f, [text("class"), space(), name.format()])?; + write!(f, [token("class"), space(), name.format()])?; if let Some(type_params) = type_params.as_deref() { write!(f, [type_params.format()])?; diff --git a/crates/ruff_python_formatter/src/statement/stmt_continue.rs b/crates/ruff_python_formatter/src/statement/stmt_continue.rs index 625f2d8fce..af045d2418 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_continue.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_continue.rs @@ -8,7 +8,7 @@ pub struct FormatStmtContinue; impl FormatNodeRule for FormatStmtContinue { fn fmt_fields(&self, _item: &StmtContinue, f: &mut PyFormatter) -> FormatResult<()> { - text("continue").fmt(f) + token("continue").fmt(f) } fn is_suppressed( diff --git a/crates/ruff_python_formatter/src/statement/stmt_delete.rs b/crates/ruff_python_formatter/src/statement/stmt_delete.rs index 485a317ae3..4af373c801 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_delete.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_delete.rs @@ -15,7 +15,7 @@ impl FormatNodeRule for FormatStmtDelete { fn fmt_fields(&self, item: &StmtDelete, f: &mut PyFormatter) -> FormatResult<()> { let StmtDelete { range: _, targets } = item; - write!(f, [text("del"), space()])?; + write!(f, [token("del"), space()])?; match targets.as_slice() { [] => { @@ -27,9 +27,9 @@ impl FormatNodeRule for FormatStmtDelete { // del ( // # Dangling comment // ) - text("("), + token("("), block_indent(&dangling_node_comments(item)), - text(")"), + token(")"), ] ) } diff --git a/crates/ruff_python_formatter/src/statement/stmt_for.rs b/crates/ruff_python_formatter/src/statement/stmt_for.rs index a66cc1888b..f70ca9269d 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_for.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_for.rs @@ -54,12 +54,12 @@ impl FormatNodeRule for FormatStmtFor { ClauseHeader::For(item), trailing_condition_comments, &format_args![ - is_async.then_some(format_args![text("async"), space()]), - text("for"), + is_async.then_some(format_args![token("async"), space()]), + token("for"), space(), ExprTupleWithoutParentheses(target), space(), - text("in"), + token("in"), space(), maybe_parenthesize_expression(iter, item, Parenthesize::IfBreaks), ], @@ -83,7 +83,7 @@ impl FormatNodeRule for FormatStmtFor { clause_header( ClauseHeader::OrElse(ElseClause::For(item)), trailing, - &text("else"), + &token("else"), ) .with_leading_comments(leading, body.last()), clause_body(orelse, trailing), diff --git a/crates/ruff_python_formatter/src/statement/stmt_function_def.rs b/crates/ruff_python_formatter/src/statement/stmt_function_def.rs index 2e6a17fed5..0a7a462282 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_function_def.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_function_def.rs @@ -50,10 +50,10 @@ impl FormatNodeRule for FormatStmtFunctionDef { trailing_definition_comments, &format_with(|f| { if *is_async { - write!(f, [text("async"), space()])?; + write!(f, [token("async"), space()])?; } - write!(f, [text("def"), space(), name.format()])?; + write!(f, [token("def"), space(), name.format()])?; if let Some(type_params) = type_params.as_ref() { write!(f, [type_params.format()])?; @@ -63,7 +63,7 @@ impl FormatNodeRule for FormatStmtFunctionDef { write!(f, [parameters.format()])?; if let Some(return_annotation) = returns.as_ref() { - write!(f, [space(), text("->"), space()])?; + write!(f, [space(), token("->"), space()])?; if return_annotation.is_tuple_expr() { let parentheses = diff --git a/crates/ruff_python_formatter/src/statement/stmt_global.rs b/crates/ruff_python_formatter/src/statement/stmt_global.rs index c837daff08..731630a3d8 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_global.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_global.rs @@ -15,18 +15,18 @@ impl FormatNodeRule for FormatStmtGlobal { // move the comment "off" of the `global` statement. if f.context().comments().has_trailing(item.as_any_node_ref()) { let joined = format_with(|f| { - f.join_with(format_args![text(","), space()]) + f.join_with(format_args![token(","), space()]) .entries(item.names.iter().formatted()) .finish() }); - write!(f, [text("global"), space(), &joined]) + write!(f, [token("global"), space(), &joined]) } else { let joined = format_with(|f| { f.join_with(&format_args![ - text(","), + token(","), space(), - if_group_breaks(&text("\\")), + if_group_breaks(&token("\\")), soft_line_break(), ]) .entries(item.names.iter().formatted()) @@ -36,10 +36,10 @@ impl FormatNodeRule for FormatStmtGlobal { write!( f, [ - text("global"), + token("global"), space(), group(&format_args!( - if_group_breaks(&text("\\")), + if_group_breaks(&token("\\")), soft_line_break(), soft_block_indent(&joined) )) diff --git a/crates/ruff_python_formatter/src/statement/stmt_if.rs b/crates/ruff_python_formatter/src/statement/stmt_if.rs index a842ddf53f..e5852db8d0 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_if.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_if.rs @@ -30,7 +30,7 @@ impl FormatNodeRule for FormatStmtIf { ClauseHeader::If(item), trailing_colon_comment, &format_args![ - text("if"), + token("if"), space(), maybe_parenthesize_expression(test, item, Parenthesize::IfBreaks), ], @@ -86,13 +86,13 @@ pub(crate) fn format_elif_else_clause( write!( f, [ - text("elif"), + token("elif"), space(), maybe_parenthesize_expression(test, item, Parenthesize::IfBreaks), ] ) } else { - text("else").fmt(f) + token("else").fmt(f) } }), ) diff --git a/crates/ruff_python_formatter/src/statement/stmt_import.rs b/crates/ruff_python_formatter/src/statement/stmt_import.rs index d4c10af939..97dc4fe830 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_import.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_import.rs @@ -11,11 +11,11 @@ impl FormatNodeRule for FormatStmtImport { fn fmt_fields(&self, item: &StmtImport, f: &mut PyFormatter) -> FormatResult<()> { let StmtImport { names, range: _ } = item; let names = format_with(|f| { - f.join_with(&format_args![text(","), space()]) + f.join_with(&format_args![token(","), space()]) .entries(names.iter().formatted()) .finish() }); - write!(f, [text("import"), space(), names]) + write!(f, [token("import"), space(), names]) } fn is_suppressed( diff --git a/crates/ruff_python_formatter/src/statement/stmt_import_from.rs b/crates/ruff_python_formatter/src/statement/stmt_import_from.rs index 5881d6e412..6f6c87fb8a 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_import_from.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_import_from.rs @@ -27,12 +27,12 @@ impl FormatNodeRule for FormatStmtImportFrom { write!( f, [ - text("from"), + token("from"), space(), - dynamic_text(&level_str, None), + text(&level_str, None), module.as_ref().map(AsFormat::format), space(), - text("import"), + token("import"), space(), ] )?; @@ -40,7 +40,7 @@ impl FormatNodeRule for FormatStmtImportFrom { if let [name] = names.as_slice() { // star can't be surrounded by parentheses if name.name.as_str() == "*" { - return text("*").fmt(f); + return token("*").fmt(f); } } diff --git a/crates/ruff_python_formatter/src/statement/stmt_match.rs b/crates/ruff_python_formatter/src/statement/stmt_match.rs index b89c6018a3..672cf7bce7 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_match.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_match.rs @@ -29,7 +29,7 @@ impl FormatNodeRule for FormatStmtMatch { ClauseHeader::Match(item), dangling_item_comments, &format_args![ - text("match"), + token("match"), space(), maybe_parenthesize_expression(subject, item, Parenthesize::IfBreaks), ], diff --git a/crates/ruff_python_formatter/src/statement/stmt_nonlocal.rs b/crates/ruff_python_formatter/src/statement/stmt_nonlocal.rs index 53884c6f40..5be0c7c9eb 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_nonlocal.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_nonlocal.rs @@ -15,18 +15,18 @@ impl FormatNodeRule for FormatStmtNonlocal { // move the comment "off" of the `nonlocal` statement. if f.context().comments().has_trailing(item.as_any_node_ref()) { let joined = format_with(|f| { - f.join_with(format_args![text(","), space()]) + f.join_with(format_args![token(","), space()]) .entries(item.names.iter().formatted()) .finish() }); - write!(f, [text("nonlocal"), space(), &joined]) + write!(f, [token("nonlocal"), space(), &joined]) } else { let joined = format_with(|f| { f.join_with(&format_args![ - text(","), + token(","), space(), - if_group_breaks(&text("\\")), + if_group_breaks(&token("\\")), soft_line_break(), ]) .entries(item.names.iter().formatted()) @@ -36,10 +36,10 @@ impl FormatNodeRule for FormatStmtNonlocal { write!( f, [ - text("nonlocal"), + token("nonlocal"), space(), group(&format_args!( - if_group_breaks(&text("\\")), + if_group_breaks(&token("\\")), soft_line_break(), soft_block_indent(&joined) )) diff --git a/crates/ruff_python_formatter/src/statement/stmt_pass.rs b/crates/ruff_python_formatter/src/statement/stmt_pass.rs index 9a5c5249e2..d6a1e74564 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_pass.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_pass.rs @@ -8,7 +8,7 @@ pub struct FormatStmtPass; impl FormatNodeRule for FormatStmtPass { fn fmt_fields(&self, _item: &StmtPass, f: &mut PyFormatter) -> FormatResult<()> { - text("pass").fmt(f) + token("pass").fmt(f) } fn is_suppressed( diff --git a/crates/ruff_python_formatter/src/statement/stmt_raise.rs b/crates/ruff_python_formatter/src/statement/stmt_raise.rs index e8c11228de..18c72e7672 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_raise.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_raise.rs @@ -17,7 +17,7 @@ impl FormatNodeRule for FormatStmtRaise { cause, } = item; - text("raise").fmt(f)?; + token("raise").fmt(f)?; if let Some(value) = exc { write!( @@ -34,7 +34,7 @@ impl FormatNodeRule for FormatStmtRaise { f, [ space(), - text("from"), + token("from"), space(), maybe_parenthesize_expression(value, item, Parenthesize::Optional) ] diff --git a/crates/ruff_python_formatter/src/statement/stmt_return.rs b/crates/ruff_python_formatter/src/statement/stmt_return.rs index c6379b5a79..be63db2e73 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_return.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_return.rs @@ -14,7 +14,7 @@ impl FormatNodeRule for FormatStmtReturn { fn fmt_fields(&self, item: &StmtReturn, f: &mut PyFormatter) -> FormatResult<()> { let StmtReturn { range: _, value } = item; - text("return").fmt(f)?; + token("return").fmt(f)?; match value.as_deref() { Some(Expr::Tuple(tuple)) if !f.context().comments().has_leading(tuple) => { diff --git a/crates/ruff_python_formatter/src/statement/stmt_try.rs b/crates/ruff_python_formatter/src/statement/stmt_try.rs index 3cbf7ff7f8..4b40ab4549 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_try.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_try.rs @@ -136,7 +136,7 @@ fn format_case<'a>( write!( f, [ - clause_header(header, trailing_case_comments, &text(kind.keyword())) + clause_header(header, trailing_case_comments, &token(kind.keyword())) .with_leading_comments(leading_case_comments, previous_node), clause_body(body, trailing_case_comments), ] diff --git a/crates/ruff_python_formatter/src/statement/stmt_type_alias.rs b/crates/ruff_python_formatter/src/statement/stmt_type_alias.rs index ddb82ebfe7..c2daaf8528 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_type_alias.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_type_alias.rs @@ -18,7 +18,7 @@ impl FormatNodeRule for FormatStmtTypeAlias { range: _, } = item; - write!(f, [text("type"), space(), name.as_ref().format()])?; + write!(f, [token("type"), space(), name.as_ref().format()])?; if let Some(type_params) = type_params { write!(f, [type_params.format()])?; @@ -28,7 +28,7 @@ impl FormatNodeRule for FormatStmtTypeAlias { f, [ space(), - text("="), + token("="), space(), maybe_parenthesize_expression(value, item, Parenthesize::IfBreaks) ] diff --git a/crates/ruff_python_formatter/src/statement/stmt_while.rs b/crates/ruff_python_formatter/src/statement/stmt_while.rs index af667a6cf5..88a9af9831 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_while.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_while.rs @@ -38,7 +38,7 @@ impl FormatNodeRule for FormatStmtWhile { ClauseHeader::While(item), trailing_condition_comments, &format_args![ - text("while"), + token("while"), space(), maybe_parenthesize_expression(test, item, Parenthesize::IfBreaks), ] @@ -60,7 +60,7 @@ impl FormatNodeRule for FormatStmtWhile { clause_header( ClauseHeader::OrElse(ElseClause::While(item)), trailing, - &text("else") + &token("else") ) .with_leading_comments(leading, body.last()), clause_body(orelse, trailing), diff --git a/crates/ruff_python_formatter/src/statement/stmt_with.rs b/crates/ruff_python_formatter/src/statement/stmt_with.rs index 481d3925ae..9aa5e54bda 100644 --- a/crates/ruff_python_formatter/src/statement/stmt_with.rs +++ b/crates/ruff_python_formatter/src/statement/stmt_with.rs @@ -52,8 +52,8 @@ impl FormatNodeRule for FormatStmtWith { f, [ item.is_async - .then_some(format_args![text("async"), space()]), - text("with"), + .then_some(format_args![token("async"), space()]), + token("with"), space() ] )?; @@ -92,7 +92,7 @@ impl FormatNodeRule for FormatStmtWith { item.format().fmt(f)?; } } else { - f.join_with(format_args![text(","), space()]) + f.join_with(format_args![token(","), space()]) .entries(item.items.iter().formatted()) .finish()?; } diff --git a/crates/ruff_python_formatter/src/type_param/type_param_param_spec.rs b/crates/ruff_python_formatter/src/type_param/type_param_param_spec.rs index f9a3a7ed73..c64545ce84 100644 --- a/crates/ruff_python_formatter/src/type_param/type_param_param_spec.rs +++ b/crates/ruff_python_formatter/src/type_param/type_param_param_spec.rs @@ -9,6 +9,6 @@ pub struct FormatTypeParamParamSpec; impl FormatNodeRule for FormatTypeParamParamSpec { fn fmt_fields(&self, item: &TypeParamParamSpec, f: &mut PyFormatter) -> FormatResult<()> { let TypeParamParamSpec { range: _, name } = item; - write!(f, [text("**"), name.format()]) + write!(f, [token("**"), name.format()]) } } diff --git a/crates/ruff_python_formatter/src/type_param/type_param_type_var.rs b/crates/ruff_python_formatter/src/type_param/type_param_type_var.rs index 8a86f90592..fbd3e78775 100644 --- a/crates/ruff_python_formatter/src/type_param/type_param_type_var.rs +++ b/crates/ruff_python_formatter/src/type_param/type_param_type_var.rs @@ -15,7 +15,7 @@ impl FormatNodeRule for FormatTypeParamTypeVar { } = item; name.format().fmt(f)?; if let Some(bound) = bound { - write!(f, [text(":"), space(), bound.format()])?; + write!(f, [token(":"), space(), bound.format()])?; } Ok(()) } diff --git a/crates/ruff_python_formatter/src/type_param/type_param_type_var_tuple.rs b/crates/ruff_python_formatter/src/type_param/type_param_type_var_tuple.rs index 66d1a5307e..4f7ae7ca9d 100644 --- a/crates/ruff_python_formatter/src/type_param/type_param_type_var_tuple.rs +++ b/crates/ruff_python_formatter/src/type_param/type_param_type_var_tuple.rs @@ -9,6 +9,6 @@ pub struct FormatTypeParamTypeVarTuple; impl FormatNodeRule for FormatTypeParamTypeVarTuple { fn fmt_fields(&self, item: &TypeParamTypeVarTuple, f: &mut PyFormatter) -> FormatResult<()> { let TypeParamTypeVarTuple { range: _, name } = item; - write!(f, [text("*"), name.format()]) + write!(f, [token("*"), name.format()]) } } diff --git a/crates/ruff_python_formatter/src/verbatim.rs b/crates/ruff_python_formatter/src/verbatim.rs index f50aac90a9..f40723de99 100644 --- a/crates/ruff_python_formatter/src/verbatim.rs +++ b/crates/ruff_python_formatter/src/verbatim.rs @@ -871,7 +871,7 @@ impl Format> for VerbatimText { write!( f, [ - dynamic_text(&cleaned, Some(self.verbatim_range.start())), + text(&cleaned, Some(self.verbatim_range.start())), source_position(self.verbatim_range.end()) ] )?; From 71ff6f911dab2a9c1a79f878af2cecce8d54a33e Mon Sep 17 00:00:00 2001 From: Justin Prieto Date: Sat, 2 Sep 2023 07:45:35 -0400 Subject: [PATCH 031/164] Fix `getattr` calls on int literals (#7057) --- .../test/fixtures/flake8_bugbear/B009_B010.py | 10 +- .../rules/getattr_with_constant.rs | 17 +- ...ke8_bugbear__tests__B009_B009_B010.py.snap | 109 ++++++++++++- ...ke8_bugbear__tests__B010_B009_B010.py.snap | 148 +++++++++--------- 4 files changed, 202 insertions(+), 82 deletions(-) diff --git a/crates/ruff/resources/test/fixtures/flake8_bugbear/B009_B010.py b/crates/ruff/resources/test/fixtures/flake8_bugbear/B009_B010.py index 623ddc6c96..b5a8450e90 100644 --- a/crates/ruff/resources/test/fixtures/flake8_bugbear/B009_B010.py +++ b/crates/ruff/resources/test/fixtures/flake8_bugbear/B009_B010.py @@ -1,7 +1,7 @@ """ Should emit: -B009 - Line 19, 20, 21, 22, 23, 24 -B010 - Line 40, 41, 42, 43, 44, 45 +B009 - Lines 19-31 +B010 - Lines 40-45 """ # Valid getattr usage @@ -24,6 +24,12 @@ getattr(foo, r"abc123") _ = lambda x: getattr(x, "bar") if getattr(x, "bar"): pass +getattr(1, "real") +getattr(1., "real") +getattr(1.0, "real") +getattr(1j, "real") +getattr(True, "real") + # Valid setattr usage setattr(foo, bar, None) diff --git a/crates/ruff/src/rules/flake8_bugbear/rules/getattr_with_constant.rs b/crates/ruff/src/rules/flake8_bugbear/rules/getattr_with_constant.rs index 572bc139e8..3c4bcf6cd9 100644 --- a/crates/ruff/src/rules/flake8_bugbear/rules/getattr_with_constant.rs +++ b/crates/ruff/src/rules/flake8_bugbear/rules/getattr_with_constant.rs @@ -1,7 +1,6 @@ -use ruff_python_ast::{self as ast, Constant, Expr}; - use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix}; use ruff_macros::{derive_message_formats, violation}; +use ruff_python_ast::{self as ast, Constant, Expr}; use ruff_python_stdlib::identifiers::{is_identifier, is_mangled_private}; use ruff_text_size::Ranged; @@ -81,7 +80,19 @@ pub(crate) fn getattr_with_constant( let mut diagnostic = Diagnostic::new(GetAttrWithConstant, expr.range()); if checker.patch(diagnostic.kind.rule()) { diagnostic.set_fix(Fix::suggested(Edit::range_replacement( - format!("{}.{}", checker.locator().slice(obj), value), + if matches!( + obj, + Expr::Constant(ast::ExprConstant { + value: Constant::Int(_), + .. + }) + ) { + // Attribute accesses on `int` literals must be parenthesized, e.g., + // `getattr(1, "real")` becomes `(1).real`. + format!("({}).{}", checker.locator().slice(obj), value) + } else { + format!("{}.{}", checker.locator().slice(obj), value) + }, expr.range(), ))); } diff --git a/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B009_B009_B010.py.snap b/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B009_B009_B010.py.snap index 94bc6e4483..c05f0f6b9d 100644 --- a/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B009_B009_B010.py.snap +++ b/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B009_B009_B010.py.snap @@ -124,7 +124,7 @@ B009_B010.py:24:15: B009 [*] Do not call `getattr` with a constant attribute val 24 |+_ = lambda x: x.bar 25 25 | if getattr(x, "bar"): 26 26 | pass -27 27 | +27 27 | getattr(1, "real") B009_B010.py:25:4: B009 [*] Do not call `getattr` with a constant attribute value. It is not any safer than normal property access. | @@ -133,6 +133,7 @@ B009_B010.py:25:4: B009 [*] Do not call `getattr` with a constant attribute valu 25 | if getattr(x, "bar"): | ^^^^^^^^^^^^^^^^^ B009 26 | pass +27 | getattr(1, "real") | = help: Replace `getattr` with attribute access @@ -143,7 +144,109 @@ B009_B010.py:25:4: B009 [*] Do not call `getattr` with a constant attribute valu 25 |-if getattr(x, "bar"): 25 |+if x.bar: 26 26 | pass -27 27 | -28 28 | # Valid setattr usage +27 27 | getattr(1, "real") +28 28 | getattr(1., "real") + +B009_B010.py:27:1: B009 [*] Do not call `getattr` with a constant attribute value. It is not any safer than normal property access. + | +25 | if getattr(x, "bar"): +26 | pass +27 | getattr(1, "real") + | ^^^^^^^^^^^^^^^^^^ B009 +28 | getattr(1., "real") +29 | getattr(1.0, "real") + | + = help: Replace `getattr` with attribute access + +ℹ Suggested fix +24 24 | _ = lambda x: getattr(x, "bar") +25 25 | if getattr(x, "bar"): +26 26 | pass +27 |-getattr(1, "real") + 27 |+(1).real +28 28 | getattr(1., "real") +29 29 | getattr(1.0, "real") +30 30 | getattr(1j, "real") + +B009_B010.py:28:1: B009 [*] Do not call `getattr` with a constant attribute value. It is not any safer than normal property access. + | +26 | pass +27 | getattr(1, "real") +28 | getattr(1., "real") + | ^^^^^^^^^^^^^^^^^^^ B009 +29 | getattr(1.0, "real") +30 | getattr(1j, "real") + | + = help: Replace `getattr` with attribute access + +ℹ Suggested fix +25 25 | if getattr(x, "bar"): +26 26 | pass +27 27 | getattr(1, "real") +28 |-getattr(1., "real") + 28 |+1..real +29 29 | getattr(1.0, "real") +30 30 | getattr(1j, "real") +31 31 | getattr(True, "real") + +B009_B010.py:29:1: B009 [*] Do not call `getattr` with a constant attribute value. It is not any safer than normal property access. + | +27 | getattr(1, "real") +28 | getattr(1., "real") +29 | getattr(1.0, "real") + | ^^^^^^^^^^^^^^^^^^^^ B009 +30 | getattr(1j, "real") +31 | getattr(True, "real") + | + = help: Replace `getattr` with attribute access + +ℹ Suggested fix +26 26 | pass +27 27 | getattr(1, "real") +28 28 | getattr(1., "real") +29 |-getattr(1.0, "real") + 29 |+1.0.real +30 30 | getattr(1j, "real") +31 31 | getattr(True, "real") +32 32 | + +B009_B010.py:30:1: B009 [*] Do not call `getattr` with a constant attribute value. It is not any safer than normal property access. + | +28 | getattr(1., "real") +29 | getattr(1.0, "real") +30 | getattr(1j, "real") + | ^^^^^^^^^^^^^^^^^^^ B009 +31 | getattr(True, "real") + | + = help: Replace `getattr` with attribute access + +ℹ Suggested fix +27 27 | getattr(1, "real") +28 28 | getattr(1., "real") +29 29 | getattr(1.0, "real") +30 |-getattr(1j, "real") + 30 |+1j.real +31 31 | getattr(True, "real") +32 32 | +33 33 | + +B009_B010.py:31:1: B009 [*] Do not call `getattr` with a constant attribute value. It is not any safer than normal property access. + | +29 | getattr(1.0, "real") +30 | getattr(1j, "real") +31 | getattr(True, "real") + | ^^^^^^^^^^^^^^^^^^^^^ B009 + | + = help: Replace `getattr` with attribute access + +ℹ Suggested fix +28 28 | getattr(1., "real") +29 29 | getattr(1.0, "real") +30 30 | getattr(1j, "real") +31 |-getattr(True, "real") + 31 |+True.real +32 32 | +33 33 | +34 34 | # Valid setattr usage diff --git a/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B010_B009_B010.py.snap b/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B010_B009_B010.py.snap index e8b728cd8f..7f27fb0c82 100644 --- a/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B010_B009_B010.py.snap +++ b/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B010_B009_B010.py.snap @@ -1,120 +1,120 @@ --- source: crates/ruff/src/rules/flake8_bugbear/mod.rs --- -B009_B010.py:40:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. +B009_B010.py:46:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. | -39 | # Invalid usage -40 | setattr(foo, "bar", None) +45 | # Invalid usage +46 | setattr(foo, "bar", None) | ^^^^^^^^^^^^^^^^^^^^^^^^^ B010 -41 | setattr(foo, "_123abc", None) -42 | setattr(foo, "__123abc__", None) +47 | setattr(foo, "_123abc", None) +48 | setattr(foo, "__123abc__", None) | = help: Replace `setattr` with assignment ℹ Suggested fix -37 37 | pass -38 38 | -39 39 | # Invalid usage -40 |-setattr(foo, "bar", None) - 40 |+foo.bar = None -41 41 | setattr(foo, "_123abc", None) -42 42 | setattr(foo, "__123abc__", None) -43 43 | setattr(foo, "abc123", None) +43 43 | pass +44 44 | +45 45 | # Invalid usage +46 |-setattr(foo, "bar", None) + 46 |+foo.bar = None +47 47 | setattr(foo, "_123abc", None) +48 48 | setattr(foo, "__123abc__", None) +49 49 | setattr(foo, "abc123", None) -B009_B010.py:41:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. +B009_B010.py:47:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. | -39 | # Invalid usage -40 | setattr(foo, "bar", None) -41 | setattr(foo, "_123abc", None) +45 | # Invalid usage +46 | setattr(foo, "bar", None) +47 | setattr(foo, "_123abc", None) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ B010 -42 | setattr(foo, "__123abc__", None) -43 | setattr(foo, "abc123", None) +48 | setattr(foo, "__123abc__", None) +49 | setattr(foo, "abc123", None) | = help: Replace `setattr` with assignment ℹ Suggested fix -38 38 | -39 39 | # Invalid usage -40 40 | setattr(foo, "bar", None) -41 |-setattr(foo, "_123abc", None) - 41 |+foo._123abc = None -42 42 | setattr(foo, "__123abc__", None) -43 43 | setattr(foo, "abc123", None) -44 44 | setattr(foo, r"abc123", None) +44 44 | +45 45 | # Invalid usage +46 46 | setattr(foo, "bar", None) +47 |-setattr(foo, "_123abc", None) + 47 |+foo._123abc = None +48 48 | setattr(foo, "__123abc__", None) +49 49 | setattr(foo, "abc123", None) +50 50 | setattr(foo, r"abc123", None) -B009_B010.py:42:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. +B009_B010.py:48:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. | -40 | setattr(foo, "bar", None) -41 | setattr(foo, "_123abc", None) -42 | setattr(foo, "__123abc__", None) +46 | setattr(foo, "bar", None) +47 | setattr(foo, "_123abc", None) +48 | setattr(foo, "__123abc__", None) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ B010 -43 | setattr(foo, "abc123", None) -44 | setattr(foo, r"abc123", None) +49 | setattr(foo, "abc123", None) +50 | setattr(foo, r"abc123", None) | = help: Replace `setattr` with assignment ℹ Suggested fix -39 39 | # Invalid usage -40 40 | setattr(foo, "bar", None) -41 41 | setattr(foo, "_123abc", None) -42 |-setattr(foo, "__123abc__", None) - 42 |+foo.__123abc__ = None -43 43 | setattr(foo, "abc123", None) -44 44 | setattr(foo, r"abc123", None) -45 45 | setattr(foo.bar, r"baz", None) +45 45 | # Invalid usage +46 46 | setattr(foo, "bar", None) +47 47 | setattr(foo, "_123abc", None) +48 |-setattr(foo, "__123abc__", None) + 48 |+foo.__123abc__ = None +49 49 | setattr(foo, "abc123", None) +50 50 | setattr(foo, r"abc123", None) +51 51 | setattr(foo.bar, r"baz", None) -B009_B010.py:43:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. +B009_B010.py:49:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. | -41 | setattr(foo, "_123abc", None) -42 | setattr(foo, "__123abc__", None) -43 | setattr(foo, "abc123", None) +47 | setattr(foo, "_123abc", None) +48 | setattr(foo, "__123abc__", None) +49 | setattr(foo, "abc123", None) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ B010 -44 | setattr(foo, r"abc123", None) -45 | setattr(foo.bar, r"baz", None) +50 | setattr(foo, r"abc123", None) +51 | setattr(foo.bar, r"baz", None) | = help: Replace `setattr` with assignment ℹ Suggested fix -40 40 | setattr(foo, "bar", None) -41 41 | setattr(foo, "_123abc", None) -42 42 | setattr(foo, "__123abc__", None) -43 |-setattr(foo, "abc123", None) - 43 |+foo.abc123 = None -44 44 | setattr(foo, r"abc123", None) -45 45 | setattr(foo.bar, r"baz", None) +46 46 | setattr(foo, "bar", None) +47 47 | setattr(foo, "_123abc", None) +48 48 | setattr(foo, "__123abc__", None) +49 |-setattr(foo, "abc123", None) + 49 |+foo.abc123 = None +50 50 | setattr(foo, r"abc123", None) +51 51 | setattr(foo.bar, r"baz", None) -B009_B010.py:44:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. +B009_B010.py:50:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. | -42 | setattr(foo, "__123abc__", None) -43 | setattr(foo, "abc123", None) -44 | setattr(foo, r"abc123", None) +48 | setattr(foo, "__123abc__", None) +49 | setattr(foo, "abc123", None) +50 | setattr(foo, r"abc123", None) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ B010 -45 | setattr(foo.bar, r"baz", None) +51 | setattr(foo.bar, r"baz", None) | = help: Replace `setattr` with assignment ℹ Suggested fix -41 41 | setattr(foo, "_123abc", None) -42 42 | setattr(foo, "__123abc__", None) -43 43 | setattr(foo, "abc123", None) -44 |-setattr(foo, r"abc123", None) - 44 |+foo.abc123 = None -45 45 | setattr(foo.bar, r"baz", None) +47 47 | setattr(foo, "_123abc", None) +48 48 | setattr(foo, "__123abc__", None) +49 49 | setattr(foo, "abc123", None) +50 |-setattr(foo, r"abc123", None) + 50 |+foo.abc123 = None +51 51 | setattr(foo.bar, r"baz", None) -B009_B010.py:45:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. +B009_B010.py:51:1: B010 [*] Do not call `setattr` with a constant attribute value. It is not any safer than normal property access. | -43 | setattr(foo, "abc123", None) -44 | setattr(foo, r"abc123", None) -45 | setattr(foo.bar, r"baz", None) +49 | setattr(foo, "abc123", None) +50 | setattr(foo, r"abc123", None) +51 | setattr(foo.bar, r"baz", None) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ B010 | = help: Replace `setattr` with assignment ℹ Suggested fix -42 42 | setattr(foo, "__123abc__", None) -43 43 | setattr(foo, "abc123", None) -44 44 | setattr(foo, r"abc123", None) -45 |-setattr(foo.bar, r"baz", None) - 45 |+foo.bar.baz = None +48 48 | setattr(foo, "__123abc__", None) +49 49 | setattr(foo, "abc123", None) +50 50 | setattr(foo, r"abc123", None) +51 |-setattr(foo.bar, r"baz", None) + 51 |+foo.bar.baz = None From 45680bbb444fed282ef7d19eee822cbad9ac3a26 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sat, 2 Sep 2023 12:58:18 +0100 Subject: [PATCH 032/164] Avoid duplicate fixes for multi-import imports in RUF017 (#7063) If a user has `import collections, functools, operator`, and we try to import from `functools` and `operator`, we end up adding two identical synthetic edits to preserve that import statement. We need to dedupe them. Closes https://github.com/astral-sh/ruff/issues/7059. --- .../ruff/resources/test/fixtures/ruff/RUF017.py | 7 +++++++ .../rules/ruff/rules/quadratic_list_summation.rs | 3 ++- ...ff__rules__ruff__tests__RUF017_RUF017.py.snap | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/crates/ruff/resources/test/fixtures/ruff/RUF017.py b/crates/ruff/resources/test/fixtures/ruff/RUF017.py index f7c062d894..546d08be57 100644 --- a/crates/ruff/resources/test/fixtures/ruff/RUF017.py +++ b/crates/ruff/resources/test/fixtures/ruff/RUF017.py @@ -12,3 +12,10 @@ sum([[1, 2, 3], [4, 5, 6]], # OK sum([x, y]) sum([[1, 2, 3], [4, 5, 6]]) + + +# Regression test for: https://github.com/astral-sh/ruff/issues/7059 +def func(): + import functools, operator + + sum([x, y], []) diff --git a/crates/ruff/src/rules/ruff/rules/quadratic_list_summation.rs b/crates/ruff/src/rules/ruff/rules/quadratic_list_summation.rs index 62f51692fe..1d85555132 100644 --- a/crates/ruff/src/rules/ruff/rules/quadratic_list_summation.rs +++ b/crates/ruff/src/rules/ruff/rules/quadratic_list_summation.rs @@ -1,4 +1,5 @@ use anyhow::Result; +use itertools::Itertools; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix}; use ruff_macros::{derive_message_formats, violation}; @@ -106,7 +107,7 @@ fn convert_to_reduce(iterable: &Expr, call: &ast::ExprCall, checker: &Checker) - format!("{reduce_binding}({iadd_binding}, {iterable}, [])"), call.range(), ), - [reduce_edit, iadd_edit], + [reduce_edit, iadd_edit].into_iter().dedup(), )) } diff --git a/crates/ruff/src/rules/ruff/snapshots/ruff__rules__ruff__tests__RUF017_RUF017.py.snap b/crates/ruff/src/rules/ruff/snapshots/ruff__rules__ruff__tests__RUF017_RUF017.py.snap index b05d32ea23..4cda3a5c80 100644 --- a/crates/ruff/src/rules/ruff/snapshots/ruff__rules__ruff__tests__RUF017_RUF017.py.snap +++ b/crates/ruff/src/rules/ruff/snapshots/ruff__rules__ruff__tests__RUF017_RUF017.py.snap @@ -131,4 +131,20 @@ RUF017.py:9:1: RUF017 [*] Avoid quadratic list summation 12 13 | # OK 13 14 | sum([x, y]) +RUF017.py:21:5: RUF017 [*] Avoid quadratic list summation + | +19 | import functools, operator +20 | +21 | sum([x, y], []) + | ^^^^^^^^^^^^^^^ RUF017 + | + = help: Replace with `functools.reduce` + +ℹ Suggested fix +18 18 | def func(): +19 19 | import functools, operator +20 20 | +21 |- sum([x, y], []) + 21 |+ functools.reduce(operator.iadd, [x, y], []) + From 577280c8bea1e4bb1e1a37ca7e1325dc655b38bb Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sat, 2 Sep 2023 17:25:23 +0100 Subject: [PATCH 033/164] Rename `ruff_python_formatter/README.md` to `CONTRIBUTING.md` (#7065) --- .../{README.md => CONTRIBUTING.md} | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) rename crates/ruff_python_formatter/{README.md => CONTRIBUTING.md} (95%) diff --git a/crates/ruff_python_formatter/README.md b/crates/ruff_python_formatter/CONTRIBUTING.md similarity index 95% rename from crates/ruff_python_formatter/README.md rename to crates/ruff_python_formatter/CONTRIBUTING.md index 42f4fd7693..c302a4dc49 100644 --- a/crates/ruff_python_formatter/README.md +++ b/crates/ruff_python_formatter/CONTRIBUTING.md @@ -1,28 +1,21 @@ -# Rust Python Formatter +# Contributing to the Ruff Formatter The goal of our formatter is to be compatible with Black except for rare edge cases (mostly -involving comment placement). +involving comment placement). This document outlines the expected development workflow for the +formatter and walks through some of its internals. -You can try an experimental version of the formatter on your project with: +## Testing your changes -```shell -cargo run --bin ruff -- format path/to/your/project -``` - -Note that currently the only supported option is `line-length` and that both the CLI and the -formatting are a work-in-progress and will change before the stable release. - -## Dev tools - -**Testing your changes** You can use the `ruff_python_formatter` binary to format individual files -and show debug info. It's fast to compile because it doesn't depend on `ruff`. The easiest way is to -create a `scratch.py` (or `scratch.pyi`) in the project root and run +You can use the `ruff_python_formatter` binary to format individual files and show debug info. +It's fast to compile because it doesn't depend on `ruff`. The easiest way is to create a +`scratch.py` (or `scratch.pyi`) in the project root and run: ```shell cargo run --bin ruff_python_formatter -- --emit stdout scratch.py ``` -which has `--print-ir` and `--print-comments` options. We especially recommend `--print-comments`. +...which supports the `--print-ir` and `--print-comments` flag. (We recommend running with +`--print-comments`.)
Usage example From 4eaa4123700d84b4552754e8c22eb7c4377204b4 Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Sun, 3 Sep 2023 09:11:24 +0530 Subject: [PATCH 034/164] Update LibCST (#7062) ## Summary This PR updates the revision of `LibCST` dependency to https://github.com/Instagram/LibCST/commit/9c263aa8977962a870ce2770d2aa18ee0dacb344 inorder to fix https://github.com/astral-sh/ruff/issues/4899 ## Test Plan The test case including the carriage return (`\r`) character was added for `F504` and then `cargo test`. fixes: #4899 --- Cargo.lock | 7 +++--- Cargo.toml | 2 +- .../resources/test/fixtures/pyflakes/F504.py | 5 ++++ ..._rules__pyflakes__tests__F504_F504.py.snap | 24 +++++++++++++++++++ 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d9734e49a..6f5d3a93a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1269,12 +1269,11 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libcst" version = "0.1.0" -source = "git+https://github.com/Instagram/LibCST.git?rev=3cacca1a1029f05707e50703b49fe3dd860aa839#3cacca1a1029f05707e50703b49fe3dd860aa839" +source = "git+https://github.com/Instagram/LibCST.git?rev=9c263aa8977962a870ce2770d2aa18ee0dacb344#9c263aa8977962a870ce2770d2aa18ee0dacb344" dependencies = [ "chic", - "itertools", "libcst_derive", - "once_cell", + "memchr", "paste", "peg", "regex", @@ -1284,7 +1283,7 @@ dependencies = [ [[package]] name = "libcst_derive" version = "0.1.0" -source = "git+https://github.com/Instagram/LibCST.git?rev=3cacca1a1029f05707e50703b49fe3dd860aa839#3cacca1a1029f05707e50703b49fe3dd860aa839" +source = "git+https://github.com/Instagram/LibCST.git?rev=9c263aa8977962a870ce2770d2aa18ee0dacb344#9c263aa8977962a870ce2770d2aa18ee0dacb344" dependencies = [ "quote", "syn 1.0.109", diff --git a/Cargo.toml b/Cargo.toml index ae97f5676f..2339caf17f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,7 @@ uuid = { version = "1.4.1", features = ["v4", "fast-rng", "macro-diagnostics", " wsl = { version = "0.1.0" } # v1.0.1 -libcst = { git = "https://github.com/Instagram/LibCST.git", rev = "3cacca1a1029f05707e50703b49fe3dd860aa839", default-features = false } +libcst = { git = "https://github.com/Instagram/LibCST.git", rev = "9c263aa8977962a870ce2770d2aa18ee0dacb344", default-features = false } [profile.release] lto = "fat" diff --git a/crates/ruff/resources/test/fixtures/pyflakes/F504.py b/crates/ruff/resources/test/fixtures/pyflakes/F504.py index 8a4ab822e4..bb5549adae 100644 --- a/crates/ruff/resources/test/fixtures/pyflakes/F504.py +++ b/crates/ruff/resources/test/fixtures/pyflakes/F504.py @@ -9,3 +9,8 @@ hidden = {"a": "!"} "%(a)s" % {'a': 1, u"b": "!"} # F504 ("b" not used) '' % {'a''b' : ''} # F504 ("ab" not used) + +# https://github.com/astral-sh/ruff/issues/4899 +"" % { + 'test1': '', 'test2': '', +} diff --git a/crates/ruff/src/rules/pyflakes/snapshots/ruff__rules__pyflakes__tests__F504_F504.py.snap b/crates/ruff/src/rules/pyflakes/snapshots/ruff__rules__pyflakes__tests__F504_F504.py.snap index e72bdbd62b..c9035cd3c4 100644 --- a/crates/ruff/src/rules/pyflakes/snapshots/ruff__rules__pyflakes__tests__F504_F504.py.snap +++ b/crates/ruff/src/rules/pyflakes/snapshots/ruff__rules__pyflakes__tests__F504_F504.py.snap @@ -59,6 +59,7 @@ F504.py:9:1: F504 [*] `%`-format string has unused named argument(s): b 9 |+"%(a)s" % {'a': 1, } # F504 ("b" not used) 10 10 | 11 11 | '' % {'a''b' : ''} # F504 ("ab" not used) +12 12 | F504.py:11:1: F504 [*] `%`-format string has unused named argument(s): ab | @@ -66,6 +67,8 @@ F504.py:11:1: F504 [*] `%`-format string has unused named argument(s): ab 10 | 11 | '' % {'a''b' : ''} # F504 ("ab" not used) | ^^^^^^^^^^^^^^^^^^ F504 +12 | +13 | # https://github.com/astral-sh/ruff/issues/4899 | = help: Remove extra named arguments: ab @@ -75,5 +78,26 @@ F504.py:11:1: F504 [*] `%`-format string has unused named argument(s): ab 10 10 | 11 |-'' % {'a''b' : ''} # F504 ("ab" not used) 11 |+'' % {} # F504 ("ab" not used) +12 12 | +13 13 | # https://github.com/astral-sh/ruff/issues/4899 +14 14 | "" % { + +F504.py:14:1: F504 [*] `%`-format string has unused named argument(s): test1, test2 + | +13 | # https://github.com/astral-sh/ruff/issues/4899 +14 | / "" % { +15 | | 'test1': '', 'test2': '', +16 | | } + | |_^ F504 + | + = help: Remove extra named arguments: test1, test2 + +ℹ Fix +12 12 | +13 13 | # https://github.com/astral-sh/ruff/issues/4899 +14 14 | "" % { +15 |- 'test1': '', 16 |- 'test2': '', + 15 |+ +17 16 | } From b70dde4a777df0172383e76ae7c914314f5da70e Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 3 Sep 2023 14:23:36 +0100 Subject: [PATCH 035/164] Avoid attempting to fix invalid `Optional` annotations (#7079) --- .../resources/test/fixtures/pyupgrade/UP007.py | 4 ++++ .../pyupgrade/rules/use_pep604_annotation.rs | 15 +++++++++++---- .../ruff__rules__pyupgrade__tests__UP007.py.snap | 8 ++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/crates/ruff/resources/test/fixtures/pyupgrade/UP007.py b/crates/ruff/resources/test/fixtures/pyupgrade/UP007.py index 47c9fdbc0a..f1c658798e 100644 --- a/crates/ruff/resources/test/fixtures/pyupgrade/UP007.py +++ b/crates/ruff/resources/test/fixtures/pyupgrade/UP007.py @@ -91,3 +91,7 @@ def f(x: Optional[int : float]) -> None: def f(x: Optional[str, int : float]) -> None: ... + + +def f(x: Optional[int, float]) -> None: + ... diff --git a/crates/ruff/src/rules/pyupgrade/rules/use_pep604_annotation.rs b/crates/ruff/src/rules/pyupgrade/rules/use_pep604_annotation.rs index 7873dc98ea..cfa6615f0a 100644 --- a/crates/ruff/src/rules/pyupgrade/rules/use_pep604_annotation.rs +++ b/crates/ruff/src/rules/pyupgrade/rules/use_pep604_annotation.rs @@ -77,10 +77,17 @@ pub(crate) fn use_pep604_annotation( Pep604Operator::Optional => { let mut diagnostic = Diagnostic::new(NonPEP604Annotation, expr.range()); if fixable && checker.patch(diagnostic.kind.rule()) { - diagnostic.set_fix(Fix::suggested(Edit::range_replacement( - optional(slice, checker.locator()), - expr.range(), - ))); + match slice { + Expr::Tuple(_) => { + // Invalid type annotation. + } + _ => { + diagnostic.set_fix(Fix::suggested(Edit::range_replacement( + optional(slice, checker.locator()), + expr.range(), + ))); + } + } } checker.diagnostics.push(diagnostic); } diff --git a/crates/ruff/src/rules/pyupgrade/snapshots/ruff__rules__pyupgrade__tests__UP007.py.snap b/crates/ruff/src/rules/pyupgrade/snapshots/ruff__rules__pyupgrade__tests__UP007.py.snap index b5b6998a18..fd473b7096 100644 --- a/crates/ruff/src/rules/pyupgrade/snapshots/ruff__rules__pyupgrade__tests__UP007.py.snap +++ b/crates/ruff/src/rules/pyupgrade/snapshots/ruff__rules__pyupgrade__tests__UP007.py.snap @@ -361,4 +361,12 @@ UP007.py:92:10: UP007 Use `X | Y` for type annotations | = help: Convert to `X | Y` +UP007.py:96:10: UP007 Use `X | Y` for type annotations + | +96 | def f(x: Optional[int, float]) -> None: + | ^^^^^^^^^^^^^^^^^^^^ UP007 +97 | ... + | + = help: Convert to `X | Y` + From b0d171ac19199998c92d1d7f97b58079161a7b61 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 3 Sep 2023 14:31:13 +0100 Subject: [PATCH 036/164] Supported starred exceptions in length-one tuple detection (#7080) --- .../test/fixtures/flake8_bugbear/B013.py | 4 ++ .../redundant_tuple_in_exception_handler.rs | 10 ++--- ...__flake8_bugbear__tests__B013_B013.py.snap | 41 ++++++++++++++----- crates/ruff_python_ast/src/helpers.rs | 11 +++++ 4 files changed, 49 insertions(+), 17 deletions(-) diff --git a/crates/ruff/resources/test/fixtures/flake8_bugbear/B013.py b/crates/ruff/resources/test/fixtures/flake8_bugbear/B013.py index 27b21bb638..e9b9c9636b 100644 --- a/crates/ruff/resources/test/fixtures/flake8_bugbear/B013.py +++ b/crates/ruff/resources/test/fixtures/flake8_bugbear/B013.py @@ -1,3 +1,5 @@ +retriable_exceptions = (FileExistsError, FileNotFoundError) + try: pass except (ValueError,): @@ -6,3 +8,5 @@ except AttributeError: pass except (ImportError, TypeError): pass +except (*retriable_exceptions,): + pass diff --git a/crates/ruff/src/rules/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs b/crates/ruff/src/rules/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs index 68accc1b65..f2038152f2 100644 --- a/crates/ruff/src/rules/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs +++ b/crates/ruff/src/rules/flake8_bugbear/rules/redundant_tuple_in_exception_handler.rs @@ -2,6 +2,7 @@ use ruff_python_ast::{self as ast, ExceptHandler, Expr}; use ruff_diagnostics::{AlwaysAutofixableViolation, Diagnostic, Edit, Fix}; use ruff_macros::{derive_message_formats, violation}; +use ruff_python_ast::helpers::map_starred; use ruff_text_size::Ranged; use crate::checkers::ast::Checker; @@ -41,11 +42,7 @@ pub struct RedundantTupleInExceptionHandler { impl AlwaysAutofixableViolation for RedundantTupleInExceptionHandler { #[derive_message_formats] fn message(&self) -> String { - let RedundantTupleInExceptionHandler { name } = self; - format!( - "A length-one tuple literal is redundant. Write `except {name}` instead of `except \ - ({name},)`." - ) + format!("A length-one tuple literal is redundant in exception handlers") } fn autofix_title(&self) -> String { @@ -70,9 +67,10 @@ pub(crate) fn redundant_tuple_in_exception_handler( let Expr::Tuple(ast::ExprTuple { elts, .. }) = type_.as_ref() else { continue; }; - let [elt] = &elts[..] else { + let [elt] = elts.as_slice() else { continue; }; + let elt = map_starred(elt); let mut diagnostic = Diagnostic::new( RedundantTupleInExceptionHandler { name: checker.generator().expr(elt), diff --git a/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B013_B013.py.snap b/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B013_B013.py.snap index 3be573fd87..a5e818879f 100644 --- a/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B013_B013.py.snap +++ b/crates/ruff/src/rules/flake8_bugbear/snapshots/ruff__rules__flake8_bugbear__tests__B013_B013.py.snap @@ -1,24 +1,43 @@ --- source: crates/ruff/src/rules/flake8_bugbear/mod.rs --- -B013.py:3:8: B013 [*] A length-one tuple literal is redundant. Write `except ValueError` instead of `except (ValueError,)`. +B013.py:5:8: B013 [*] A length-one tuple literal is redundant in exception handlers | -1 | try: -2 | pass -3 | except (ValueError,): - | ^^^^^^^^^^^^^ B013 +3 | try: 4 | pass -5 | except AttributeError: +5 | except (ValueError,): + | ^^^^^^^^^^^^^ B013 +6 | pass +7 | except AttributeError: | = help: Replace with `except ValueError` ℹ Fix -1 1 | try: -2 2 | pass -3 |-except (ValueError,): - 3 |+except ValueError: +2 2 | +3 3 | try: 4 4 | pass -5 5 | except AttributeError: +5 |-except (ValueError,): + 5 |+except ValueError: 6 6 | pass +7 7 | except AttributeError: +8 8 | pass + +B013.py:11:8: B013 [*] A length-one tuple literal is redundant in exception handlers + | + 9 | except (ImportError, TypeError): +10 | pass +11 | except (*retriable_exceptions,): + | ^^^^^^^^^^^^^^^^^^^^^^^^ B013 +12 | pass + | + = help: Replace with `except retriable_exceptions` + +ℹ Fix +8 8 | pass +9 9 | except (ImportError, TypeError): +10 10 | pass +11 |-except (*retriable_exceptions,): + 11 |+except retriable_exceptions: +12 12 | pass diff --git a/crates/ruff_python_ast/src/helpers.rs b/crates/ruff_python_ast/src/helpers.rs index 8c97f9a172..9a9b7982a2 100644 --- a/crates/ruff_python_ast/src/helpers.rs +++ b/crates/ruff_python_ast/src/helpers.rs @@ -653,6 +653,17 @@ pub fn map_subscript(expr: &Expr) -> &Expr { } } +/// Given an [`Expr`] that can be starred, return the underlying starred expression. +pub fn map_starred(expr: &Expr) -> &Expr { + if let Expr::Starred(ast::ExprStarred { value, .. }) = expr { + // Ex) `*args` + value + } else { + // Ex) `args` + expr + } +} + /// Return `true` if the body uses `locals()`, `globals()`, `vars()`, `eval()`. /// /// Accepts a closure that determines whether a given name (e.g., `"list"`) is a Python builtin. From 3c3c5b5c57c2f4857d9de13f145086891b041ed4 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 3 Sep 2023 14:34:10 +0100 Subject: [PATCH 037/164] Support length-2 lists in dictionary comprehension rewrites (#7081) --- .../fixtures/flake8_comprehensions/C417.py | 1 + .../src/rules/flake8_comprehensions/fixes.rs | 28 +- ...8_comprehensions__tests__C417_C417.py.snap | 243 ++++++++++-------- 3 files changed, 147 insertions(+), 125 deletions(-) diff --git a/crates/ruff/resources/test/fixtures/flake8_comprehensions/C417.py b/crates/ruff/resources/test/fixtures/flake8_comprehensions/C417.py index daffead2f8..0d7565336b 100644 --- a/crates/ruff/resources/test/fixtures/flake8_comprehensions/C417.py +++ b/crates/ruff/resources/test/fixtures/flake8_comprehensions/C417.py @@ -5,6 +5,7 @@ map(lambda x: str(x), nums) list(map(lambda x: x * 2, nums)) set(map(lambda x: x % 2 == 0, nums)) dict(map(lambda v: (v, v**2), nums)) +dict(map(lambda v: [v, v**2], nums)) map(lambda: "const", nums) map(lambda _: 3.0, nums) _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) diff --git a/crates/ruff/src/rules/flake8_comprehensions/fixes.rs b/crates/ruff/src/rules/flake8_comprehensions/fixes.rs index 3c5aaa9287..d895f339d0 100644 --- a/crates/ruff/src/rules/flake8_comprehensions/fixes.rs +++ b/crates/ruff/src/rules/flake8_comprehensions/fixes.rs @@ -966,21 +966,21 @@ pub(crate) fn fix_unnecessary_map( })); } ObjectType::Dict => { - let (key, value) = if let Expression::Tuple(tuple) = func_body.body.as_ref() { - if tuple.elements.len() != 2 { - bail!("Expected two elements") + let elements = match func_body.body.as_ref() { + Expression::Tuple(tuple) => &tuple.elements, + Expression::List(list) => &list.elements, + _ => { + bail!("Expected tuple or list for dictionary comprehension") } - - let Some(Element::Simple { value: key, .. }) = &tuple.elements.get(0) else { - bail!("Expected tuple to contain a key as the first element"); - }; - let Some(Element::Simple { value, .. }) = &tuple.elements.get(1) else { - bail!("Expected tuple to contain a key as the second element"); - }; - - (key, value) - } else { - bail!("Expected tuple for dict comprehension") + }; + let [key, value] = elements.as_slice() else { + bail!("Expected container to include two elements"); + }; + let Element::Simple { value: key, .. } = key else { + bail!("Expected container to use a key as the first element"); + }; + let Element::Simple { value, .. } = value else { + bail!("Expected container to use a value as the second element"); }; tree = Expression::DictComp(Box::new(DictComp { diff --git a/crates/ruff/src/rules/flake8_comprehensions/snapshots/ruff__rules__flake8_comprehensions__tests__C417_C417.py.snap b/crates/ruff/src/rules/flake8_comprehensions/snapshots/ruff__rules__flake8_comprehensions__tests__C417_C417.py.snap index c04bcb03b9..5152e13434 100644 --- a/crates/ruff/src/rules/flake8_comprehensions/snapshots/ruff__rules__flake8_comprehensions__tests__C417_C417.py.snap +++ b/crates/ruff/src/rules/flake8_comprehensions/snapshots/ruff__rules__flake8_comprehensions__tests__C417_C417.py.snap @@ -61,7 +61,7 @@ C417.py:5:1: C417 [*] Unnecessary `map` usage (rewrite using a `list` comprehens 5 |+[x * 2 for x in nums] 6 6 | set(map(lambda x: x % 2 == 0, nums)) 7 7 | dict(map(lambda v: (v, v**2), nums)) -8 8 | map(lambda: "const", nums) +8 8 | dict(map(lambda v: [v, v**2], nums)) C417.py:6:1: C417 [*] Unnecessary `map` usage (rewrite using a `set` comprehension) | @@ -70,7 +70,7 @@ C417.py:6:1: C417 [*] Unnecessary `map` usage (rewrite using a `set` comprehensi 6 | set(map(lambda x: x % 2 == 0, nums)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 7 | dict(map(lambda v: (v, v**2), nums)) -8 | map(lambda: "const", nums) +8 | dict(map(lambda v: [v, v**2], nums)) | = help: Replace `map` with a `set` comprehension @@ -81,8 +81,8 @@ C417.py:6:1: C417 [*] Unnecessary `map` usage (rewrite using a `set` comprehensi 6 |-set(map(lambda x: x % 2 == 0, nums)) 6 |+{x % 2 == 0 for x in nums} 7 7 | dict(map(lambda v: (v, v**2), nums)) -8 8 | map(lambda: "const", nums) -9 9 | map(lambda _: 3.0, nums) +8 8 | dict(map(lambda v: [v, v**2], nums)) +9 9 | map(lambda: "const", nums) C417.py:7:1: C417 [*] Unnecessary `map` usage (rewrite using a `dict` comprehension) | @@ -90,8 +90,8 @@ C417.py:7:1: C417 [*] Unnecessary `map` usage (rewrite using a `dict` comprehens 6 | set(map(lambda x: x % 2 == 0, nums)) 7 | dict(map(lambda v: (v, v**2), nums)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 -8 | map(lambda: "const", nums) -9 | map(lambda _: 3.0, nums) +8 | dict(map(lambda v: [v, v**2], nums)) +9 | map(lambda: "const", nums) | = help: Replace `map` with a `dict` comprehension @@ -101,172 +101,193 @@ C417.py:7:1: C417 [*] Unnecessary `map` usage (rewrite using a `dict` comprehens 6 6 | set(map(lambda x: x % 2 == 0, nums)) 7 |-dict(map(lambda v: (v, v**2), nums)) 7 |+{v: v**2 for v in nums} -8 8 | map(lambda: "const", nums) -9 9 | map(lambda _: 3.0, nums) -10 10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) +8 8 | dict(map(lambda v: [v, v**2], nums)) +9 9 | map(lambda: "const", nums) +10 10 | map(lambda _: 3.0, nums) -C417.py:8:1: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) +C417.py:8:1: C417 [*] Unnecessary `map` usage (rewrite using a `dict` comprehension) | 6 | set(map(lambda x: x % 2 == 0, nums)) 7 | dict(map(lambda v: (v, v**2), nums)) - 8 | map(lambda: "const", nums) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 - 9 | map(lambda _: 3.0, nums) -10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) + 8 | dict(map(lambda v: [v, v**2], nums)) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 + 9 | map(lambda: "const", nums) +10 | map(lambda _: 3.0, nums) | - = help: Replace `map` with a generator expression + = help: Replace `map` with a `dict` comprehension ℹ Suggested fix 5 5 | list(map(lambda x: x * 2, nums)) 6 6 | set(map(lambda x: x % 2 == 0, nums)) 7 7 | dict(map(lambda v: (v, v**2), nums)) -8 |-map(lambda: "const", nums) - 8 |+("const" for _ in nums) -9 9 | map(lambda _: 3.0, nums) -10 10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) -11 11 | all(map(lambda v: isinstance(v, dict), nums)) +8 |-dict(map(lambda v: [v, v**2], nums)) + 8 |+{v: v**2 for v in nums} +9 9 | map(lambda: "const", nums) +10 10 | map(lambda _: 3.0, nums) +11 11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) C417.py:9:1: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) | 7 | dict(map(lambda v: (v, v**2), nums)) - 8 | map(lambda: "const", nums) - 9 | map(lambda _: 3.0, nums) - | ^^^^^^^^^^^^^^^^^^^^^^^^ C417 -10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) -11 | all(map(lambda v: isinstance(v, dict), nums)) + 8 | dict(map(lambda v: [v, v**2], nums)) + 9 | map(lambda: "const", nums) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 +10 | map(lambda _: 3.0, nums) +11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) | = help: Replace `map` with a generator expression ℹ Suggested fix 6 6 | set(map(lambda x: x % 2 == 0, nums)) 7 7 | dict(map(lambda v: (v, v**2), nums)) -8 8 | map(lambda: "const", nums) -9 |-map(lambda _: 3.0, nums) - 9 |+(3.0 for _ in nums) -10 10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) -11 11 | all(map(lambda v: isinstance(v, dict), nums)) -12 12 | filter(func, map(lambda v: v, nums)) +8 8 | dict(map(lambda v: [v, v**2], nums)) +9 |-map(lambda: "const", nums) + 9 |+("const" for _ in nums) +10 10 | map(lambda _: 3.0, nums) +11 11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) +12 12 | all(map(lambda v: isinstance(v, dict), nums)) -C417.py:10:13: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) +C417.py:10:1: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) | - 8 | map(lambda: "const", nums) - 9 | map(lambda _: 3.0, nums) -10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 -11 | all(map(lambda v: isinstance(v, dict), nums)) -12 | filter(func, map(lambda v: v, nums)) + 8 | dict(map(lambda v: [v, v**2], nums)) + 9 | map(lambda: "const", nums) +10 | map(lambda _: 3.0, nums) + | ^^^^^^^^^^^^^^^^^^^^^^^^ C417 +11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) +12 | all(map(lambda v: isinstance(v, dict), nums)) | = help: Replace `map` with a generator expression ℹ Suggested fix 7 7 | dict(map(lambda v: (v, v**2), nums)) -8 8 | map(lambda: "const", nums) -9 9 | map(lambda _: 3.0, nums) -10 |-_ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) - 10 |+_ = "".join((x in nums and "1" or "0" for x in range(123))) -11 11 | all(map(lambda v: isinstance(v, dict), nums)) -12 12 | filter(func, map(lambda v: v, nums)) -13 13 | +8 8 | dict(map(lambda v: [v, v**2], nums)) +9 9 | map(lambda: "const", nums) +10 |-map(lambda _: 3.0, nums) + 10 |+(3.0 for _ in nums) +11 11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) +12 12 | all(map(lambda v: isinstance(v, dict), nums)) +13 13 | filter(func, map(lambda v: v, nums)) -C417.py:11:5: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) +C417.py:11:13: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) | - 9 | map(lambda _: 3.0, nums) -10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) -11 | all(map(lambda v: isinstance(v, dict), nums)) + 9 | map(lambda: "const", nums) +10 | map(lambda _: 3.0, nums) +11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 +12 | all(map(lambda v: isinstance(v, dict), nums)) +13 | filter(func, map(lambda v: v, nums)) + | + = help: Replace `map` with a generator expression + +ℹ Suggested fix +8 8 | dict(map(lambda v: [v, v**2], nums)) +9 9 | map(lambda: "const", nums) +10 10 | map(lambda _: 3.0, nums) +11 |-_ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) + 11 |+_ = "".join((x in nums and "1" or "0" for x in range(123))) +12 12 | all(map(lambda v: isinstance(v, dict), nums)) +13 13 | filter(func, map(lambda v: v, nums)) +14 14 | + +C417.py:12:5: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) + | +10 | map(lambda _: 3.0, nums) +11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) +12 | all(map(lambda v: isinstance(v, dict), nums)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 -12 | filter(func, map(lambda v: v, nums)) +13 | filter(func, map(lambda v: v, nums)) | = help: Replace `map` with a generator expression ℹ Suggested fix -8 8 | map(lambda: "const", nums) -9 9 | map(lambda _: 3.0, nums) -10 10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) -11 |-all(map(lambda v: isinstance(v, dict), nums)) - 11 |+all((isinstance(v, dict) for v in nums)) -12 12 | filter(func, map(lambda v: v, nums)) -13 13 | -14 14 | # When inside f-string, then the fix should be surrounded by whitespace +9 9 | map(lambda: "const", nums) +10 10 | map(lambda _: 3.0, nums) +11 11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) +12 |-all(map(lambda v: isinstance(v, dict), nums)) + 12 |+all((isinstance(v, dict) for v in nums)) +13 13 | filter(func, map(lambda v: v, nums)) +14 14 | +15 15 | # When inside f-string, then the fix should be surrounded by whitespace -C417.py:12:14: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) +C417.py:13:14: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) | -10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) -11 | all(map(lambda v: isinstance(v, dict), nums)) -12 | filter(func, map(lambda v: v, nums)) +11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) +12 | all(map(lambda v: isinstance(v, dict), nums)) +13 | filter(func, map(lambda v: v, nums)) | ^^^^^^^^^^^^^^^^^^^^^^ C417 -13 | -14 | # When inside f-string, then the fix should be surrounded by whitespace +14 | +15 | # When inside f-string, then the fix should be surrounded by whitespace | = help: Replace `map` with a generator expression ℹ Suggested fix -9 9 | map(lambda _: 3.0, nums) -10 10 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) -11 11 | all(map(lambda v: isinstance(v, dict), nums)) -12 |-filter(func, map(lambda v: v, nums)) - 12 |+filter(func, (v for v in nums)) -13 13 | -14 14 | # When inside f-string, then the fix should be surrounded by whitespace -15 15 | _ = f"{set(map(lambda x: x % 2 == 0, nums))}" +10 10 | map(lambda _: 3.0, nums) +11 11 | _ = "".join(map(lambda x: x in nums and "1" or "0", range(123))) +12 12 | all(map(lambda v: isinstance(v, dict), nums)) +13 |-filter(func, map(lambda v: v, nums)) + 13 |+filter(func, (v for v in nums)) +14 14 | +15 15 | # When inside f-string, then the fix should be surrounded by whitespace +16 16 | _ = f"{set(map(lambda x: x % 2 == 0, nums))}" -C417.py:15:8: C417 [*] Unnecessary `map` usage (rewrite using a `set` comprehension) +C417.py:16:8: C417 [*] Unnecessary `map` usage (rewrite using a `set` comprehension) | -14 | # When inside f-string, then the fix should be surrounded by whitespace -15 | _ = f"{set(map(lambda x: x % 2 == 0, nums))}" +15 | # When inside f-string, then the fix should be surrounded by whitespace +16 | _ = f"{set(map(lambda x: x % 2 == 0, nums))}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 -16 | _ = f"{dict(map(lambda v: (v, v**2), nums))}" +17 | _ = f"{dict(map(lambda v: (v, v**2), nums))}" | = help: Replace `map` with a `set` comprehension ℹ Suggested fix -12 12 | filter(func, map(lambda v: v, nums)) -13 13 | -14 14 | # When inside f-string, then the fix should be surrounded by whitespace -15 |-_ = f"{set(map(lambda x: x % 2 == 0, nums))}" - 15 |+_ = f"{ {x % 2 == 0 for x in nums} }" -16 16 | _ = f"{dict(map(lambda v: (v, v**2), nums))}" -17 17 | -18 18 | # False negatives. +13 13 | filter(func, map(lambda v: v, nums)) +14 14 | +15 15 | # When inside f-string, then the fix should be surrounded by whitespace +16 |-_ = f"{set(map(lambda x: x % 2 == 0, nums))}" + 16 |+_ = f"{ {x % 2 == 0 for x in nums} }" +17 17 | _ = f"{dict(map(lambda v: (v, v**2), nums))}" +18 18 | +19 19 | # False negatives. -C417.py:16:8: C417 [*] Unnecessary `map` usage (rewrite using a `dict` comprehension) +C417.py:17:8: C417 [*] Unnecessary `map` usage (rewrite using a `dict` comprehension) | -14 | # When inside f-string, then the fix should be surrounded by whitespace -15 | _ = f"{set(map(lambda x: x % 2 == 0, nums))}" -16 | _ = f"{dict(map(lambda v: (v, v**2), nums))}" +15 | # When inside f-string, then the fix should be surrounded by whitespace +16 | _ = f"{set(map(lambda x: x % 2 == 0, nums))}" +17 | _ = f"{dict(map(lambda v: (v, v**2), nums))}" | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 -17 | -18 | # False negatives. +18 | +19 | # False negatives. | = help: Replace `map` with a `dict` comprehension ℹ Suggested fix -13 13 | -14 14 | # When inside f-string, then the fix should be surrounded by whitespace -15 15 | _ = f"{set(map(lambda x: x % 2 == 0, nums))}" -16 |-_ = f"{dict(map(lambda v: (v, v**2), nums))}" - 16 |+_ = f"{ {v: v**2 for v in nums} }" -17 17 | -18 18 | # False negatives. -19 19 | map(lambda x=2, y=1: x + y, nums, nums) +14 14 | +15 15 | # When inside f-string, then the fix should be surrounded by whitespace +16 16 | _ = f"{set(map(lambda x: x % 2 == 0, nums))}" +17 |-_ = f"{dict(map(lambda v: (v, v**2), nums))}" + 17 |+_ = f"{ {v: v**2 for v in nums} }" +18 18 | +19 19 | # False negatives. +20 20 | map(lambda x=2, y=1: x + y, nums, nums) -C417.py:34:1: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) +C417.py:35:1: C417 [*] Unnecessary `map` usage (rewrite using a generator expression) | -33 | # Error: the `x` is overridden by the inner lambda. -34 | map(lambda x: lambda x: x, range(4)) +34 | # Error: the `x` is overridden by the inner lambda. +35 | map(lambda x: lambda x: x, range(4)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C417 -35 | -36 | # Ok because of the default parameters, and variadic arguments. +36 | +37 | # Ok because of the default parameters, and variadic arguments. | = help: Replace `map` with a generator expression ℹ Suggested fix -31 31 | map(lambda x: lambda: x, range(4)) -32 32 | -33 33 | # Error: the `x` is overridden by the inner lambda. -34 |-map(lambda x: lambda x: x, range(4)) - 34 |+(lambda x: x for x in range(4)) -35 35 | -36 36 | # Ok because of the default parameters, and variadic arguments. -37 37 | map(lambda x=1: x, nums) +32 32 | map(lambda x: lambda: x, range(4)) +33 33 | +34 34 | # Error: the `x` is overridden by the inner lambda. +35 |-map(lambda x: lambda x: x, range(4)) + 35 |+(lambda x: x for x in range(4)) +36 36 | +37 37 | # Ok because of the default parameters, and variadic arguments. +38 38 | map(lambda x=1: x, nums) From 3c7486817bf6fe239c8527baeb222e6557e52f5c Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 3 Sep 2023 16:53:28 +0100 Subject: [PATCH 038/164] Use symbol import for NPY003 replacement (#7083) --- .../resources/test/fixtures/numpy/NPY003.py | 27 +- .../rules/numpy/rules/deprecated_function.rs | 28 +- ...__numpy-deprecated-function_NPY003.py.snap | 296 ++++++++++-------- 3 files changed, 186 insertions(+), 165 deletions(-) diff --git a/crates/ruff/resources/test/fixtures/numpy/NPY003.py b/crates/ruff/resources/test/fixtures/numpy/NPY003.py index 6d6f369771..c37995900a 100644 --- a/crates/ruff/resources/test/fixtures/numpy/NPY003.py +++ b/crates/ruff/resources/test/fixtures/numpy/NPY003.py @@ -1,15 +1,18 @@ -import numpy as np +def func(): + import numpy as np -np.round_(np.random.rand(5, 5), 2) -np.product(np.random.rand(5, 5)) -np.cumproduct(np.random.rand(5, 5)) -np.sometrue(np.random.rand(5, 5)) -np.alltrue(np.random.rand(5, 5)) + np.round_(np.random.rand(5, 5), 2) + np.product(np.random.rand(5, 5)) + np.cumproduct(np.random.rand(5, 5)) + np.sometrue(np.random.rand(5, 5)) + np.alltrue(np.random.rand(5, 5)) -from numpy import round_, product, cumproduct, sometrue, alltrue -round_(np.random.rand(5, 5), 2) -product(np.random.rand(5, 5)) -cumproduct(np.random.rand(5, 5)) -sometrue(np.random.rand(5, 5)) -alltrue(np.random.rand(5, 5)) +def func(): + from numpy import round_, product, cumproduct, sometrue, alltrue + + round_(np.random.rand(5, 5), 2) + product(np.random.rand(5, 5)) + cumproduct(np.random.rand(5, 5)) + sometrue(np.random.rand(5, 5)) + alltrue(np.random.rand(5, 5)) diff --git a/crates/ruff/src/rules/numpy/rules/deprecated_function.rs b/crates/ruff/src/rules/numpy/rules/deprecated_function.rs index 6c422c0cc0..b88581fe91 100644 --- a/crates/ruff/src/rules/numpy/rules/deprecated_function.rs +++ b/crates/ruff/src/rules/numpy/rules/deprecated_function.rs @@ -1,10 +1,10 @@ -use ruff_python_ast::{self as ast, Expr}; - use ruff_diagnostics::{AutofixKind, Diagnostic, Edit, Fix, Violation}; use ruff_macros::{derive_message_formats, violation}; +use ruff_python_ast::Expr; use ruff_text_size::Ranged; use crate::checkers::ast::Checker; +use crate::importer::ImportRequest; use crate::registry::AsRule; /// ## What it does @@ -77,21 +77,15 @@ pub(crate) fn deprecated_function(checker: &mut Checker, expr: &Expr) { expr.range(), ); if checker.patch(diagnostic.kind.rule()) { - match expr { - Expr::Name(_) => { - diagnostic.set_fix(Fix::suggested(Edit::range_replacement( - replacement.to_string(), - expr.range(), - ))); - } - Expr::Attribute(ast::ExprAttribute { attr, .. }) => { - diagnostic.set_fix(Fix::suggested(Edit::range_replacement( - replacement.to_string(), - attr.range(), - ))); - } - _ => {} - } + diagnostic.try_set_fix(|| { + let (import_edit, binding) = checker.importer().get_or_import_symbol( + &ImportRequest::import_from("numpy", replacement), + expr.start(), + checker.semantic(), + )?; + let replacement_edit = Edit::range_replacement(binding, expr.range()); + Ok(Fix::suggested_edits(import_edit, [replacement_edit])) + }); } checker.diagnostics.push(diagnostic); } diff --git a/crates/ruff/src/rules/numpy/snapshots/ruff__rules__numpy__tests__numpy-deprecated-function_NPY003.py.snap b/crates/ruff/src/rules/numpy/snapshots/ruff__rules__numpy__tests__numpy-deprecated-function_NPY003.py.snap index 1165e5f488..a1593e920e 100644 --- a/crates/ruff/src/rules/numpy/snapshots/ruff__rules__numpy__tests__numpy-deprecated-function_NPY003.py.snap +++ b/crates/ruff/src/rules/numpy/snapshots/ruff__rules__numpy__tests__numpy-deprecated-function_NPY003.py.snap @@ -1,201 +1,225 @@ --- source: crates/ruff/src/rules/numpy/mod.rs --- -NPY003.py:3:1: NPY003 [*] `np.round_` is deprecated; use `np.round` instead +NPY003.py:4:5: NPY003 [*] `np.round_` is deprecated; use `np.round` instead | -1 | import numpy as np -2 | -3 | np.round_(np.random.rand(5, 5), 2) - | ^^^^^^^^^ NPY003 -4 | np.product(np.random.rand(5, 5)) -5 | np.cumproduct(np.random.rand(5, 5)) +2 | import numpy as np +3 | +4 | np.round_(np.random.rand(5, 5), 2) + | ^^^^^^^^^ NPY003 +5 | np.product(np.random.rand(5, 5)) +6 | np.cumproduct(np.random.rand(5, 5)) | = help: Replace with `np.round` ℹ Suggested fix -1 1 | import numpy as np -2 2 | -3 |-np.round_(np.random.rand(5, 5), 2) - 3 |+np.round(np.random.rand(5, 5), 2) -4 4 | np.product(np.random.rand(5, 5)) -5 5 | np.cumproduct(np.random.rand(5, 5)) -6 6 | np.sometrue(np.random.rand(5, 5)) +1 1 | def func(): +2 2 | import numpy as np +3 3 | +4 |- np.round_(np.random.rand(5, 5), 2) + 4 |+ np.round(np.random.rand(5, 5), 2) +5 5 | np.product(np.random.rand(5, 5)) +6 6 | np.cumproduct(np.random.rand(5, 5)) +7 7 | np.sometrue(np.random.rand(5, 5)) -NPY003.py:4:1: NPY003 [*] `np.product` is deprecated; use `np.prod` instead +NPY003.py:5:5: NPY003 [*] `np.product` is deprecated; use `np.prod` instead | -3 | np.round_(np.random.rand(5, 5), 2) -4 | np.product(np.random.rand(5, 5)) - | ^^^^^^^^^^ NPY003 -5 | np.cumproduct(np.random.rand(5, 5)) -6 | np.sometrue(np.random.rand(5, 5)) +4 | np.round_(np.random.rand(5, 5), 2) +5 | np.product(np.random.rand(5, 5)) + | ^^^^^^^^^^ NPY003 +6 | np.cumproduct(np.random.rand(5, 5)) +7 | np.sometrue(np.random.rand(5, 5)) | = help: Replace with `np.prod` ℹ Suggested fix -1 1 | import numpy as np -2 2 | -3 3 | np.round_(np.random.rand(5, 5), 2) -4 |-np.product(np.random.rand(5, 5)) - 4 |+np.prod(np.random.rand(5, 5)) -5 5 | np.cumproduct(np.random.rand(5, 5)) -6 6 | np.sometrue(np.random.rand(5, 5)) -7 7 | np.alltrue(np.random.rand(5, 5)) +2 2 | import numpy as np +3 3 | +4 4 | np.round_(np.random.rand(5, 5), 2) +5 |- np.product(np.random.rand(5, 5)) + 5 |+ np.prod(np.random.rand(5, 5)) +6 6 | np.cumproduct(np.random.rand(5, 5)) +7 7 | np.sometrue(np.random.rand(5, 5)) +8 8 | np.alltrue(np.random.rand(5, 5)) -NPY003.py:5:1: NPY003 [*] `np.cumproduct` is deprecated; use `np.cumprod` instead +NPY003.py:6:5: NPY003 [*] `np.cumproduct` is deprecated; use `np.cumprod` instead | -3 | np.round_(np.random.rand(5, 5), 2) -4 | np.product(np.random.rand(5, 5)) -5 | np.cumproduct(np.random.rand(5, 5)) - | ^^^^^^^^^^^^^ NPY003 -6 | np.sometrue(np.random.rand(5, 5)) -7 | np.alltrue(np.random.rand(5, 5)) +4 | np.round_(np.random.rand(5, 5), 2) +5 | np.product(np.random.rand(5, 5)) +6 | np.cumproduct(np.random.rand(5, 5)) + | ^^^^^^^^^^^^^ NPY003 +7 | np.sometrue(np.random.rand(5, 5)) +8 | np.alltrue(np.random.rand(5, 5)) | = help: Replace with `np.cumprod` ℹ Suggested fix -2 2 | -3 3 | np.round_(np.random.rand(5, 5), 2) -4 4 | np.product(np.random.rand(5, 5)) -5 |-np.cumproduct(np.random.rand(5, 5)) - 5 |+np.cumprod(np.random.rand(5, 5)) -6 6 | np.sometrue(np.random.rand(5, 5)) -7 7 | np.alltrue(np.random.rand(5, 5)) -8 8 | +3 3 | +4 4 | np.round_(np.random.rand(5, 5), 2) +5 5 | np.product(np.random.rand(5, 5)) +6 |- np.cumproduct(np.random.rand(5, 5)) + 6 |+ np.cumprod(np.random.rand(5, 5)) +7 7 | np.sometrue(np.random.rand(5, 5)) +8 8 | np.alltrue(np.random.rand(5, 5)) +9 9 | -NPY003.py:6:1: NPY003 [*] `np.sometrue` is deprecated; use `np.any` instead +NPY003.py:7:5: NPY003 [*] `np.sometrue` is deprecated; use `np.any` instead | -4 | np.product(np.random.rand(5, 5)) -5 | np.cumproduct(np.random.rand(5, 5)) -6 | np.sometrue(np.random.rand(5, 5)) - | ^^^^^^^^^^^ NPY003 -7 | np.alltrue(np.random.rand(5, 5)) +5 | np.product(np.random.rand(5, 5)) +6 | np.cumproduct(np.random.rand(5, 5)) +7 | np.sometrue(np.random.rand(5, 5)) + | ^^^^^^^^^^^ NPY003 +8 | np.alltrue(np.random.rand(5, 5)) | = help: Replace with `np.any` ℹ Suggested fix -3 3 | np.round_(np.random.rand(5, 5), 2) -4 4 | np.product(np.random.rand(5, 5)) -5 5 | np.cumproduct(np.random.rand(5, 5)) -6 |-np.sometrue(np.random.rand(5, 5)) - 6 |+np.any(np.random.rand(5, 5)) -7 7 | np.alltrue(np.random.rand(5, 5)) -8 8 | -9 9 | from numpy import round_, product, cumproduct, sometrue, alltrue +4 4 | np.round_(np.random.rand(5, 5), 2) +5 5 | np.product(np.random.rand(5, 5)) +6 6 | np.cumproduct(np.random.rand(5, 5)) +7 |- np.sometrue(np.random.rand(5, 5)) + 7 |+ np.any(np.random.rand(5, 5)) +8 8 | np.alltrue(np.random.rand(5, 5)) +9 9 | +10 10 | -NPY003.py:7:1: NPY003 [*] `np.alltrue` is deprecated; use `np.all` instead +NPY003.py:8:5: NPY003 [*] `np.alltrue` is deprecated; use `np.all` instead | -5 | np.cumproduct(np.random.rand(5, 5)) -6 | np.sometrue(np.random.rand(5, 5)) -7 | np.alltrue(np.random.rand(5, 5)) - | ^^^^^^^^^^ NPY003 -8 | -9 | from numpy import round_, product, cumproduct, sometrue, alltrue +6 | np.cumproduct(np.random.rand(5, 5)) +7 | np.sometrue(np.random.rand(5, 5)) +8 | np.alltrue(np.random.rand(5, 5)) + | ^^^^^^^^^^ NPY003 | = help: Replace with `np.all` ℹ Suggested fix -4 4 | np.product(np.random.rand(5, 5)) -5 5 | np.cumproduct(np.random.rand(5, 5)) -6 6 | np.sometrue(np.random.rand(5, 5)) -7 |-np.alltrue(np.random.rand(5, 5)) - 7 |+np.all(np.random.rand(5, 5)) -8 8 | -9 9 | from numpy import round_, product, cumproduct, sometrue, alltrue +5 5 | np.product(np.random.rand(5, 5)) +6 6 | np.cumproduct(np.random.rand(5, 5)) +7 7 | np.sometrue(np.random.rand(5, 5)) +8 |- np.alltrue(np.random.rand(5, 5)) + 8 |+ np.all(np.random.rand(5, 5)) +9 9 | 10 10 | +11 11 | def func(): -NPY003.py:11:1: NPY003 [*] `np.round_` is deprecated; use `np.round` instead +NPY003.py:14:5: NPY003 [*] `np.round_` is deprecated; use `np.round` instead | - 9 | from numpy import round_, product, cumproduct, sometrue, alltrue -10 | -11 | round_(np.random.rand(5, 5), 2) - | ^^^^^^ NPY003 -12 | product(np.random.rand(5, 5)) -13 | cumproduct(np.random.rand(5, 5)) +12 | from numpy import round_, product, cumproduct, sometrue, alltrue +13 | +14 | round_(np.random.rand(5, 5), 2) + | ^^^^^^ NPY003 +15 | product(np.random.rand(5, 5)) +16 | cumproduct(np.random.rand(5, 5)) | = help: Replace with `np.round` ℹ Suggested fix -8 8 | -9 9 | from numpy import round_, product, cumproduct, sometrue, alltrue -10 10 | -11 |-round_(np.random.rand(5, 5), 2) - 11 |+round(np.random.rand(5, 5), 2) -12 12 | product(np.random.rand(5, 5)) -13 13 | cumproduct(np.random.rand(5, 5)) -14 14 | sometrue(np.random.rand(5, 5)) + 1 |+from numpy import round +1 2 | def func(): +2 3 | import numpy as np +3 4 | +-------------------------------------------------------------------------------- +11 12 | def func(): +12 13 | from numpy import round_, product, cumproduct, sometrue, alltrue +13 14 | +14 |- round_(np.random.rand(5, 5), 2) + 15 |+ round(np.random.rand(5, 5), 2) +15 16 | product(np.random.rand(5, 5)) +16 17 | cumproduct(np.random.rand(5, 5)) +17 18 | sometrue(np.random.rand(5, 5)) -NPY003.py:12:1: NPY003 [*] `np.product` is deprecated; use `np.prod` instead +NPY003.py:15:5: NPY003 [*] `np.product` is deprecated; use `np.prod` instead | -11 | round_(np.random.rand(5, 5), 2) -12 | product(np.random.rand(5, 5)) - | ^^^^^^^ NPY003 -13 | cumproduct(np.random.rand(5, 5)) -14 | sometrue(np.random.rand(5, 5)) +14 | round_(np.random.rand(5, 5), 2) +15 | product(np.random.rand(5, 5)) + | ^^^^^^^ NPY003 +16 | cumproduct(np.random.rand(5, 5)) +17 | sometrue(np.random.rand(5, 5)) | = help: Replace with `np.prod` ℹ Suggested fix -9 9 | from numpy import round_, product, cumproduct, sometrue, alltrue -10 10 | -11 11 | round_(np.random.rand(5, 5), 2) -12 |-product(np.random.rand(5, 5)) - 12 |+prod(np.random.rand(5, 5)) -13 13 | cumproduct(np.random.rand(5, 5)) -14 14 | sometrue(np.random.rand(5, 5)) -15 15 | alltrue(np.random.rand(5, 5)) + 1 |+from numpy import prod +1 2 | def func(): +2 3 | import numpy as np +3 4 | +-------------------------------------------------------------------------------- +12 13 | from numpy import round_, product, cumproduct, sometrue, alltrue +13 14 | +14 15 | round_(np.random.rand(5, 5), 2) +15 |- product(np.random.rand(5, 5)) + 16 |+ prod(np.random.rand(5, 5)) +16 17 | cumproduct(np.random.rand(5, 5)) +17 18 | sometrue(np.random.rand(5, 5)) +18 19 | alltrue(np.random.rand(5, 5)) -NPY003.py:13:1: NPY003 [*] `np.cumproduct` is deprecated; use `np.cumprod` instead +NPY003.py:16:5: NPY003 [*] `np.cumproduct` is deprecated; use `np.cumprod` instead | -11 | round_(np.random.rand(5, 5), 2) -12 | product(np.random.rand(5, 5)) -13 | cumproduct(np.random.rand(5, 5)) - | ^^^^^^^^^^ NPY003 -14 | sometrue(np.random.rand(5, 5)) -15 | alltrue(np.random.rand(5, 5)) +14 | round_(np.random.rand(5, 5), 2) +15 | product(np.random.rand(5, 5)) +16 | cumproduct(np.random.rand(5, 5)) + | ^^^^^^^^^^ NPY003 +17 | sometrue(np.random.rand(5, 5)) +18 | alltrue(np.random.rand(5, 5)) | = help: Replace with `np.cumprod` ℹ Suggested fix -10 10 | -11 11 | round_(np.random.rand(5, 5), 2) -12 12 | product(np.random.rand(5, 5)) -13 |-cumproduct(np.random.rand(5, 5)) - 13 |+cumprod(np.random.rand(5, 5)) -14 14 | sometrue(np.random.rand(5, 5)) -15 15 | alltrue(np.random.rand(5, 5)) + 1 |+from numpy import cumprod +1 2 | def func(): +2 3 | import numpy as np +3 4 | +-------------------------------------------------------------------------------- +13 14 | +14 15 | round_(np.random.rand(5, 5), 2) +15 16 | product(np.random.rand(5, 5)) +16 |- cumproduct(np.random.rand(5, 5)) + 17 |+ cumprod(np.random.rand(5, 5)) +17 18 | sometrue(np.random.rand(5, 5)) +18 19 | alltrue(np.random.rand(5, 5)) -NPY003.py:14:1: NPY003 [*] `np.sometrue` is deprecated; use `np.any` instead +NPY003.py:17:5: NPY003 [*] `np.sometrue` is deprecated; use `np.any` instead | -12 | product(np.random.rand(5, 5)) -13 | cumproduct(np.random.rand(5, 5)) -14 | sometrue(np.random.rand(5, 5)) - | ^^^^^^^^ NPY003 -15 | alltrue(np.random.rand(5, 5)) +15 | product(np.random.rand(5, 5)) +16 | cumproduct(np.random.rand(5, 5)) +17 | sometrue(np.random.rand(5, 5)) + | ^^^^^^^^ NPY003 +18 | alltrue(np.random.rand(5, 5)) | = help: Replace with `np.any` ℹ Suggested fix -11 11 | round_(np.random.rand(5, 5), 2) -12 12 | product(np.random.rand(5, 5)) -13 13 | cumproduct(np.random.rand(5, 5)) -14 |-sometrue(np.random.rand(5, 5)) - 14 |+any(np.random.rand(5, 5)) -15 15 | alltrue(np.random.rand(5, 5)) + 1 |+from numpy import any +1 2 | def func(): +2 3 | import numpy as np +3 4 | +-------------------------------------------------------------------------------- +14 15 | round_(np.random.rand(5, 5), 2) +15 16 | product(np.random.rand(5, 5)) +16 17 | cumproduct(np.random.rand(5, 5)) +17 |- sometrue(np.random.rand(5, 5)) + 18 |+ any(np.random.rand(5, 5)) +18 19 | alltrue(np.random.rand(5, 5)) -NPY003.py:15:1: NPY003 [*] `np.alltrue` is deprecated; use `np.all` instead +NPY003.py:18:5: NPY003 [*] `np.alltrue` is deprecated; use `np.all` instead | -13 | cumproduct(np.random.rand(5, 5)) -14 | sometrue(np.random.rand(5, 5)) -15 | alltrue(np.random.rand(5, 5)) - | ^^^^^^^ NPY003 +16 | cumproduct(np.random.rand(5, 5)) +17 | sometrue(np.random.rand(5, 5)) +18 | alltrue(np.random.rand(5, 5)) + | ^^^^^^^ NPY003 | = help: Replace with `np.all` ℹ Suggested fix -12 12 | product(np.random.rand(5, 5)) -13 13 | cumproduct(np.random.rand(5, 5)) -14 14 | sometrue(np.random.rand(5, 5)) -15 |-alltrue(np.random.rand(5, 5)) - 15 |+all(np.random.rand(5, 5)) + 1 |+from numpy import all +1 2 | def func(): +2 3 | import numpy as np +3 4 | +-------------------------------------------------------------------------------- +15 16 | product(np.random.rand(5, 5)) +16 17 | cumproduct(np.random.rand(5, 5)) +17 18 | sometrue(np.random.rand(5, 5)) +18 |- alltrue(np.random.rand(5, 5)) + 19 |+ all(np.random.rand(5, 5)) From dbb34804a44f19a434a9932c25dcfe45bb7208b6 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 3 Sep 2023 17:23:42 +0100 Subject: [PATCH 039/164] Change `Option` to `Result