Simplify grammar

This commit is contained in:
Pablo Galindo Salgado 2025-10-02 02:25:50 +01:00 committed by Dino Viehland
parent f67310c9b9
commit 39c33df51a
2 changed files with 229 additions and 266 deletions

View file

@ -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

File diff suppressed because it is too large Load diff