8000 Add lookahead to grammar · python/cpython@3b6098d · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b6098d

Browse files
committed
Add lookahead to grammar
1 parent d5b86c5 commit 3b6098d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Grammar/python.gram

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ simple_stmts[asdl_stmt_seq*]:
112112
# will throw a SyntaxError.
113113
simple_stmt[stmt_ty] (memo):
114114
| assignment
115-
| type_alias
115+
| &"type" type_alias
116116
| e=star_expressions { _PyAST_Expr(e, EXTRA) }
117117
| &'return' return_stmt
118118
| &('import' | 'from') import_stmt

Parser/parser.c

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0