You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
2.4 tolerance
This commit is contained in:
@@ -128,9 +128,9 @@ class Python36Parser(Python35Parser):
|
||||
if opname.startswith('CALL_FUNCTION_KW'):
|
||||
self.addRule("expr ::= call_kw", nop_func)
|
||||
values = 'expr ' * token.attr
|
||||
rule = 'call_kw ::= expr kwargs_36 {token.kind}'.format(**locals())
|
||||
rule = 'call_kw ::= expr kwargs_36 %s' % token.kind
|
||||
self.addRule(rule, nop_func)
|
||||
rule = 'kwargs_36 ::= {values} LOAD_CONST'.format(**locals())
|
||||
rule = 'kwargs_36 ::= %s LOAD_CONST' % values
|
||||
self.add_unique_rule(rule, token.kind, token.attr, customize)
|
||||
elif opname == 'CALL_FUNCTION_EX_KW':
|
||||
self.addRule("""expr ::= call_ex_kw
|
||||
|
@@ -11,8 +11,6 @@ scanner routine for Python 3.
|
||||
|
||||
from uncompyle6.scanners.scanner3 import Scanner3
|
||||
|
||||
import xdis
|
||||
|
||||
# bytecode verification, verify(), uses JUMP_OPS from here
|
||||
from xdis.opcodes import opcode_36 as opc
|
||||
JUMP_OPS = opc.JUMP_OPS
|
||||
@@ -32,7 +30,7 @@ class Scanner36(Scanner3):
|
||||
t.kind = 'CALL_FUNCTION_EX_KW'
|
||||
pass
|
||||
elif t.op == self.opc.CALL_FUNCTION_KW:
|
||||
t.kind = 'CALL_FUNCTION_KW_{t.attr}'.format(**locals())
|
||||
t.kind = 'CALL_FUNCTION_KW_%s' % t.attr
|
||||
elif t.op == self.opc.BUILD_MAP_UNPACK_WITH_CALL:
|
||||
t.kind = 'BUILD_MAP_UNPACK_WITH_CALL_%d' % t.attr
|
||||
pass
|
||||
|
Reference in New Issue
Block a user