klyn.code.Tokenizer.nextLineState
method
public nextLineState(line as String, initialState as LexicalState = null) as LexicalState
Description

Computes only the end-of-line LexicalState after scanning line from initialState, without allocating TokenSpan objects when possible.

Parameters
ParameterDescription
lineSingle source line.
initialStateLexical state at the start of line, or null for LexicalState.NORMAL.
Returns

Lexical state at the end of line.

Example
import klyn.code
import klyn.code.klyn

tokenizer = KlynTokenizer()
state = tokenizer.nextLineState("/* open comment", LexicalState.NORMAL)
assert state.inBlockComment()