-
Notifications
You must be signed in to change notification settings - Fork 6
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
Change error & hover IDE msgs to 1-based index #100
Conversation
Co-authored-by: akjw <[email protected]>
We just realized that we have not tackled the other aspect of the issue, which was to use the following format:
Will continue work for now |
The |
I believe we also need to update the lexer/parser to make sure it uses 1-indexed line/column numbers. This was the case in an older version of baby-l4. I think that change would consist of simplifying the But it would be the same style we would use for converting to 0-indexed for lsp. |
With the amendments below, the tests are now passing:
|
It's a tradeoff if we want to use 1-index or not in the tests. We could always have On the other hand, we could modify the test-helpers so they do use 1-index internally and only convert between the two different types at the very edges (i.e. in a wrapper around the calls to external |
- implemented helper functions (mkRange', mkPosition) for writing the tests in a 1-indexed format for readability, and to reduce cognitive load. Co-authored-by: akjw <[email protected]>
So we pondered for a bit, and went with the first option. We implement 2 helper functions (mkRange', mkPosition) that would take 1-indexed values and convert them to 0-indexed values. Hopefully this would help decrease cognitive load when writing the tests, and also improve readability. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long. Looks good to me. Thanks!
278b32b
to
08af9d5
Compare
08af9d5
to
d3e9b1d
Compare
Fixes #72.
Co-authored-by: akjw [email protected]