public LineScanResult(spans as ArrayList<TokenSpan>, endState as LexicalState = null)
Constructs a line scan result from a list of spans and an end-of-line state.
| Parameter | Description |
|---|---|
spans | Ordered token spans covering the scanned line. |
endState | Lexical state at the end of the line. |
import klyn.code res = LineScanResult([TokenSpan(0, 3, TokenKind.KEYWORD)], LexicalState.NORMAL) assert res.spans.size == 1