You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Python 3.8 while and whileTrue loops
This commit is contained in:
@@ -142,6 +142,7 @@ class Python38Parser(Python37Parser):
|
||||
while1stmt ::= _come_froms l_stmts COME_FROM JUMP_BACK COME_FROM_LOOP
|
||||
whileTruestmt38 ::= _come_froms l_stmts JUMP_BACK
|
||||
whileTruestmt38 ::= _come_froms l_stmts JUMP_BACK COME_FROM_EXCEPT_CLAUSE
|
||||
whileTruestmt38 ::= _come_froms pass JUMP_BACK
|
||||
|
||||
for_block ::= _come_froms l_stmts_opt _come_from_loops JUMP_BACK
|
||||
|
||||
|
@@ -125,7 +125,10 @@ def customize_for_version38(self, version):
|
||||
(1, "testexpr"),
|
||||
(2, ("l_stmts", "pass")),
|
||||
),
|
||||
"whileTruestmt38": ("%|while True:\n%+%c%-\n\n", (1, "l_stmts", "pass"),),
|
||||
"whileTruestmt38": (
|
||||
"%|while True:\n%+%c%-\n\n",
|
||||
(1, ("l_stmts", "pass")),
|
||||
),
|
||||
"try_elsestmtl38": (
|
||||
"%|try:\n%+%c%-%c%|else:\n%+%c%-",
|
||||
(1, "suite_stmts_opt"),
|
||||
|
Reference in New Issue
Block a user