mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Remove support for backticks from the grammar and compiler.
Still need to remove traces of the UNARY_CONVERT opcode.
This commit is contained in:
parent
8b6de130c6
commit
cf588f6448
7 changed files with 86 additions and 154 deletions
|
@ -1190,7 +1190,7 @@ static expr_ty
|
|||
ast_for_atom(struct compiling *c, const node *n)
|
||||
{
|
||||
/* atom: '(' [yield_expr|testlist_gexp] ')' | '[' [listmaker] ']'
|
||||
| '{' [dictmaker] '}' | '`' testlist '`' | NAME | NUMBER | STRING+
|
||||
| '{' [dictmaker] '}' | NAME | NUMBER | STRING+
|
||||
*/
|
||||
node *ch = CHILD(n, 0);
|
||||
|
||||
|
@ -1276,13 +1276,6 @@ ast_for_atom(struct compiling *c, const node *n)
|
|||
}
|
||||
return Dict(keys, values, LINENO(n), n->n_col_offset, c->c_arena);
|
||||
}
|
||||
case BACKQUOTE: { /* repr */
|
||||
expr_ty expression = ast_for_testlist(c, CHILD(n, 1));
|
||||
if (!expression)
|
||||
return NULL;
|
||||
|
||||
return Repr(expression, LINENO(n), n->n_col_offset, c->c_arena);
|
||||
}
|
||||
default:
|
||||
PyErr_Format(PyExc_SystemError, "unhandled atom %d", TYPE(ch));
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue