Tidy use of load_attrs

This commit is contained in:
rocky
2017-04-03 06:53:12 -04:00
parent 6f82ae3642
commit 6773a66b99

View File

@@ -31,7 +31,7 @@ class PythonParser(GenericASTBuilder):
def __init__(self, AST, start, debug):
super(PythonParser, self).__init__(AST, start, debug)
self.collect = frozenset(
['stmts', 'except_stmts', '_stmts',
['stmts', 'except_stmts', '_stmts', 'load_attrs',
'exprlist', 'kvlist', 'kwargs', 'come_froms', '_come_from',
# Python < 3
'print_items',
@@ -401,8 +401,7 @@ class PythonParser(GenericASTBuilder):
import_cont ::= LOAD_CONST LOAD_CONST import_as_cont
import_as_cont ::= IMPORT_FROM designator
load_attrs ::= LOAD_ATTR
load_attrs ::= load_attrs LOAD_ATTR
load_attrs ::= LOAD_ATTR+
"""
def p_list_comprehension(self, args):