Open
Description
From: #15 (comment)
I feel like there will be tooling value in having this as as well
{ line: <line>, column: <column> }
on the error. Maybe before line 80 we could adderror.position = this.pos
?
Another helpful pattern I like to follow (used in node, which is good precedence I think) is to have distinct
.code
properties for these errors. If we were tooling around errors, checkingerr.code === 'EOF_ERROR
is much better thanerr.message.startsWith('unexpected token EOF at')
.