Skip to content

Errors in structured form? #541

Answered by Mingun
mmontone asked this question in Q&A
Discussion options

You must be logged in to vote

Emm?? Errors always was in structured form:

peggy/lib/peg.d.ts

Lines 639 to 675 in 4036dab

/** Thrown if the grammar contains a syntax error. */
class SyntaxError extends Error {
/** Location where error was originated. */
public location: LocationRange;
/**
* List of possible tokens in the parse position, or `null` if error was
* created by the `error()` call.
*/
public expected: Expectation[] | null;
/**
* Character in the current parse position, or `null` if error was created
* by the `error()` call.
*/
public found: string | null;
/**
* Format the error with associated sources.…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by hildjj
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants