diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ast.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c index 89ec2178f2..04b2b3e5f6 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -2562,6 +2562,11 @@ ast_for_suite(struct compiling *c, const node *n) ch = CHILD(ch, 0); REQ(ch, simple_stmt); for (j = 0; j < NCH(ch); j += 2) { + /* statement terminates with a semi-colon ';' */ + if (NCH(CHILD(ch, j)) == 0) { + assert((j + 1) == NCH(ch)); + break; + } s = ast_for_stmt(c, CHILD(ch, j)); if (!s) goto error; |