Interface: OsfqlToken
@kortexya/reasoninglayer / OsfqlToken
Interface: OsfqlToken
Section titled “Interface: OsfqlToken”Defined in: src/types/osfql.ts:1219
One highlighted span of OSFQL source.
Remarks
Section titled “Remarks”Positions are zero-based and in UTF-16 code units, the unit of a
JavaScript string index, so line and startChar address the source as
source.split('\n')[line].slice(startChar, startChar + length). A token
never crosses a line boundary.
Example
Section titled “Example”const token: OsfqlToken = { line: 0, startChar: 0, length: 5, kind: 'keyword' };Properties
Section titled “Properties”kind:
OsfqlTokenKind
Defined in: src/types/osfql.ts:1227
The token class.
length
Section titled “length”length:
number
Defined in: src/types/osfql.ts:1225
UTF-16 length.
line:
number
Defined in: src/types/osfql.ts:1221
Zero-based line.
startChar
Section titled “startChar”startChar:
number
Defined in: src/types/osfql.ts:1223
Zero-based UTF-16 column.