Interface TokensProvider

Expand description

A "manual" provider of tokens.

interface TokensProvider {
    getInitialState(): IState;
    tokenize(line: string, state: IState): ILineTokens;
}

Methods§

§

getInitialState(): IState

The initial state of a language. Will be the state passed in to tokenize the first line.

§

tokenize(line: string, state: IState): ILineTokens

Tokenize a line given the state at the beginning of the line.