Why do most (at least JS) parsers restrict syntax errors to a single position? eg. only a single column/line, rather than having a range of start/end? The errors would be a lot richer.
-
-
Replying to @sebmck
I’ve always assumed it was bc once they encountered that error they couldn’t parse the rest of the document and find the end position. Might be a naive take on it though.
2 replies 0 retweets 0 likes
Replying to @ZTHall
You could at least point to the start/end of the token rather than just the start. There's also parser errors that aren't necessarily due to a syntax error, but an invalid AST, where an error could be even more detailed with it's position.
12:58 PM - 19 Apr 2019
0 replies
0 retweets
2 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 