Single[S: (Any #read & Equatable[S]), optional D: Any #share, optional V: Any #share]¶
Matches a single item. If given a list of possibilities, will only succeed if it matches one of them. Otherwise, it succeeds for any single item.
class ref Single[S: (Any #read & Equatable[S]), optional D: Any #share, optional V: Any #share] is
RuleNode[S, D, V] ref
Implements¶
- RuleNode[S, D, V] ref
Constructors¶
create¶
new ref create(
expected': ReadSeq[S] val = array,
action': (Action[S, D, V] val | None val) = reference)
: Single[S, D, V] ref^
Parameters¶
Returns¶
- Single[S, D, V] ref^
Public Functions¶
action¶
Returns¶
call¶
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)