You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Tidy use of load_attrs
This commit is contained in:
@@ -31,7 +31,7 @@ class PythonParser(GenericASTBuilder):
|
|||||||
def __init__(self, AST, start, debug):
|
def __init__(self, AST, start, debug):
|
||||||
super(PythonParser, self).__init__(AST, start, debug)
|
super(PythonParser, self).__init__(AST, start, debug)
|
||||||
self.collect = frozenset(
|
self.collect = frozenset(
|
||||||
['stmts', 'except_stmts', '_stmts',
|
['stmts', 'except_stmts', '_stmts', 'load_attrs',
|
||||||
'exprlist', 'kvlist', 'kwargs', 'come_froms', '_come_from',
|
'exprlist', 'kvlist', 'kwargs', 'come_froms', '_come_from',
|
||||||
# Python < 3
|
# Python < 3
|
||||||
'print_items',
|
'print_items',
|
||||||
@@ -401,8 +401,7 @@ class PythonParser(GenericASTBuilder):
|
|||||||
import_cont ::= LOAD_CONST LOAD_CONST import_as_cont
|
import_cont ::= LOAD_CONST LOAD_CONST import_as_cont
|
||||||
import_as_cont ::= IMPORT_FROM designator
|
import_as_cont ::= IMPORT_FROM designator
|
||||||
|
|
||||||
load_attrs ::= LOAD_ATTR
|
load_attrs ::= LOAD_ATTR+
|
||||||
load_attrs ::= load_attrs LOAD_ATTR
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def p_list_comprehension(self, args):
|
def p_list_comprehension(self, args):
|
||||||
|
Reference in New Issue
Block a user