Remove support for backticks from the grammar and compiler.

Still need to remove traces of the UNARY_CONVERT opcode.
This commit is contained in:
Brett Cannon 2006-08-25 04:28:18 +00:00
parent 8b6de130c6
commit cf588f6448
7 changed files with 86 additions and 154 deletions

View file

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