Enhance Lexer to Attach Span Positions to Tokens #6
Labels
No labels
Epic
GHA
Release
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
major
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
NiXTheDev/Ogex#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal: Improve error messages by tracking the exact source location of each token.
Currently, the lexer in
lexer.rslikely produces tokens without position information. This makes it impossible to report errors with precise locations.Proposed Change:
Tokenstruct that contains the token kind and aSpan(start..end).error.rs, use these spans to createSpannedErrorinstances.Example:
Implementation Steps:
Benefits: