mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
gh-112943: Correctly compute end offsets for multiline tokens in the tokenize module (#112949)
This commit is contained in:
parent
4c5b9c107a
commit
a135a6d2c6
5 changed files with 25 additions and 6 deletions
|
@ -225,7 +225,7 @@ tokenizeriter_next(tokenizeriterobject *it)
|
|||
col_offset = _PyPegen_byte_offset_to_character_offset(line, token.start - line_start);
|
||||
}
|
||||
if (token.end != NULL && token.end >= it->tok->line_start) {
|
||||
end_col_offset = _PyPegen_byte_offset_to_character_offset(line, token.end - it->tok->line_start);
|
||||
end_col_offset = _PyPegen_byte_offset_to_character_offset_raw(it->tok->line_start, token.end - it->tok->line_start);
|
||||
}
|
||||
|
||||
if (it->tok->tok_extra_tokens) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue