mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Simplify grammar
This commit is contained in:
parent
f67310c9b9
commit
39c33df51a
2 changed files with 229 additions and 266 deletions
|
|
@ -225,8 +225,7 @@ import_stmt[stmt_ty](memo):
|
|||
# -----------------
|
||||
|
||||
import_name[stmt_ty]:
|
||||
| 'import' a=dotted_as_names { _PyAST_Import(a, 0, EXTRA) }
|
||||
| "lazy" 'import' a=dotted_as_names { _PyAST_Import(a, 1, EXTRA) }
|
||||
| lazy="lazy"? 'import' a=dotted_as_names { _PyAST_Import(a, lazy ? 1 : 0, EXTRA) }
|
||||
|
||||
# note below: the ('.' | '...') is necessary because '...' is tokenized as ELLIPSIS
|
||||
import_from[stmt_ty]:
|
||||
|
|
|
|||
492
Parser/parser.c
generated
492
Parser/parser.c
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue