gh-153569: finish tokenizer offsets and the opaque API cutover - #156654
Draft
pablogsal wants to merge 12 commits into
Draft
gh-153569: finish tokenizer offsets and the opaque API cutover#156654pablogsal wants to merge 12 commits into
pablogsal wants to merge 12 commits into
Conversation
pablogsal
force-pushed
the
gh-153569-tokenizer-source-ftstring-clean
branch
4 times, most recently
from
August 30, 2026 13:16
b2bc8d1 to
d9b2b16
Compare
pablogsal
force-pushed
the
gh-153569-tokenizer-source-ftstring-clean
branch
4 times, most recently
from
September 5, 2026 17:46
9ce1fd9 to
afd9d72
Compare
This was referenced Sep 5, 2026
pablogsal
force-pushed
the
gh-153569-tokenizer-source-ftstring-clean
branch
from
September 5, 2026 19:17
afd9d72 to
f72cb2b
Compare
pablogsal
force-pushed
the
gh-153569-tokenizer-source-ftstring-clean
branch
3 times, most recently
from
September 6, 2026 20:57
7e5d82c to
9240806
Compare
Formatted-string expressions and comments can outlive the buffer window where scanning began. Pointer boundaries require buffer relocation to repair tokenizer state. Record logical source ranges instead. Retain the active input window while a formatted string is open, give each mode ownership of its comment spans, and materialize text through shared span views.
pablogsal
force-pushed
the
gh-153569-tokenizer-source-ftstring-clean
branch
from
September 6, 2026 21:37
9240806 to
fefec39
Compare
pablogsal
force-pushed
the
gh-153569-tokenizer-source-ftstring-clean
branch
from
September 6, 2026 22:30
fefec39 to
a497ca0
Compare
pablogsal
force-pushed
the
gh-153569-tokenizer-source-ftstring-clean
branch
from
September 6, 2026 23:21
a497ca0 to
0eb2ce0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Complete the tokenizer API cutover after #156484.
Represent persistent scanner positions as offsets into decoded source storage, removing pointer save/restore during buffer growth. Give errors explicit reporting locations and source text, independent of the scanner cursor, including the context needed for incomplete-input diagnostics.
Make
tok_stateopaque to pegen and_tokenize. Consumers use token, source-view, diagnostic, configuration, and interactive-input operations throughtokenizer.h, with no dependency on lexer layout or live formatted-string frames.Return each token with its final kind, span, source locations, and raw-string context. Token views use that result directly, and reusing a token releases its previous metadata. Remove the unused cursor, source line index, and obsolete view APIs as part of this cutover.