struct FailA structured parser diagnostic with stable code, message, and blame range.
expected is populated only when a concrete token kind enables conservative editor fixes such as inserting a missing delimiter or else. A negative start denotes synthesized syntax with no forgeable source location.
Properties
let code: String
The stable diagnostic or failure code.
let message: String
A human-readable description of the failure.
let start: Int
The diagnostic's source position (-1 = none): the offending token or construct, feeding editor ranges and quick fixes.
let end: Int
The exclusive ending byte offset in the source.
let expected: TokenKind?
For unexpected-token diagnostics: the kind the parser wanted (delimiter- and else-insertion quick fixes key on it).