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

Replace error.offset with error.pos: [number, number] #260

Merged
merged 1 commit into from
Apr 18, 2021
Merged

Conversation

eemeli
Copy link
Owner

@eemeli eemeli commented Apr 18, 2021

Fixes #254

BREAKING CHANGE: In addition to dropping error.offset, the shape of error.linePos is changed to a matching tuple of { line, col } values.

Also, the first parts of anchor & tag resolution are moved down from resolveProps(), to allow the remaining parts of tag resolution to blame the tag when they fail.

For many errors, it's still impossible or unwieldy to determine their full position range, so their ranges get assigned as [n, n+1].

BREAKING CHANGE: In addition to dropping `error.offset`, the shape
of `error.linePos` is changed to a matching tuple of `{ line, col }`
values.
@eemeli eemeli merged commit 89119ee into master Apr 18, 2021
@eemeli eemeli deleted the error-ends branch April 18, 2021 08:23
eemeli added a commit that referenced this pull request Apr 18, 2021
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.

Add Ranges to Error
1 participant