mirror of https://github.com/python/cpython
bpo-45562: Only show debug output from the parser in debug builds (GH-29140)
This commit is contained in:
parent
276468dddb
commit
86dfb55d2e
|
@ -1043,11 +1043,13 @@ tok_nextc(struct tok_state *tok)
|
||||||
else {
|
else {
|
||||||
rc = tok_underflow_file(tok);
|
rc = tok_underflow_file(tok);
|
||||||
}
|
}
|
||||||
|
#if defined(Py_DEBUG)
|
||||||
if (Py_DebugFlag) {
|
if (Py_DebugFlag) {
|
||||||
printf("line[%d] = ", tok->lineno);
|
printf("line[%d] = ", tok->lineno);
|
||||||
print_escape(stdout, tok->cur, tok->inp - tok->cur);
|
print_escape(stdout, tok->cur, tok->inp - tok->cur);
|
||||||
printf(" tok->done = %d\n", tok->done);
|
printf(" tok->done = %d\n", tok->done);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (!rc) {
|
if (!rc) {
|
||||||
tok->cur = tok->inp;
|
tok->cur = tok->inp;
|
||||||
return EOF;
|
return EOF;
|
||||||
|
|
Loading…
Reference in New Issue