mirror of https://github.com/python/cpython
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. |
||
---|---|---|
.. | ||
Python.asdl | ||
asdl.py | ||
asdl_c.py | ||
myreadline.c | ||
parser.c | ||
peg_api.c | ||
pegen.c | ||
pegen.h | ||
string_parser.c | ||
string_parser.h | ||
token.c | ||
tokenizer.c | ||
tokenizer.h |