You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Fix 2.x compatibility
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
--- uncompyle6/parsers/reducecheck/ifelsestmt.py
|
|
||||||
+++ uncompyle6/parsers/reducecheck/ifelsestmt.py
|
|
||||||
@@ -6,6 +6,7 @@ from uncompyle6.scanners.tok import Token
|
|
||||||
def ifelsestmt(
|
|
||||||
self, lhs: str, n: int, rule, ast, tokens: list, first: int, last: int
|
|
||||||
) -> bool:
|
|
||||||
+
|
|
||||||
if (last + 1) < n and tokens[last + 1] == "COME_FROM_LOOP":
|
|
||||||
# ifelsestmt jumped outside of loop. No good.
|
|
||||||
return True
|
|
@@ -1,8 +1,6 @@
|
|||||||
# Copyright (c) 2020 Rocky Bernstein
|
# Copyright (c) 2020 Rocky Bernstein
|
||||||
|
|
||||||
def ifstmt(
|
def ifstmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||||
self, lhs, n, rule, ast, tokens: list, first, last
|
|
||||||
) -> bool:
|
|
||||||
if lhs == "ifstmtl":
|
if lhs == "ifstmtl":
|
||||||
if last == n:
|
if last == n:
|
||||||
last -= 1
|
last -= 1
|
||||||
|
Reference in New Issue
Block a user