Skip to content

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

[Source]

A generalization of Kleene star: will match from min to max repetitions of its child rule.

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

Implements


Constructors

create

[Source]

new ref create(
  body': RuleNode[S, D, V] ref,
  min': USize val = 0,
  action': (Action[S, D, V] val | None val) = reference,
  max': USize val = call)
: Star[S, D, V] ref^

Parameters

Returns

  • Star[S, D, V] ref^

Public Functions

action

[Source]

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

Returns


body

[Source]

fun box body()
: (this->RuleNode[S, D, V] ref | 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)