calc example -- src/parser/actions.pm
class Calc::Grammar::Actions; method TOP($/) { make PAST::Op.new( $<statement>.ast, :pirop('say') ); } method statement($/) { make PAST::Op.new( $<term>[0].ast, $<term>[1].ast, :pirop('add') ); } method term($/) { make PAST::Val.new( :value(+$/) ); }