mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +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
|
@ -1410,7 +1410,7 @@ ast_for_atom(struct compiling *c, const node *n)
|
|||
PyArena_AddPyObject(c->c_arena, pynum);
|
||||
return Num(pynum, LINENO(n), n->n_col_offset, c->c_arena);
|
||||
}
|
||||
case DOT: /* Ellipsis */
|
||||
case ELLIPSIS: /* Ellipsis */
|
||||
return Ellipsis(LINENO(n), n->n_col_offset, c->c_arena);
|
||||
case LPAR: /* some parenthesized expressions */
|
||||
ch = CHILD(n, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue