public nextLineState(line as String, initialState as LexicalState = null) as LexicalState
Computes only the end-of-line LexicalState after scanning line from initialState, without allocating TokenSpan objects when possible.
| Parameter | Description |
|---|---|
line | Single source line. |
initialState | Lexical state at the start of line, or null for LexicalState.NORMAL. |
Lexical state at the end of line.
import klyn.code
import klyn.code.klyn
tokenizer = KlynTokenizer()
state = tokenizer.nextLineState("/* open comment", LexicalState.NORMAL)
assert state.inBlockComment()