mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-02-08 05:57:07 +00:00
opc field in while1 reduction is off of token...
not self (parse)
This commit is contained in:
parent
647df7140c
commit
207dc0b506
BIN
test/bytecode_3.7/02_while1_if_while1.pyc
Normal file
BIN
test/bytecode_3.7/02_while1_if_while1.pyc
Normal file
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020 Rocky Bernstein
|
||||
# Copyright (c) 2020, 2022 Rocky Bernstein
|
||||
|
||||
|
||||
def while1stmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
@ -42,7 +42,7 @@ def while1stmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
# token could be a pseudo-op like "LOAD_STR", which is not in
|
||||
# self.opc. We will replace that with LOAD_CONST as an
|
||||
# example of an instruction that is not in self.opc.JUMP_OPS
|
||||
if self.opc.opmap.get(token.kind, "LOAD_CONST") in self.opc.JUMP_OPS:
|
||||
if token.opc.opmap.get(token.kind, "LOAD_CONST") in self.opc.JUMP_OPS:
|
||||
if token.attr >= loop_end_offset:
|
||||
return True
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user