Skip to content

Disj[S: (Any #read & Equatable[S]), optional D: Any #share, optional V: Any #share]

[Source]

Matches one out of a list of possible alternatives. Tries each alternative in order. If one alternative fails, but an outer rule later fails, will not backtrack to another alternative.

class ref Disj[S: (Any #read & Equatable[S]), optional D: Any #share, optional V: Any #share] is
  RuleNodeWithChildren[S, D, V] ref

Implements


Constructors

create

[Source]

new ref create(
  children': Array[RuleNode[S, D, V] ref] ref,
  action': (Action[S, D, V] val | None val) = reference)
: Disj[S, D, V] ref^

Parameters

Returns

  • Disj[S, D, V] ref^

Public Functions

children

[Source]

fun box children()
: this->Seq[RuleNode[S, D, V] ref] ref

Returns


action

[Source]

fun box action()
: (Action[S, D, V] val | None val)

Returns


call

[Source]

fun box call(
  depth: USize val,
  loc: Loc[S] val)
: (_BindFrame[S, D, V] ref | _CondFrame[S, D, V] ref | _ConjFrame[S, D, V] ref | 
    _DisjFrame[S, D, V] ref | _ErrorFrame[S, D, V] ref | _LiteralFrame[S, D, V] ref | 
    _LookFrame[S, D, V] ref | _NamedRuleFrame[S, D, V] ref | _NegFrame[S, D, V] ref | 
    _SingleFrame[S, D, V] ref | _StarFrame[S, D, V] ref)

Parameters

Returns

  • (_BindFrame[S, D, V] ref | _CondFrame[S, D, V] ref | _ConjFrame[S, D, V] ref | _DisjFrame[S, D, V] ref | _ErrorFrame[S, D, V] ref | _LiteralFrame[S, D, V] ref | _LookFrame[S, D, V] ref | _NamedRuleFrame[S, D, V] ref | _NegFrame[S, D, V] ref | _SingleFrame[S, D, V] ref | _StarFrame[S, D, V] ref)