klyn.code.LexicalState.equalsState
method
public equalsState(other as LexicalState) as Boolean
Description

Compares all fields of this state with another LexicalState for value equality.

Editors use equalsState to stop incremental state propagation as soon as a line's end state matches its previously cached state.

Parameters
ParameterDescription
otherAnother LexicalState to compare against.
Returns

true when both states are identical.

Example
import klyn.code

s1 = LexicalState(LexicalMode.MARKUP_COMMENT, "-->")
s2 = LexicalState(LexicalMode.MARKUP_COMMENT, "-->")
assert s1.equalsState(s2)