Skip to content

Conversation

@ThinkRedstone
Copy link

This PR adds a new type of parser error, SpannedParserError, which includes the span of the token which raised the error.
In terms of simply displaying the error via to_string or Display, nothing has changed, but if the error is handled by a more complicated system it can get the actual span of the error- to for example underline the relevant part of the statement in red or otherwise highlight it.

This new type of error has been implemented for most parser errors, specifically all errors raised via parser_err! plus a few extra.

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.

1 participant