cpython/Parser
Pablo Galindo a77aac4fca
bpo-43914: Highlight invalid ranges in SyntaxErrors (#25525)
To improve the user experience understanding what part of the error messages associated with SyntaxErrors is wrong, we can highlight the whole error range and not only place the caret at the first character. In this way:

>>> foo(x, z for z in range(10), t, w)
  File "<stdin>", line 1
    foo(x, z for z in range(10), t, w)
           ^
SyntaxError: Generator expression must be parenthesized

becomes

>>> foo(x, z for z in range(10), t, w)
  File "<stdin>", line 1
    foo(x, z for z in range(10), t, w)
           ^^^^^^^^^^^^^^^^^^^^
SyntaxError: Generator expression must be parenthesized
2021-04-23 14:27:05 +01:00
..
asdl.py bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25142) 2021-04-02 12:53:46 +09:00
asdl_c.py bpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252) 2021-04-07 21:34:22 +02:00
myreadline.c bpo-38156: Fix compiler warning in PyOS_StdioReadline() (GH-21721) 2020-08-04 02:38:16 +02:00
parser.c bpo-43914: Highlight invalid ranges in SyntaxErrors (#25525) 2021-04-23 14:27:05 +01:00
peg_api.c bpo-43244: Remove parser_interface.h header file (GH-25001) 2021-03-24 01:29:09 +01:00
pegen.c bpo-43914: Highlight invalid ranges in SyntaxErrors (#25525) 2021-04-23 14:27:05 +01:00
pegen.h bpo-43914: Highlight invalid ranges in SyntaxErrors (#25525) 2021-04-23 14:27:05 +01:00
Python.asdl bpo-43798: Add source location attributes to alias (GH-25324) 2021-04-10 22:56:28 +02:00
string_parser.c bpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252) 2021-04-07 21:34:22 +02:00
string_parser.h bpo-43244: Remove ast.h, asdl.h, Python-ast.h headers (GH-24933) 2021-03-23 20:47:40 +01:00
token.c bpo-43822: Improve syntax errors for missing commas (GH-25377) 2021-04-15 21:38:45 +01:00
tokenizer.c Fix tokenizer error when raw decoding null bytes (GH-25080) 2021-03-30 00:24:49 +01:00
tokenizer.h bpo-25643: Refactor the C tokenizer into smaller, logical units (GH-25050) 2021-03-28 23:48:05 +01:00