mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
SF patch #1007189, multi-line imports, for instance:
"from blah import (foo, bar baz, bongo)"
This commit is contained in:
parent
876032e570
commit
1a4ddaecc7
14 changed files with 1394 additions and 1181 deletions
|
|
@ -51,9 +51,13 @@ continue_stmt: 'continue'
|
|||
return_stmt: 'return' [testlist]
|
||||
yield_stmt: 'yield' testlist
|
||||
raise_stmt: 'raise' [test [',' test [',' test]]]
|
||||
import_stmt: 'import' dotted_as_name (',' dotted_as_name)* | 'from' dotted_name 'import' ('*' | import_as_name (',' import_as_name)*)
|
||||
import_stmt: import_name | import_from
|
||||
import_name: 'import' dotted_as_names
|
||||
import_from: 'from' dotted_name 'import' ('*' | '(' import_as_names ')' | import_as_names)
|
||||
import_as_name: NAME [NAME NAME]
|
||||
dotted_as_name: dotted_name [NAME NAME]
|
||||
import_as_names: import_as_name (',' import_as_name)* [',']
|
||||
dotted_as_names: dotted_as_name (',' dotted_as_name)*
|
||||
dotted_name: NAME ('.' NAME)*
|
||||
global_stmt: 'global' NAME (',' NAME)*
|
||||
exec_stmt: 'exec' expr ['in' test [',' test]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue