mirror of
https://github.com/python/cpython.git
synced 2026-05-18 10:24:42 -04:00
Fixed problems in the last commit. Filenames and line numbers weren't reported correctly.
Backquotes still don't report the correct file. The AST nodes only contain the line number but not the file name.
This commit is contained in:
+8
-4
@@ -1336,10 +1336,14 @@ 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 */
|
||||
if (Py_Py3kWarningFlag &&
|
||||
PyErr_Warn(PyExc_DeprecationWarning,
|
||||
"backquote not supported in 3.x") < 0)
|
||||
return NULL;
|
||||
if (Py_Py3kWarningFlag) {
|
||||
if (PyErr_WarnExplicit(PyExc_DeprecationWarning,
|
||||
"backquote not supported in 3.x",
|
||||
"<unknown>", LINENO(n),
|
||||
NULL, NULL)) {
|
||||
; //return NULL;
|
||||
}
|
||||
}
|
||||
expr_ty expression = ast_for_testlist(c, CHILD(n, 1));
|
||||
if (!expression)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user