mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
only check this when parsing python
This commit is contained in:
parent
82138b8a84
commit
79c1f96438
1 changed files with 2 additions and 0 deletions
|
|
@ -225,6 +225,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
|
|||
n = ps->p_tree;
|
||||
ps->p_tree = NULL;
|
||||
|
||||
#ifndef PGEN
|
||||
/* Check that the source for a single input statement really
|
||||
is a single statement by looking at what is left in the
|
||||
buffer after parsing. Trailing whitespace and comments
|
||||
|
|
@ -241,6 +242,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
|
|||
n = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
n = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue