More 2.7 compatibility

This commit is contained in:
rocky
2020-01-09 01:34:41 -05:00
parent 30d8830957
commit 086ceaf176
3 changed files with 3 additions and 9 deletions

View File

@@ -3,9 +3,7 @@
from uncompyle6.scanners.tok import Token
def ifstmts_jump(
self, lhs, n, rule, ast, tokens, first, last
) -> bool:
def ifstmts_jump(self, lhs, n, rule, ast, tokens, first, last):
come_froms = ast[-1]
# Make sure all of the "come froms" offset at the
# end of the "if" come from somewhere inside the "if".

View File

@@ -1,9 +1,7 @@
# Copyright (c) 2020 Rocky Bernstein
def while1elsestmt(
self, lhs, n, rule, ast, tokens, first, last
) -> bool:
def while1elsestmt(self, lhs, n, rule, ast, tokens, first, last):
if last == n:
# Adjust for fuzziness in parsing
last -= 1

View File

@@ -1,9 +1,7 @@
# Copyright (c) 2020 Rocky Bernstein
def while1stmt(
self, lhs, n, rule, ast, tokens, first, last
) -> bool:
def while1stmt(self, lhs, n, rule, ast, tokens, first, last:
# If there is a fall through to the COME_FROM_LOOP, then this is
# not a while 1. So the instruction before should either be a