summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorEric V. Smith <ericvsmith@users.noreply.github.com>2019-05-27 19:31:52 (GMT)
committerGitHub <noreply@github.com>2019-05-27 19:31:52 (GMT)
commit6f6ff8a56518a80da406aad6ac8364c046cc7f18 (patch)
tree645d87649541f53b0ea4180a5f886c84320453fa /Include
parent695b1dd8cbf3a48fdb30ab96918a49b20b7ec3e7 (diff)
downloadcpython-6f6ff8a56518a80da406aad6ac8364c046cc7f18.zip
cpython-6f6ff8a56518a80da406aad6ac8364c046cc7f18.tar.gz
cpython-6f6ff8a56518a80da406aad6ac8364c046cc7f18.tar.bz2
bpo-37050: Remove expr_text from FormattedValue ast node, use Constant node instead (GH-13597)
When using the "=" debug functionality of f-strings, use another Constant node (or a merged constant node) instead of adding expr_text to the FormattedValue node.
Diffstat (limited to 'Include')
-rw-r--r--Include/Python-ast.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/Include/Python-ast.h b/Include/Python-ast.h
index 2fc50e3..490d3b0 100644
--- a/Include/Python-ast.h
+++ b/Include/Python-ast.h
@@ -330,7 +330,6 @@ struct _expr {
expr_ty value;
int conversion;
expr_ty format_spec;
- string expr_text;
} FormattedValue;
struct {
@@ -639,10 +638,10 @@ expr_ty _Py_Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators,
expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, int
lineno, int col_offset, int end_lineno, int end_col_offset,
PyArena *arena);
-#define FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7, a8) _Py_FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7, a8)
+#define FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7) _Py_FormattedValue(a0, a1, a2, a3, a4, a5, a6, a7)
expr_ty _Py_FormattedValue(expr_ty value, int conversion, expr_ty format_spec,
- string expr_text, int lineno, int col_offset, int
- end_lineno, int end_col_offset, PyArena *arena);
+ int lineno, int col_offset, int end_lineno, int
+ end_col_offset, PyArena *arena);
#define JoinedStr(a0, a1, a2, a3, a4, a5) _Py_JoinedStr(a0, a1, a2, a3, a4, a5)
expr_ty _Py_JoinedStr(asdl_seq * values, int lineno, int col_offset, int
end_lineno, int end_col_offset, PyArena *arena);