GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — gh-112943: Correctly compute end offsets for multiline tokens in the tokenize module by pablogsal · Pull Request #112949 · python/cpython Conversation
|
| } | ||
| 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); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
it->tok->line_start holds the last line tokenised (the last line of the multi-line string) while line holds the entire multi-line string from the start to the end.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Serhiy Storchaka <[email protected]>
|
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, @pablogsal, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-112957 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…okens in the tokenize module (pythonGH-112949) (cherry picked from commit a135a6d) Co-authored-by: Pablo Galindo Salgado <[email protected]>
…n the tokenize module (python#112949)
…n the tokenize module (python#112949)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.