NT importstmt -> import to match AST

This commit is contained in:
rocky
2017-11-29 20:20:54 -05:00
parent 4ea1416fdd
commit 34117522b2
6 changed files with 19 additions and 18 deletions

View File

@@ -379,7 +379,7 @@ class PythonParser(GenericASTBuilder):
def p_import20(self, args):
"""
stmt ::= importstmt
stmt ::= import
stmt ::= importfrom
stmt ::= importstar
stmt ::= importmultiple
@@ -390,7 +390,7 @@ class PythonParser(GenericASTBuilder):
alias ::= IMPORT_FROM store
alias ::= IMPORT_NAME load_attrs store
importstmt ::= LOAD_CONST LOAD_CONST alias
import ::= LOAD_CONST LOAD_CONST alias
importstar ::= LOAD_CONST LOAD_CONST IMPORT_NAME IMPORT_STAR
importfrom ::= LOAD_CONST LOAD_CONST IMPORT_NAME importlist POP_TOP
importmultiple ::= LOAD_CONST LOAD_CONST alias imports_cont