Skip to content

Introduce token spans #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
omdxp opened this issue May 5, 2025 · 0 comments · May be fixed by #54
Open

Introduce token spans #53

omdxp opened this issue May 5, 2025 · 0 comments · May be fixed by #54
Assignees
Labels
enhancement New feature or request

Comments

@omdxp
Copy link
Owner

omdxp commented May 5, 2025

Is your feature request related to a problem? Please describe.
Currently, our programming language only tracks line and column positions for tokens. However, this can be limiting, especially when dealing with multi-character tokens like keywords (e.g., fun). Right now, position tracking only picks the first letter, which can be misleading when identifying token locations. Additionally, some compiler errors are inaccurately positioned, making debugging more difficult than necessary.

Describe the solution you'd like
Introducing token spans would enhance positional accuracy in our language. Instead of relying solely on line and column numbers, spans would specify the start and end positions of tokens, ensuring precise representation. This improvement would also help refine compiler error locations, providing more accurate diagnostic messages.

Additional context
This change would improve both compiler error reporting and general token tracking, making debugging clearer and improving usability. By implementing token spans, we can provide better feedback to developers and enhance code analysis in our language.

@omdxp omdxp added the enhancement New feature or request label May 5, 2025
@omdxp omdxp self-assigned this May 6, 2025
@omdxp omdxp added this to fun May 6, 2025
@omdxp omdxp moved this to In progress in fun May 6, 2025
@omdxp omdxp linked a pull request May 6, 2025 that will close this issue
3 tasks
@omdxp omdxp linked a pull request May 6, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

1 participant