Skip to content

Proper source locations for parser errors. #3874

@ekpyron

Description

@ekpyron

Parser errors currently use the current scanner position as both start and end of their source location.
I think it may be beneficial to change that towards using the whole range of the current token as error location.
Most parser errors will have the form "expected something, but got another thing" and I think it makes sense to mark the other thing in the error entirely. And it will make it easier to identify the error locations in the interactive testing tool.

Comments?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions