ruff/crates/ruff_python_parser/tests/snapshots
Dhruv Manilawala a4688aebe9
Use TokenSource to find new location for re-lexing (#12060)
## Summary

This PR splits the re-lexing logic into two parts:
1. `TokenSource`: The token source will be responsible to find the
position the lexer needs to be moved to
2. `Lexer`: The lexer will be responsible to reduce the nesting level
and move itself to the new position if recovered from a parenthesized
context

This split makes it easy to find the new lexer position without needing
to implement the backwards lexing logic again which would need to handle
cases involving:
* Different kinds of newlines
* Line continuation character(s)
* Comments
* Whitespaces

### F-strings

This change did reveal one thing about re-lexing f-strings. Consider the
following example:
```py
f'{'
#  ^
f'foo'
```

Here, the quote as highlighted by the caret (`^`) is the start of a
string inside an f-string expression. This is unterminated string which
means the token emitted is actually `Unknown`. The parser tries to
recover from it but there's no newline token in the vector so the new
logic doesn't recover from it. The previous logic does recover because
it's looking at the raw characters instead.

The parser would be at `FStringStart` (the one for the second line) when
it calls into the re-lexing logic to recover from an unterminated
f-string on the first line. So, moving backwards the first character
encountered is a newline character but the first token encountered is an
`Unknown` token.

This is improved with #12067 

fixes: #12046 
fixes: #12036

## Test Plan

Update the snapshot and validate the changes.
2024-06-27 17:12:39 +05:30
..
invalid_syntax@ann_assign_stmt_invalid_annotation.py.snap
invalid_syntax@ann_assign_stmt_invalid_target.py.snap
invalid_syntax@ann_assign_stmt_invalid_value.py.snap
invalid_syntax@ann_assign_stmt_missing_rhs.py.snap
invalid_syntax@ann_assign_stmt_type_alias_annotation.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
invalid_syntax@assert_empty_msg.py.snap
invalid_syntax@assert_empty_test.py.snap
invalid_syntax@assert_invalid_msg_expr.py.snap
invalid_syntax@assert_invalid_test_expr.py.snap
invalid_syntax@assign_stmt_invalid_target.py.snap
invalid_syntax@assign_stmt_invalid_value_expr.py.snap
invalid_syntax@assign_stmt_keyword_target.py.snap
invalid_syntax@assign_stmt_missing_rhs.py.snap
invalid_syntax@async_unexpected_token.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
invalid_syntax@aug_assign_stmt_invalid_target.py.snap
invalid_syntax@aug_assign_stmt_invalid_value.py.snap
invalid_syntax@aug_assign_stmt_missing_rhs.py.snap
invalid_syntax@case_expect_indented_block.py.snap Expect indented case block instead of match stmt (#11033) 2024-04-19 16:46:15 +05:30
invalid_syntax@class_def_empty_body.py.snap
invalid_syntax@class_def_missing_name.py.snap
invalid_syntax@class_def_unclosed_type_param_list.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@clause_expect_indented_block.py.snap
invalid_syntax@clause_expect_single_statement.py.snap
invalid_syntax@comma_separated_missing_comma.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@comma_separated_missing_comma_between_elements.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@comma_separated_missing_element_between_commas.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@comma_separated_missing_first_element.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@comprehension_missing_for_after_async.py.snap Include soft keywords for is_keyword check (#11445) 2024-05-17 10:26:48 +05:30
invalid_syntax@decorator_invalid_expression.py.snap
invalid_syntax@decorator_missing_expression.py.snap
invalid_syntax@decorator_missing_newline.py.snap
invalid_syntax@decorator_unexpected_token.py.snap
invalid_syntax@del_incomplete_target.py.snap
invalid_syntax@del_stmt_empty.py.snap
invalid_syntax@dotted_name_multiple_dots.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@except_stmt_invalid_expression.py.snap
invalid_syntax@except_stmt_missing_as_name.py.snap
invalid_syntax@except_stmt_missing_exception.py.snap
invalid_syntax@except_stmt_missing_exception_and_as_name.py.snap
invalid_syntax@except_stmt_unparenthesized_tuple.py.snap
invalid_syntax@expressions__arguments__double_starred.py.snap
invalid_syntax@expressions__arguments__duplicate_keyword_arguments.py.snap
invalid_syntax@expressions__arguments__invalid_expression.py.snap
invalid_syntax@expressions__arguments__invalid_keyword_expression.py.snap
invalid_syntax@expressions__arguments__invalid_order.py.snap
invalid_syntax@expressions__arguments__missing_argument.py.snap
invalid_syntax@expressions__arguments__missing_comma.py.snap
invalid_syntax@expressions__arguments__missing_expression.py.snap
invalid_syntax@expressions__arguments__starred.py.snap
invalid_syntax@expressions__arguments__unclosed_0.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@expressions__arguments__unclosed_1.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@expressions__arguments__unclosed_2.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@expressions__attribute__invalid_member.py.snap
invalid_syntax@expressions__attribute__multiple_dots.py.snap
invalid_syntax@expressions__attribute__no_member.py.snap
invalid_syntax@expressions__await__no_expression_0.py.snap
invalid_syntax@expressions__await__no_expression_1.py.snap
invalid_syntax@expressions__await__recover.py.snap
invalid_syntax@expressions__bin_op__invalid_rhs_expression.py.snap
invalid_syntax@expressions__bin_op__missing_lhs.py.snap
invalid_syntax@expressions__bin_op__missing_rhs_0.py.snap
invalid_syntax@expressions__bin_op__missing_rhs_1.py.snap
invalid_syntax@expressions__bin_op__multiple_ops.py.snap
invalid_syntax@expressions__bin_op__named_expression.py.snap
invalid_syntax@expressions__bin_op__starred_expression.py.snap
invalid_syntax@expressions__bool_op__invalid_rhs_expression.py.snap
invalid_syntax@expressions__bool_op__missing_lhs.py.snap
invalid_syntax@expressions__bool_op__missing_rhs.py.snap
invalid_syntax@expressions__bool_op__named_expression.py.snap
invalid_syntax@expressions__bool_op__starred_expression.py.snap
invalid_syntax@expressions__compare__invalid_order.py.snap
invalid_syntax@expressions__compare__invalid_rhs_expression.py.snap
invalid_syntax@expressions__compare__missing_lhs.py.snap
invalid_syntax@expressions__compare__missing_rhs_0.py.snap
invalid_syntax@expressions__compare__missing_rhs_1.py.snap
invalid_syntax@expressions__compare__missing_rhs_2.py.snap
invalid_syntax@expressions__compare__multiple_equals.py.snap
invalid_syntax@expressions__compare__named_expression.py.snap
invalid_syntax@expressions__compare__starred_expression.py.snap
invalid_syntax@expressions__dict__comprehension.py.snap
invalid_syntax@expressions__dict__double_star.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@expressions__dict__double_star_comprehension.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@expressions__dict__missing_closing_brace_0.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@expressions__dict__missing_closing_brace_1.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@expressions__dict__missing_closing_brace_2.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@expressions__dict__named_expression_0.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@expressions__dict__named_expression_1.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@expressions__dict__recover.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@expressions__emoji_identifiers.py.snap
invalid_syntax@expressions__emoji_statement.py.snap
invalid_syntax@expressions__if__missing_orelse_expr_0.py.snap
invalid_syntax@expressions__if__missing_orelse_expr_1.py.snap
invalid_syntax@expressions__if__missing_test_expr_0.py.snap
invalid_syntax@expressions__if__missing_test_expr_1.py.snap
invalid_syntax@expressions__if__recover.py.snap
invalid_syntax@expressions__lambda_default_parameters.py.snap
invalid_syntax@expressions__lambda_duplicate_parameters.py.snap
invalid_syntax@expressions__list__comprehension.py.snap
invalid_syntax@expressions__list__missing_closing_bracket_0.py.snap
invalid_syntax@expressions__list__missing_closing_bracket_1.py.snap
invalid_syntax@expressions__list__missing_closing_bracket_2.py.snap
invalid_syntax@expressions__list__missing_closing_bracket_3.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@expressions__list__recover.py.snap
invalid_syntax@expressions__list__star_expression_precedence.py.snap Add ExpressionContext for expression parsing (#11055) 2024-04-23 04:19:05 +00:00
invalid_syntax@expressions__named__invalid_target.py.snap Add ExpressionContext for expression parsing (#11055) 2024-04-23 04:19:05 +00:00
invalid_syntax@expressions__named__missing_expression_0.py.snap
invalid_syntax@expressions__named__missing_expression_1.py.snap
invalid_syntax@expressions__named__missing_expression_2.py.snap
invalid_syntax@expressions__named__missing_expression_3.py.snap
invalid_syntax@expressions__named__missing_expression_4.py.snap
invalid_syntax@expressions__parenthesized__generator.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@expressions__parenthesized__missing_closing_paren_0.py.snap
invalid_syntax@expressions__parenthesized__missing_closing_paren_1.py.snap
invalid_syntax@expressions__parenthesized__missing_closing_paren_2.py.snap
invalid_syntax@expressions__parenthesized__missing_closing_paren_3.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@expressions__parenthesized__parenthesized.py.snap
invalid_syntax@expressions__parenthesized__tuple.py.snap
invalid_syntax@expressions__parenthesized__tuple_starred_expr.py.snap Add ExpressionContext for expression parsing (#11055) 2024-04-23 04:19:05 +00:00
invalid_syntax@expressions__set__comprehension.py.snap
invalid_syntax@expressions__set__missing_closing_curly_brace_0.py.snap
invalid_syntax@expressions__set__missing_closing_curly_brace_1.py.snap
invalid_syntax@expressions__set__missing_closing_curly_brace_2.py.snap
invalid_syntax@expressions__set__missing_closing_curly_brace_3.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@expressions__set__recover.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@expressions__set__star_expression_precedence.py.snap Add ExpressionContext for expression parsing (#11055) 2024-04-23 04:19:05 +00:00
invalid_syntax@expressions__subscript__invalid_slice_element.py.snap
invalid_syntax@expressions__subscript__unclosed_slice_0.py.snap
invalid_syntax@expressions__subscript__unclosed_slice_1.py.snap
invalid_syntax@expressions__unary.py.snap
invalid_syntax@expressions__unary__named_expression.py.snap
invalid_syntax@expressions__unary__no_expression_0.py.snap
invalid_syntax@expressions__unary__no_expression_1.py.snap
invalid_syntax@expressions__yield__named_expression.py.snap
invalid_syntax@expressions__yield__star_expression.py.snap
invalid_syntax@expressions__yield_from__starred_expression.py.snap
invalid_syntax@expressions__yield_from__unparenthesized.py.snap
invalid_syntax@f_string_empty_expression.py.snap
invalid_syntax@f_string_invalid_conversion_flag_name_tok.py.snap
invalid_syntax@f_string_invalid_conversion_flag_other_tok.py.snap
invalid_syntax@f_string_invalid_starred_expr.py.snap
invalid_syntax@f_string_lambda_without_parentheses.py.snap Separate terminator token for f-string elements kind (#11842) 2024-06-12 13:57:35 +05:30
invalid_syntax@f_string_unclosed_lbrace.py.snap Do not include newline for unterminated string range (#12017) 2024-06-25 08:10:07 +00:00
invalid_syntax@f_string_unclosed_lbrace_in_format_spec.py.snap Use re-lexing for normal list parsing (#11871) 2024-06-18 12:14:41 +05:30
invalid_syntax@for_stmt_invalid_iter_expr.py.snap
invalid_syntax@for_stmt_invalid_target.py.snap Add ExpressionContext for expression parsing (#11055) 2024-04-23 04:19:05 +00:00
invalid_syntax@for_stmt_invalid_target_binary_expr.py.snap Add ExpressionContext for expression parsing (#11055) 2024-04-23 04:19:05 +00:00
invalid_syntax@for_stmt_invalid_target_in_keyword.py.snap Add ExpressionContext for expression parsing (#11055) 2024-04-23 04:19:05 +00:00
invalid_syntax@for_stmt_missing_in_keyword.py.snap
invalid_syntax@for_stmt_missing_iter.py.snap
invalid_syntax@for_stmt_missing_target.py.snap
invalid_syntax@from_import_dotted_names.py.snap Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00
invalid_syntax@from_import_empty_names.py.snap Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00
invalid_syntax@from_import_missing_module.py.snap Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00
invalid_syntax@from_import_missing_rpar.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@from_import_star_with_other_names.py.snap Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00
invalid_syntax@from_import_unparenthesized_trailing_comma.py.snap Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00
invalid_syntax@function_def_empty_body.py.snap
invalid_syntax@function_def_invalid_return_expr.py.snap
invalid_syntax@function_def_missing_identifier.py.snap
invalid_syntax@function_def_missing_return_type.py.snap
invalid_syntax@function_def_unclosed_parameter_list.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@function_def_unclosed_type_param_list.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@function_def_unparenthesized_return_types.py.snap
invalid_syntax@global_stmt_empty.py.snap
invalid_syntax@global_stmt_expression.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@global_stmt_trailing_comma.py.snap
invalid_syntax@if_stmt_elif_missing_colon.py.snap
invalid_syntax@if_stmt_empty_body.py.snap
invalid_syntax@if_stmt_invalid_elif_test_expr.py.snap
invalid_syntax@if_stmt_invalid_test_expr.py.snap
invalid_syntax@if_stmt_missing_colon.py.snap
invalid_syntax@if_stmt_missing_test.py.snap
invalid_syntax@if_stmt_misspelled_elif.py.snap
invalid_syntax@implicitly_concatenated_unterminated_string.py.snap Avoid consuming newline for unterminated string (#12067) 2024-06-27 17:02:48 +05:30
invalid_syntax@implicitly_concatenated_unterminated_string_multiline.py.snap Do not include newline for unterminated string range (#12017) 2024-06-25 08:10:07 +00:00
invalid_syntax@import_alias_missing_asname.py.snap
invalid_syntax@import_stmt_empty.py.snap
invalid_syntax@import_stmt_parenthesized_names.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@import_stmt_star_import.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@import_stmt_trailing_comma.py.snap
invalid_syntax@invalid_byte_literal.py.snap
invalid_syntax@invalid_del_target.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@invalid_fstring_literal_element.py.snap
invalid_syntax@invalid_string_literal.py.snap
invalid_syntax@lambda_body_with_starred_expr.py.snap
invalid_syntax@lambda_body_with_yield_expr.py.snap
invalid_syntax@match_classify_as_keyword.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
invalid_syntax@match_classify_as_keyword_or_identifier.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
invalid_syntax@match_expected_colon.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
invalid_syntax@match_stmt_expect_indented_block.py.snap
invalid_syntax@match_stmt_expected_case_block.py.snap
invalid_syntax@match_stmt_invalid_guard_expr.py.snap
invalid_syntax@match_stmt_invalid_subject_expr.py.snap
invalid_syntax@match_stmt_missing_guard_expr.py.snap
invalid_syntax@match_stmt_missing_pattern.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
invalid_syntax@match_stmt_no_newline_before_case.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
invalid_syntax@match_stmt_single_starred_subject.py.snap
invalid_syntax@mixed_bytes_and_non_bytes_literals.py.snap
invalid_syntax@multiple_clauses_on_same_line.py.snap
invalid_syntax@node_range_with_gaps.py.snap Use empty range when there's "gap" in token source (#11032) 2024-04-19 11:36:26 +00:00
invalid_syntax@nonlocal_stmt_empty.py.snap
invalid_syntax@nonlocal_stmt_expression.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@nonlocal_stmt_trailing_comma.py.snap
invalid_syntax@param_missing_annotation.py.snap
invalid_syntax@param_missing_default.py.snap
invalid_syntax@param_with_invalid_annotation.py.snap
invalid_syntax@param_with_invalid_default.py.snap
invalid_syntax@param_with_invalid_star_annotation.py.snap
invalid_syntax@params_duplicate_names.py.snap Add convenience methods for iterating over all parameter nodes in a function (#11174) 2024-04-29 10:36:15 +00:00
invalid_syntax@params_expected_after_star_separator.py.snap
invalid_syntax@params_kwarg_after_star_separator.py.snap
invalid_syntax@params_multiple_kwargs.py.snap
invalid_syntax@params_multiple_slash_separator.py.snap
invalid_syntax@params_multiple_star_separator.py.snap
invalid_syntax@params_multiple_varargs.py.snap
invalid_syntax@params_no_arg_before_slash.py.snap
invalid_syntax@params_non_default_after_default.py.snap
invalid_syntax@params_star_after_slash.py.snap
invalid_syntax@params_star_separator_after_star_param.py.snap
invalid_syntax@params_var_keyword_with_default.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@params_var_positional_with_default.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@raise_stmt_invalid_cause.py.snap
invalid_syntax@raise_stmt_invalid_exc.py.snap
invalid_syntax@raise_stmt_unparenthesized_tuple_cause.py.snap
invalid_syntax@raise_stmt_unparenthesized_tuple_exc.py.snap
invalid_syntax@re_lex_logical_token.py.snap Avoid moving back the lexer for triple-quoted fstring (#11939) 2024-06-20 16:27:36 +05:30
invalid_syntax@re_lex_logical_token_mac_eol.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@re_lex_logical_token_windows_eol.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@re_lexing__fstring_format_spec_1.py.snap Avoid consuming newline for unterminated string (#12067) 2024-06-27 17:02:48 +05:30
invalid_syntax@re_lexing__line_continuation_1.py.snap Use correct range to highlight line continuation error (#12016) 2024-06-25 13:35:24 +05:30
invalid_syntax@re_lexing__line_continuation_windows_eol.py.snap Use TokenSource to find new location for re-lexing (#12060) 2024-06-27 17:12:39 +05:30
invalid_syntax@re_lexing__triple_quoted_fstring_1.py.snap Avoid moving back the lexer for triple-quoted fstring (#11939) 2024-06-20 16:27:36 +05:30
invalid_syntax@re_lexing__triple_quoted_fstring_2.py.snap Avoid moving back the lexer for triple-quoted fstring (#11939) 2024-06-20 16:27:36 +05:30
invalid_syntax@re_lexing__triple_quoted_fstring_3.py.snap Avoid moving back the lexer for triple-quoted fstring (#11939) 2024-06-20 16:27:36 +05:30
invalid_syntax@return_stmt_invalid_expr.py.snap
invalid_syntax@simple_and_compound_stmt_on_same_line.py.snap
invalid_syntax@simple_and_compound_stmt_on_same_line_in_block.py.snap
invalid_syntax@simple_stmts_on_same_line.py.snap
invalid_syntax@simple_stmts_on_same_line_in_block.py.snap
invalid_syntax@statements__function_type_parameters.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@statements__if_extra_closing_parentheses.py.snap
invalid_syntax@statements__if_extra_indent.py.snap
invalid_syntax@statements__invalid_assignment_targets.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@statements__invalid_augmented_assignment_target.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@statements__match__as_pattern_0.py.snap
invalid_syntax@statements__match__as_pattern_1.py.snap
invalid_syntax@statements__match__as_pattern_2.py.snap
invalid_syntax@statements__match__as_pattern_3.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@statements__match__as_pattern_4.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
invalid_syntax@statements__match__invalid_class_pattern.py.snap
invalid_syntax@statements__match__invalid_lhs_or_rhs_pattern.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
invalid_syntax@statements__match__invalid_mapping_pattern.py.snap
invalid_syntax@statements__match__star_pattern_usage.py.snap
invalid_syntax@statements__match__unary_add_usage.py.snap
invalid_syntax@statements__with__ambiguous_lpar_with_items.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
invalid_syntax@statements__with__empty_with_items.py.snap
invalid_syntax@statements__with__unclosed_ambiguous_lpar.py.snap Use speculative parsing for with-items (#11770) 2024-06-06 08:59:56 +00:00
invalid_syntax@statements__with__unclosed_ambiguous_lpar_eof.py.snap Use speculative parsing for with-items (#11770) 2024-06-06 08:59:56 +00:00
invalid_syntax@statements__with__unparenthesized_with_items.py.snap
invalid_syntax@try_stmt_invalid_order.py.snap
invalid_syntax@try_stmt_missing_except_finally.py.snap
invalid_syntax@try_stmt_misspelled_except.py.snap
invalid_syntax@type_alias_incomplete_stmt.py.snap
invalid_syntax@type_alias_invalid_value_expr.py.snap
invalid_syntax@type_param_invalid_bound_expr.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_param_missing_bound.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_param_param_spec_bound.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_param_param_spec_invalid_default_expr.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_param_param_spec_missing_default.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_param_type_var_invalid_default_expr.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_param_type_var_missing_default.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_param_type_var_tuple_bound.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_param_type_var_tuple_invalid_default_expr.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_param_type_var_tuple_missing_default.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
invalid_syntax@type_params_empty.py.snap Add syntax error for empty type parameter list (#12030) 2024-06-26 08:10:35 +05:30
invalid_syntax@unterminated_fstring_newline_recovery.py.snap Use re-lexing for normal list parsing (#11871) 2024-06-18 12:14:41 +05:30
invalid_syntax@while_stmt_invalid_test_expr.py.snap
invalid_syntax@while_stmt_missing_colon.py.snap
invalid_syntax@while_stmt_missing_test.py.snap
invalid_syntax@with_items_parenthesized_missing_colon.py.snap Use speculative parsing for with-items (#11770) 2024-06-06 08:59:56 +00:00
invalid_syntax@with_items_parenthesized_missing_comma.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
valid_syntax@ambiguous_lpar_with_items_binary_expr.py.snap Consider binary expr for parenthesized with items parsing (#11012) 2024-04-18 21:39:30 +05:30
valid_syntax@ambiguous_lpar_with_items_if_expr.py.snap Consider if expression for parenthesized with items parsing (#11010) 2024-04-18 14:30:15 +00:00
valid_syntax@ann_assign_stmt_simple_target.py.snap
valid_syntax@assign_targets_terminator.py.snap
valid_syntax@async_for_statement.py.snap
valid_syntax@async_function_definition.py.snap
valid_syntax@async_with_statement.py.snap
valid_syntax@class_def_arguments.py.snap
valid_syntax@comma_separated_regular_list_terminator.py.snap Implement re-lexing logic for better error recovery (#11845) 2024-06-17 06:47:00 +00:00
valid_syntax@decorator_async_function.py.snap
valid_syntax@del_targets_terminator.py.snap
valid_syntax@dotted_name_normalized_spaces.py.snap
valid_syntax@except_stmt_as_name_soft_keyword.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@expressions__arguments.py.snap
valid_syntax@expressions__attribute.py.snap
valid_syntax@expressions__await.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
valid_syntax@expressions__bin_op.py.snap
valid_syntax@expressions__bool_op.py.snap
valid_syntax@expressions__call.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
valid_syntax@expressions__compare.py.snap
valid_syntax@expressions__dictionary.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
valid_syntax@expressions__dictionary_comprehension.py.snap
valid_syntax@expressions__f_string.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
valid_syntax@expressions__generator.py.snap
valid_syntax@expressions__if.py.snap
valid_syntax@expressions__lambda.py.snap
valid_syntax@expressions__list.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
valid_syntax@expressions__list_comprehension.py.snap
valid_syntax@expressions__name.py.snap
valid_syntax@expressions__named.py.snap
valid_syntax@expressions__number_literal.py.snap
valid_syntax@expressions__parenthesized.py.snap
valid_syntax@expressions__set.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
valid_syntax@expressions__set_comprehension.py.snap
valid_syntax@expressions__slice.py.snap
valid_syntax@expressions__starred.py.snap
valid_syntax@expressions__string.py.snap
valid_syntax@expressions__subscript.py.snap
valid_syntax@expressions__tuple.py.snap
valid_syntax@expressions__unary_op.py.snap
valid_syntax@expressions__yield.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
valid_syntax@expressions__yield_from.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
valid_syntax@for_in_target_valid_expr.py.snap Add ExpressionContext for expression parsing (#11055) 2024-04-23 04:19:05 +00:00
valid_syntax@from_import_no_space.py.snap Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00
valid_syntax@from_import_soft_keyword_module_name.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@from_import_stmt_terminator.py.snap Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00
valid_syntax@fstring_format_spec_terminator.py.snap
valid_syntax@function_def_parameter_range.py.snap
valid_syntax@function_def_parenthesized_return_types.py.snap
valid_syntax@function_def_valid_return_expr.py.snap
valid_syntax@global_stmt.py.snap
valid_syntax@import_as_name_soft_keyword.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@import_stmt_terminator.py.snap
valid_syntax@lambda_with_no_parameters.py.snap
valid_syntax@lambda_with_valid_body.py.snap
valid_syntax@match_as_pattern.py.snap
valid_syntax@match_as_pattern_soft_keyword.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@match_attr_pattern_soft_keyword.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@match_classify_as_identifier_1.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@match_classify_as_identifier_2.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@match_classify_as_keyword_1.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@match_classify_as_keyword_2.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@match_classify_as_keyword_or_identifier.py.snap Maintain synchronicity between the lexer and the parser (#11457) 2024-06-03 18:23:50 +05:30
valid_syntax@match_sequence_pattern_parentheses_terminator.py.snap
valid_syntax@match_sequence_pattern_terminator.py.snap
valid_syntax@match_stmt_subject_expr.py.snap
valid_syntax@match_stmt_valid_guard_expr.py.snap
valid_syntax@nonlocal_stmt.py.snap
valid_syntax@other__atom.py.snap
valid_syntax@other__decorator.py.snap
valid_syntax@param_with_annotation.py.snap
valid_syntax@param_with_default.py.snap
valid_syntax@param_with_star_annotation.py.snap
valid_syntax@params_non_default_after_star.py.snap
valid_syntax@params_seen_keyword_only_param_after_star.py.snap
valid_syntax@simple_stmts_in_block.py.snap
valid_syntax@simple_stmts_with_semicolons.py.snap Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00
valid_syntax@statement__ambiguous_lpar_with_items.py.snap
valid_syntax@statement__annotated_assignment.py.snap
valid_syntax@statement__assert.py.snap
valid_syntax@statement__assignment.py.snap
valid_syntax@statement__augmented_assignment.py.snap
valid_syntax@statement__class.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
valid_syntax@statement__delete.py.snap
valid_syntax@statement__for.py.snap
valid_syntax@statement__from_import.py.snap Make ImportFrom level just a u32 (#11170) 2024-04-26 20:38:35 -06:00
valid_syntax@statement__function.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
valid_syntax@statement__if.py.snap
valid_syntax@statement__import.py.snap
valid_syntax@statement__match.py.snap Refactor the ExprDict node (#11267) 2024-05-07 11:46:10 +00:00
valid_syntax@statement__raise.py.snap
valid_syntax@statement__return.py.snap
valid_syntax@statement__simple.py.snap
valid_syntax@statement__try.py.snap
valid_syntax@statement__type.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
valid_syntax@statement__while.py.snap
valid_syntax@statement__with.py.snap
valid_syntax@type_param_param_spec.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
valid_syntax@type_param_type_var.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00
valid_syntax@type_param_type_var_tuple.py.snap Add support for PEP 696 syntax (#11120) 2024-04-26 09:47:29 +02:00