Was missing some 3.7 and 3.7 semantic actions...

Possibly some as a result of the last refactor?
This commit is contained in:
rocky
2019-04-15 08:11:31 -04:00
parent 53968e535f
commit b4c66d4307
7 changed files with 10 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -24,13 +24,14 @@ scanner routine for Python 3.
from __future__ import print_function
from uncompyle6.scanners.scanner36 import Scanner36
from uncompyle6.scanners.scanner3 import Scanner3
# bytecode verification, verify(), uses JUMP_OPs from here
from xdis.opcodes import opcode_37 as opc
JUMP_OPs = opc.JUMP_OPS
class Scanner37(Scanner3):
class Scanner37(Scanner36):
def __init__(self, show_asm=None):
Scanner3.__init__(self, 3.7, show_asm)

View File

@@ -24,13 +24,14 @@ scanner routine for Python 3.
from __future__ import print_function
from uncompyle6.scanners.scanner37 import Scanner37
from uncompyle6.scanners.scanner3 import Scanner3
# bytecode verification, verify(), uses JUMP_OPs from here
from xdis.opcodes import opcode_38 as opc
JUMP_OPs = opc.JUMP_OPS
class Scanner38(Scanner3):
class Scanner38(Scanner37):
def __init__(self, show_asm=None):
Scanner3.__init__(self, 3.8, show_asm)

View File

@@ -27,8 +27,10 @@ from uncompyle6.semantics.customize38 import customize_for_version38
def customize_for_version3(self, version):
TABLE_DIRECT.update({
'except_cond2': ( '%|except %c as %c:\n', 1, 5 ),
'function_def_annotate': ( '\n\n%|def %c%c\n', -1, 0),
'store_locals': ( '%|# inspect.currentframe().f_locals = __locals__\n', ),
'withstmt': ( '%|with %c:\n%+%c%-', 0, 3),
})
assert version >= 3.0

View File

@@ -46,8 +46,12 @@ def customize_for_version38(self, version):
(0, 'expr'), (6, 'store'),
(7, 'suite_stmts') ),
'except_handler38': (
'%c', (2, 'except_stmts') ),
'except_handler38a': (
'%c', (-2, 'stmts') ),
'except_ret38a': (
'return %c', (4, 'expr') ),
'except_ret38': ( '%|return %c\n', (1, 'expr') ),

View File

@@ -1825,7 +1825,6 @@ class SourceWalker(GenericASTTraversal, object):
# print(startnode)
# print(entry[0])
# print('======')
fmt = entry[0]
arg = 1
i = 0