Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a1da26

Browse files
committed
changed import to support NAME.NAME...NAME
1 parent 03d4c26 commit 4a1da26

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Grammar/Grammar

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ break_stmt: 'break'
4040
continue_stmt: 'continue'
4141
return_stmt: 'return' [testlist]
4242
raise_stmt: 'raise' test [',' test]
43-
import_stmt: 'import' NAME (',' NAME)* | 'from' NAME 'import' ('*' | NAME (',' NAME)*)
43+
import_stmt: 'import' dotted_name (',' dotted_name)* | 'from' dotted_name 'import' ('*' | NAME (',' NAME)*)
44+
dotted_name: NAME ('.' NAME)*
4445
global_stmt: 'global' NAME (',' NAME)*
4546
access_stmt: 'access' ('*' | NAME (',' NAME)*) ':' accesstype (',' accesstype)*
4647
accesstype: NAME+

0 commit comments

Comments
 (0)