Optionaltoken: TokenOptionaloptions: ErrorOptionsReadonlycodeStable programmatic identifier for the failure. Branch on this rather
than on message, which is free to change between releases.
ReadonlypositionZero-based UTF-16 offset in the notation where parsing failed.
ReadonlytokenThe token the parser was looking at. undefined when the failure is not
anchored to a token — currently only UNEXPECTED_END, raised when the
input stops short.
Error thrown when the parser encounters invalid syntax.
positionis a zero-based UTF-16 offset into the notation. It is deliberately absent frommessage— read it from the field, or uniformly across all roll-parser errors viagetErrorSpan.Example