mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Make ELLIPSIS a separate token. This makes it a syntax error to write ". . ." for Ellipsis.
This commit is contained in:
parent
428f0641ec
commit
dde002899d
9 changed files with 111 additions and 95 deletions
|
|
@ -107,7 +107,7 @@ power: atom trailer* ['**' factor]
|
|||
atom: ('(' [yield_expr|testlist_gexp] ')' |
|
||||
'[' [listmaker] ']' |
|
||||
'{' [dictsetmaker] '}' |
|
||||
NAME | NUMBER | STRING+ | '.' '.' '.')
|
||||
NAME | NUMBER | STRING+ | '...')
|
||||
listmaker: test ( list_for | (',' test)* [','] )
|
||||
testlist_gexp: test ( gen_for | (',' test)* [','] )
|
||||
lambdef: 'lambda' [varargslist] ':' test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue