Skip to content

Simplify SavePosition/RestorePosition functions - #1470

Open
dmitriplotnikov wants to merge 1 commit into
masterfrom
simplify-lexer-save-position
Open

Simplify SavePosition/RestorePosition functions#1470
dmitriplotnikov wants to merge 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.

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