mirror of
https://github.com/python/cpython.git
synced 2024-11-30 21:34:17 +08:00
bd7476dae3
When the parser does a second pass to check for errors, these rules can have some small side-effects as they may advance the parser more than the point reached in the first pass. This can cause the tokenizer to ask for extra tokens in interactive mode causing the tokenizer to show the prompt instead of failing instantly. To avoid this, add a new mode to the tokenizer that is activated in the second pass and deactivates asking for new tokens when the interactive line is finished. As the parsing should have reached the last line in the first pass, the second pass should not need to ask for more tokens. |
||
---|---|---|
.. | ||
asdl_c.py | ||
asdl.py | ||
myreadline.c | ||
parser.c | ||
peg_api.c | ||
pegen.c | ||
pegen.h | ||
Python.asdl | ||
string_parser.c | ||
string_parser.h | ||
token.c | ||
tokenizer.c | ||
tokenizer.h |