method make
1 | class Match |
1.1 | (Match) method make |
Documentation for method make
assembled from the following types:
class Match
From Match
(Match) method make
Defined as
method make(Match: Mu )sub make(Mu )
Sets the .ast
attribute, which will be retrieved using .made
.
$/.make("your payload here");
That is, it stores an arbitrary payload into the Match
object that can later be retrieved via .made
method.
This is typically used in a grammar's actions class methods, where a piece of data is stored by one method and then later retrieved by another. It's up to you what data you store. It could be a tree node, result of a calculation, or a list of values.
The sub form operates on the current Match $/
, which can be a convenient shortcut:
method my-action ($/)