klyn.code.LexicalState.of
method
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
Description

Returns the canonical state, reusing LexicalState.NORMAL when all fields match the default state.

Parameters
ParameterDescription
modeActive lexical mode.
delimiterExpected closing delimiter.
isRawWhether escape sequences are disabled.
isFormattedWhether string interpolation is active.
interpolationDepthCurrent interpolation brace nesting level.
queryIndentActive Klyn query: block indentation, or -1.
fenceLanguageActive Markdown fence language, or "".
Returns

A LexicalState instance (or LexicalState.NORMAL).

Example
import klyn.code

s = LexicalState.of(LexicalMode.NORMAL)
assert s.isNormal()