getTokensBeforeCursor

getTokensBeforeCursor
(
const(ubyte[]) sourceCode
,,
ref StringCache cache
,
out const(Token)[] tokenArray
)

Parameters

sourceCode
Type: const(ubyte[])

the source code of the file being edited

cursorPosition
Type: size_t

the cursor position in bytes

Return Value

Type: auto

a sorted range of tokens before the cursor position

Meta