Skip to content

Simplify SavePosition/RestorePosition functions - #1470

Merged
dmitriplotnikov merged 1 commit into
masterfrom
simplify-lexer-save-position
Sep 17, 2026
Merged

dmitriplotnikov merged 1 commit into
masterfrom
simplify-lexer-save-position

Conversation

@dmitriplotnikov

Copy link
Copy Markdown
Collaborator

Simplifies position saving and restoring in the lexer by replacing the lexerPosition struct with a simple int32 offset and removing unused tracking fields.

Key changes:

  • Updated SavePosition() to return int32 (l.pos).
  • Updated RestorePosition(pos int32) to restore l.pos and reset l.err.
  • Removed lexerPosition struct definition.
  • Removed unused atEnd and done fields from lexer.

@dmitriplotnikov
dmitriplotnikov merged commit cae26dc into master Sep 17, 2026
13 checks passed
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.

2 participants