Skip to content

Error objects should also contain location information #1

Description

Consider the following snippet:

{
  "one": 1
  "two": 2
}

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:

  1. the starting offset of the error
  2. the length of the bad stuff
  3. the column start of the error
  4. the line number

Metadata

Metadata

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