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 /Include | |
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 'Include')
-rw-r--r-- | Include/internal/pycore_ast.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Include/internal/pycore_ast.h b/Include/internal/pycore_ast.h index 38c8013..64d68b2 100644 --- a/Include/internal/pycore_ast.h +++ b/Include/internal/pycore_ast.h @@ -543,6 +543,10 @@ struct _keyword { struct _alias { identifier name; identifier asname; + int lineno; + int col_offset; + int end_lineno; + int end_col_offset; }; struct _withitem { @@ -751,7 +755,9 @@ arg_ty _PyAST_arg(identifier arg, expr_ty annotation, string type_comment, int keyword_ty _PyAST_keyword(identifier arg, expr_ty value, int lineno, int col_offset, int end_lineno, int end_col_offset, PyArena *arena); -alias_ty _PyAST_alias(identifier name, identifier asname, PyArena *arena); +alias_ty _PyAST_alias(identifier name, identifier asname, int lineno, int + col_offset, int end_lineno, int end_col_offset, PyArena + *arena); withitem_ty _PyAST_withitem(expr_ty context_expr, expr_ty optional_vars, PyArena *arena); match_case_ty _PyAST_match_case(expr_ty pattern, expr_ty guard, asdl_stmt_seq * |