Sneak peek: transformation rules using NQP #3
For expressions:
method expression($/, $key) { my $past := PAST::Op.new( node => $/, name => $<top><type>, pirop => $<top><pirop>, pasttype => $<top><pasttype>, ); # add children asts for @($/) { $past.push( $($_) ); } return $past; }