Action methods
class Calc::Grammar::Actions; method integer($/) { say("found an integer", $/); } method addop($/) { say("found an addop", $/); }
In Perl 6, $/ is the standard variable for storing the results of a regex match.
The results of a regex match is a Match object.
The boolean value of a Match object is true if the regex succeeded
The string value of a Match object is the text that was matched