mirror of
https://github.com/python/cpython.git
synced 2025-12-02 07:37:25 +00:00
This makes the parser consistent with the tokenize module (already the case
in `pypy`).
sample
------
```python
x = 5\
```
before
------
```console
$ python3 t.py
$ python3 -mtokenize t.py
t.py:2:0: error: EOF in multi-line statement
```
after
-----
```console
$ ./python t.py
File "t.py", line 3
x = 5\
^
SyntaxError: unexpected EOF while parsing
$ ./python -m tokenize t.py
t.py:2:0: error: EOF in multi-line statement
```
https://bugs.python.org/issue2180
|
||
|---|---|---|
| .. | ||
| pgen | ||
| acceler.c | ||
| asdl.py | ||
| asdl_c.py | ||
| grammar1.c | ||
| listnode.c | ||
| myreadline.c | ||
| node.c | ||
| parser.c | ||
| parser.h | ||
| parsetok.c | ||
| Python.asdl | ||
| token.c | ||
| tokenizer.c | ||
| tokenizer.h | ||