-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error objects should also contain location information #1
Comments
Hi @aeschli, Offset and length is now part of |
PR is welcome! |
@aeschli Would you prefer a) additional (redundant) members in I tend to option a (+ making the members of Further: Should the numbers be 0-based (like in the TypeScript-API), or 1-based (like in the majority of similar language-parsing APIs)? |
Consider the following snippet:
If you run
parseTree
on it, it parses fine (which is cool), but the error that is reported has no other information than the error code. It would be nice if each error also contained the location information so they could be found in source (for example in an editor or IDE).Information that would be handy to have:
The text was updated successfully, but these errors were encountered: