NGS version 0.2.17 auto-generated documentation
Documentation index
The global namespace
PatternAction type
PatternAction type
A pair of pattern and an action to execute if the pattern matches. Currently, only callable actions are supported (Fun).
Methods
=~(
x:
Any
,
pa:PatternAction
,
mc:
MatchContext
)
experimental
Source:
stdlib.ngs:1104
Undocumented
init(
pa:PatternAction
,
pattern:
Any
,
action:
Any
)
experimental
Source:
stdlib.ngs:1094
Undocumented
tr(
x:
Any
,
pa:PatternAction
,
tc:
TrContext
)
Transform x using pa::action of x matches pa::pattern. pa::action will be called with (Any, TrContext). pa::action can either return new data or perform an operation using TrContext. Currently supported operation is skip(TrContext).
Returns
Lit, TrCommand, or TrNoMatch