public static of( mode as LexicalMode = LexicalMode.NORMAL, delimiter as String = "", isRaw as Boolean = false, isFormatted as Boolean = false, interpolationDepth as Int = 0, queryIndent as Int = -1, fenceLanguage as String = "" ) as LexicalState
Returns the canonical state, reusing LexicalState.NORMAL when all fields match the default state.
| Parameter | Description |
|---|---|
mode | Active lexical mode. |
delimiter | Expected closing delimiter. |
isRaw | Whether escape sequences are disabled. |
isFormatted | Whether string interpolation is active. |
interpolationDepth | Current interpolation brace nesting level. |
queryIndent | Active Klyn query: block indentation, or -1. |
fenceLanguage | Active Markdown fence language, or "". |
A LexicalState instance (or LexicalState.NORMAL).
import klyn.code s = LexicalState.of(LexicalMode.NORMAL) assert s.isNormal()