StyleRuleContext

data class StyleRuleContext(    val rule: StyleRule,     val programCounter: Int,     val state: StyleRuleContextState = PAUSED)

A StyleRuleContext represents the complete machine state of a running StyleRule.

Author

Todd L Smith

Constructors

Link copied to clipboard
fun StyleRuleContext(    rule: StyleRule,     programCounter: Int,     state: StyleRuleContextState = PAUSED)

Functions

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val literal: String?

The literal style classifier that the rule will attempt to match given this context, or null if the program counter is at the end of the instructionstream.

Link copied to clipboard
val normalized: StyleRuleContext

A transform of the receiver without any representational singularities. This simplifies detection of successful contexts.

Link copied to clipboard
val programCounter: Int

The zero-based nybble index of the next instruction to execute from the rule. This is relative to the based of the coded instruction stream.

Link copied to clipboard
val rule: StyleRule

The rule that generated this context.

Link copied to clipboard
val state: StyleRuleContextState