Perl 6 on Parrot Rakudo Perl - Perl 6 on Parrot #35

Example: if_stmt (cont'd)

rule if_stmt { 'if' <expression> 'then' <statement> {*} }

...

method if_stmt($/) {
    my $past := PAST::Op.new( $($<expression>),
                              $($<statement>),
                              :pasttype('if') );
    make $past;
}
continued...
Copyright © 2008 Patrick Michaud