CodeHighlighter

Implements syntax highlighting for CodeInput. Warning: This API is unstable and might change without warning.

Members

Functions

nextTokenName
const(char)[] nextTokenName(CodeToken index)

Get a name for the token at given index. Returns null if there isn't a token at given index. Indices must be sequential. Starts at 1.

parse
void parse(Rope text)

Parse the given text to use with other functions in the highlighter.

query
CodeSlice query(size_t byteIndex)

Find the next important range starting with the byte at given index.

save
save(int offset)

Produce a TextStyleSlice range using the result.

Meta