You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
3.6 while-if-while bug
This commit is contained in:
BIN
test/bytecode_3.6/09_while_if_while.pyc
Normal file
BIN
test/bytecode_3.6/09_while_if_while.pyc
Normal file
Binary file not shown.
9
test/simple_source/bug36/09_while_if_while.py
Normal file
9
test/simple_source/bug36/09_while_if_while.py
Normal file
@@ -0,0 +1,9 @@
|
||||
# From 3.6 _markupbase.py
|
||||
# Bug was parsing the inner while
|
||||
def _parse_doctype_subset(c, j, rawdata, n):
|
||||
while n:
|
||||
if c:
|
||||
j += 1
|
||||
while j < n and rawdata[j]:
|
||||
j += 1
|
||||
return -1
|
@@ -30,6 +30,8 @@ class Python36Parser(Python35Parser):
|
||||
for_block ::= l_stmts_opt come_from_loops JUMP_BACK
|
||||
come_from_loops ::= COME_FROM_LOOP*
|
||||
|
||||
whilestmt ::= SETUP_LOOP testexpr l_stmts_opt
|
||||
JUMP_BACK COME_FROM POP_BLOCK COME_FROM_LOOP
|
||||
|
||||
# This might be valid in < 3.6
|
||||
and ::= expr jmp_false expr
|
||||
|
Reference in New Issue
Block a user