You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Grammar rule for 3.6 with .. return
This commit is contained in:
Binary file not shown.
@@ -120,6 +120,8 @@ class Python36Parser(Python35Parser):
|
|||||||
rules_str = """
|
rules_str = """
|
||||||
withstmt ::= expr SETUP_WITH POP_TOP suite_stmts_opt POP_BLOCK LOAD_CONST
|
withstmt ::= expr SETUP_WITH POP_TOP suite_stmts_opt POP_BLOCK LOAD_CONST
|
||||||
WITH_CLEANUP_START WITH_CLEANUP_FINISH END_FINALLY
|
WITH_CLEANUP_START WITH_CLEANUP_FINISH END_FINALLY
|
||||||
|
withstmt ::= expr SETUP_WITH POP_TOP suite_stmts_opt COME_FROM_WITH
|
||||||
|
WITH_CLEANUP_START WITH_CLEANUP_FINISH END_FINALLY
|
||||||
|
|
||||||
# Removes POP_BLOCK LOAD_CONST from 3.6-
|
# Removes POP_BLOCK LOAD_CONST from 3.6-
|
||||||
withasstmt ::= expr SETUP_WITH store suite_stmts_opt COME_FROM_WITH
|
withasstmt ::= expr SETUP_WITH store suite_stmts_opt COME_FROM_WITH
|
||||||
|
@@ -628,8 +628,8 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
assert tup == 'tuple'
|
assert tup == 'tuple'
|
||||||
self.call36_tuple(tup)
|
self.call36_tuple(tup)
|
||||||
expr = node[2]
|
expr = node[2]
|
||||||
assert expr == 'expr'
|
if len(tup) > 0:
|
||||||
if tup[0].attr > 0:
|
# if tup[0].attr > 0:
|
||||||
self.write(', ')
|
self.write(', ')
|
||||||
self.write('**')
|
self.write('**')
|
||||||
self.preorder(expr)
|
self.preorder(expr)
|
||||||
|
Reference in New Issue
Block a user