Skip to content

CompiledRule

CompiledRule represents variables and match blocks associated with a rule.

new CompiledRule(sourceIdValue, idValue, variablesValue, matchesValue, semanticValue?): CompiledRule

constructor stores the compiled form of a rule.

number

ValueString

CompiledVariable[]

CompiledMatch[]

RuleSemantic = "first-match"

CompiledRule

hasOptionalOutput(): boolean

hasOptionalOutput reports whether some evaluation path may produce no value.

boolean


id(): ValueString

id returns the expression identifier associated with the rule.

ValueString


matches(): CompiledMatch[]

matches returns compiled matches associated with the rule.

CompiledMatch[]


outputType(): Type

outputType returns the output type shared by all match clauses.

Type


semantic(): RuleSemantic

semantic returns how the rule combines the outcomes of its choices.

RuleSemantic


sourceId(): number

sourceId returns the source metadata identifier associated with the rule.

number


variables(): CompiledVariable[]

variables returns compiled variables associated with the rule.

CompiledVariable[]