Skip to content

Conversation

Techatrix
Copy link
Member

ast-gen only reports a line and column. With this PR the end position is reconstructed by finding the given source location and adding the length of the next token.
fixes #627

@llogick
Copy link
Contributor

llogick commented Sep 5, 2022

The only thing that might bite here is not taking into account the encoding of the document (not sure how likely that is )
I'm only mentioning it because I had the same idea but were gonna utilise offsets.documentPosition for the positionToIndex.

👍 stellar

Copy link
Member

@SuperAuguste SuperAuguste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oof this PR is gonna mess up my #631 I think 😅 LGTM nonetheless

@SuperAuguste SuperAuguste merged commit aa81d83 into zigtools:master Sep 6, 2022
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.

Unused argument produces 0 width diagnostic
3 participants