diff options
author | Matthew Suozzo <msuozzo@google.com> | 2021-04-10 20:56:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 20:56:28 (GMT) |
commit | 75a06f067bd0a2687312e5f8e78f9075be76ad3a (patch) | |
tree | a0bb72532b0579b5949a00b620c83049ae803f8c /Parser/pegen.c | |
parent | e05a703848473b0365886dcc593cbddc46609f29 (diff) | |
download | cpython-75a06f067bd0a2687312e5f8e78f9075be76ad3a.zip cpython-75a06f067bd0a2687312e5f8e78f9075be76ad3a.tar.gz cpython-75a06f067bd0a2687312e5f8e78f9075be76ad3a.tar.bz2 |
bpo-43798: Add source location attributes to alias (GH-25324)
* Add source location attributes to alias.
* Move alias star construction to pegen helper.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Parser/pegen.c')
-rw-r--r-- | Parser/pegen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c index 57759f7..f841ace 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -1555,8 +1555,8 @@ _PyPegen_seq_count_dots(asdl_seq *seq) /* Creates an alias with '*' as the identifier name */ alias_ty -_PyPegen_alias_for_star(Parser *p) -{ +_PyPegen_alias_for_star(Parser *p, int lineno, int col_offset, int end_lineno, + int end_col_offset, PyArena *arena) { PyObject *str = PyUnicode_InternFromString("*"); if (!str) { return NULL; @@ -1565,7 +1565,7 @@ _PyPegen_alias_for_star(Parser *p) Py_DECREF(str); return NULL; } - return _PyAST_alias(str, NULL, p->arena); + return _PyAST_alias(str, NULL, lineno, col_offset, end_lineno, end_col_offset, arena); } /* Creates a new asdl_seq* with the identifiers of all the names in seq */ |