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?
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?