CompiledRule
CompiledRule represents variables and match blocks associated with a rule.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CompiledRule(
sourceIdValue,idValue,variablesValue,matchesValue,semanticValue?):CompiledRule
constructor stores the compiled form of a rule.
Parameters
Section titled “Parameters”sourceIdValue
Section titled “sourceIdValue”number
idValue
Section titled “idValue”variablesValue
Section titled “variablesValue”matchesValue
Section titled “matchesValue”semanticValue?
Section titled “semanticValue?”RuleSemantic = "first-match"
Returns
Section titled “Returns”CompiledRule
Methods
Section titled “Methods”hasOptionalOutput()
Section titled “hasOptionalOutput()”hasOptionalOutput():
boolean
hasOptionalOutput reports whether some evaluation path may produce no value.
Returns
Section titled “Returns”boolean
id():
ValueString
id returns the expression identifier associated with the rule.
Returns
Section titled “Returns”matches()
Section titled “matches()”matches():
CompiledMatch[]
matches returns compiled matches associated with the rule.
Returns
Section titled “Returns”outputType()
Section titled “outputType()”outputType():
Type
outputType returns the output type shared by all match clauses.
Returns
Section titled “Returns”Type
semantic()
Section titled “semantic()”semantic():
RuleSemantic
semantic returns how the rule combines the outcomes of its choices.
Returns
Section titled “Returns”RuleSemantic
sourceId()
Section titled “sourceId()”sourceId():
number
sourceId returns the source metadata identifier associated with the rule.
Returns
Section titled “Returns”number
variables()
Section titled “variables()”variables():
CompiledVariable[]
variables returns compiled variables associated with the rule.