A source span produced by the FSL parser when parse(input, { locations: true }) is used. Mirrors PEG.js's native location() shape: byte offsets (0-based, half-open) plus 1-based line/column for display.
parse(input, { locations: true })
location()
offset
line
column
const [t] = parse('a -> b;', { locations: true });// t.loc === { start: { offset: 0, line: 1, column: 1 },// end: { offset: 7, line: 1, column: 8 } } Copy
const [t] = parse('a -> b;', { locations: true });// t.loc === { start: { offset: 0, line: 1, column: 1 },// end: { offset: 7, line: 1, column: 8 } }
A source span produced by the FSL parser when
parse(input, { locations: true })is used. Mirrors PEG.js's nativelocation()shape: byteoffsets (0-based, half-open) plus 1-basedline/columnfor display.