You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
whileelse in 3.6 sometimes has come froms...
also remove extra "L. " in token printing
This commit is contained in:
@@ -74,6 +74,7 @@ class Python3Parser(PythonParser):
|
||||
|
||||
jb_or_c ::= JUMP_BACK
|
||||
jb_or_c ::= CONTINUE
|
||||
jb_cfs ::= JUMP_BACK _come_froms
|
||||
|
||||
stmt ::= set_comp_func
|
||||
|
||||
@@ -435,9 +436,10 @@ class Python3Parser(PythonParser):
|
||||
while1elsestmt ::= SETUP_LOOP l_stmts JUMP_BACK
|
||||
else_suitel
|
||||
|
||||
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK
|
||||
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt jb_cfs POP_BLOCK
|
||||
else_suitel COME_FROM_LOOP
|
||||
|
||||
|
||||
whileelsestmt2 ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK
|
||||
else_suitel JUMP_BACK COME_FROM_LOOP
|
||||
|
||||
|
@@ -396,7 +396,7 @@ class Scanner2(Scanner):
|
||||
|
||||
if show_asm in ('both', 'after'):
|
||||
for t in tokens:
|
||||
print(t.format(line_prefix='L.'))
|
||||
print(t.format(line_prefix=""))
|
||||
print()
|
||||
return tokens, customize
|
||||
|
||||
|
@@ -279,7 +279,7 @@ class Scanner26(scan.Scanner2):
|
||||
|
||||
if show_asm in ('both', 'after'):
|
||||
for t in tokens:
|
||||
print(t.format(line_prefix='L.'))
|
||||
print(t.format(line_prefix=""))
|
||||
print()
|
||||
return tokens, customize
|
||||
|
||||
|
@@ -539,7 +539,7 @@ class Scanner3(Scanner):
|
||||
|
||||
if show_asm in ("both", "after"):
|
||||
for t in tokens:
|
||||
print(t.format(line_prefix="L."))
|
||||
print(t.format(line_prefix=))
|
||||
print()
|
||||
return tokens, customize
|
||||
|
||||
|
@@ -518,7 +518,7 @@ class Scanner37Base(Scanner):
|
||||
|
||||
if show_asm in ("both", "after"):
|
||||
for t in tokens:
|
||||
print(t.format(line_prefix="L."))
|
||||
print(t.format(line_prefix=""))
|
||||
print()
|
||||
return tokens, customize
|
||||
|
||||
|
Reference in New Issue
Block a user