Skip to content

Cleanup: put next_byte in token rather than first_byte#21

Merged
c42f merged 1 commit intomainfrom
cjf/token-byte-cleanups
Mar 10, 2022
Merged

Cleanup: put next_byte in token rather than first_byte#21
c42f merged 1 commit intomainfrom
cjf/token-byte-cleanups

Conversation

@c42f
Copy link
Copy Markdown
Member

@c42f c42f commented Mar 10, 2022

While a bit counter-intuitive, this enables us to use an initial
sentinel token for recording the first byte of the first real token
which removes a bunch of special case hacks for computing the last byte
of the current output token.

While a bit counter-intuitive, this enables us to use an initial
sentinel token for recording the first byte of the first real token
which removes a bunch of special case hacks for computing the last byte
of the current output token.

Also return only SyntaxHead from peek_token() - the byte range is never
needed.
@c42f c42f force-pushed the cjf/token-byte-cleanups branch from 96b10d6 to 10a4164 Compare March 10, 2022 05:19
@c42f c42f merged commit 98bd80c into main Mar 10, 2022
@c42f c42f deleted the cjf/token-byte-cleanups branch March 10, 2022 05:31
c42f added a commit to JuliaLang/julia that referenced this pull request Oct 17, 2025
…iaSyntax.jl#21)

While a bit counter-intuitive, this enables us to use an initial
sentinel token for recording the first byte of the first real token
which removes a bunch of special case hacks for computing the last byte
of the current output token.

Also return only SyntaxHead from peek_token() - the byte range is never
needed.
topolarity pushed a commit to JuliaLang/julia that referenced this pull request Nov 14, 2025
…iaSyntax.jl#21)

While a bit counter-intuitive, this enables us to use an initial
sentinel token for recording the first byte of the first real token
which removes a bunch of special case hacks for computing the last byte
of the current output token.

Also return only SyntaxHead from peek_token() - the byte range is never
needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant