mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-40334: Improve column offsets for thrown syntax errors by Pegen (GH-19782)
This commit is contained in:
parent
719e14d283
commit
76c1b4d5c5
6 changed files with 80 additions and 112 deletions
|
|
@ -609,7 +609,7 @@ invalid_assignment:
|
|||
| expression ':' expression ['=' annotated_rhs] {
|
||||
RAISE_SYNTAX_ERROR("illegal target for annotation") }
|
||||
| a=expression ('=' | augassign) (yield_expr | star_expressions) {
|
||||
RAISE_SYNTAX_ERROR("cannot assign to %s", _PyPegen_get_expr_name(a)) }
|
||||
RAISE_SYNTAX_ERROR_NO_COL_OFFSET("cannot assign to %s", _PyPegen_get_expr_name(a)) }
|
||||
invalid_block:
|
||||
| NEWLINE !INDENT { RAISE_INDENTATION_ERROR("expected an indented block") }
|
||||
invalid_comprehension:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue