Skip to content
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

[BUG] Character range is offset sometimes #30

Open
Efratror opened this issue Apr 7, 2022 · 0 comments
Open

[BUG] Character range is offset sometimes #30

Efratror opened this issue Apr 7, 2022 · 0 comments

Comments

@Efratror
Copy link

Efratror commented Apr 7, 2022

Bug:

Character positions on most language features can be offset by a few to the right. This comes from preprocessing adding a public access specifier when non is provided.

Possible solution:

Calculate the difference in string length from a line before and after preprocessing. After which the difference can be subtracted from the character position. If a access specifier is added in preprocessing the character position is offset to the correct location. If no keyword is added the lines are equal in length and no offset is required.

note: After some thought i won't be implementing this until tabs are supported (PR #29). Because it would need a refactor after merging.

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

No branches or pull requests

1 participant