Class: ParseError
Defined in: parser/index.ts:28
Thrown for syntax errors or edge-direction violations.
Implements the structured GvError contract: location is primary; line/column are convenience getters that delegate to it.
Extends
Error
Implements
Constructors
Constructor
ts
new ParseError(
message: string,
code: GvErrorCode,
location: {
column: number;
line: number;
offset?: number;
},
expected?: Expectation[]): ParseError;Defined in: parser/index.ts:35
Parameters
message
string
code
location
column
number
line
number
offset?
number
expected?
Expectation[]
Returns
ParseError
Overrides
ts
Error.constructorProperties
code
ts
readonly code: GvErrorCode;Defined in: parser/index.ts:30
Stable i18n key.
Implementation of
expected?
ts
readonly optional expected?: Expectation[];Defined in: parser/index.ts:33
Peggy's discriminated union, passed through unmapped; SYNTAX_* only.
Implementation of
friendlyMessage
ts
readonly friendlyMessage: string;Defined in: parser/index.ts:31
Approachable, non-localized English (delivery).
Implementation of
location
ts
readonly location: {
column: number;
line: number;
offset?: number;
};Defined in: parser/index.ts:32
Real error position; the highest-value field.
column
ts
column: number;line
ts
line: number;offset?
ts
optional offset?: number;Implementation of
type
ts
readonly type: "syntax" = 'syntax';Defined in: parser/index.ts:29
Implementation of
Accessors
column
Get Signature
ts
get column(): number;Defined in: parser/index.ts:53
Returns
number
line
Get Signature
ts
get line(): number;Defined in: parser/index.ts:49
Returns
number