Skip to content

Rule

Rule declares an identifier, description, variables, and match statements.

new Rule(sourceIdValue): Rule

constructor associates the rule with its source identifier.

number

Rule

addMatch(value): void

addMatch adds a match to the rule.

Match

void


addVariable(value): void

addVariable adds a variable to the rule.

Variable

void


addVariables(values): void

addVariables adds variables to the rule in order.

Variable[]

void


description(): ValueString

description returns the rule description when set.

ValueString


explanationOutputRule(): Rule

explanationOutputRule copies this rule using explanation expressions as outputs.

Rule


id(): ValueString

id returns the rule identifier when set.

ValueString


matches(): Match[]

matches returns the ordered match declarations.

Match[]


semantic(): RuleSemantic

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

RuleSemantic


setDescription(value): void

setDescription configures the rule description.

ValueString

void


setId(value): void

setId configures the rule identifier.

ValueString

void


setSemantic(value): void

setSemantic configures how the rule combines the outcomes of its choices.

RuleSemantic

void


sourceId(): number

sourceId returns the source identifier associated with the rule.

number


variables(): Variable[]

variables returns the ordered variable declarations.

Variable[]