mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-97997: Add col_offset field to tokenizer and use that for AST nodes (#98000)
This commit is contained in:
parent
c06276402b
commit
3de08ce8c1
3 changed files with 44 additions and 11 deletions
|
|
@ -57,6 +57,8 @@ struct tok_state {
|
|||
int lineno; /* Current line number */
|
||||
int first_lineno; /* First line of a single line or multi line string
|
||||
expression (cf. issue 16806) */
|
||||
int starting_col_offset; /* The column offset at the beginning of a token */
|
||||
int col_offset; /* Current col offset */
|
||||
int level; /* () [] {} Parentheses nesting level */
|
||||
/* Used to allow free continuations inside them */
|
||||
char parenstack[MAXLEVEL];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue