Skip to content

Commit

Permalink
old NQP is gone, use the new one
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed May 28, 2010
1 parent 4df1b40 commit d0904c9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions gil/parser/actions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ class gil::Grammar::Actions;
method TOP($/) {
my $past := PAST::Block.new( :blocktype('declaration'), :node( $/ ) );
for $<statement> {
$past.push( $( $_ ) );
$past.push( $_.ast );
}
make $past;
}


method statement($/, $key) {
make $( $/{$key} );
make $/{$key}.ast;
}

method term($/, $key) {
make $( $/{$key} );
make $/{$key}.ast;
}

method funcall($/) {
my $past := PAST::Op.new( :name(~$<fname>), :pasttype('call'), :node( $/ ) );
for $<EXPR> {
$past.push( $( $_ ) );
$past.push( $_.ast );
}
make $past;
}


method value($/, $key) {
make $( $/{$key} );
make $/{$key}.ast;
}


Expand All @@ -62,13 +62,13 @@ method integer($/) {


method quote($/) {
make PAST::Val.new( :value( $($<string_literal>) ), :node($/) );
make PAST::Val.new( :value( $<string_literal>.ast ), :node($/) );
}


method EXPR($/, $key) {
if ($key eq 'end') {
make $($<expr>);
make $<expr>.ast;
}
else {
my $past := PAST::Op.new( :name($<type>),
Expand All @@ -78,7 +78,7 @@ method EXPR($/, $key) {
:node($/)
);
for @($/) {
$past.push( $($_) );
$past.push( $_.ast );
}
make $past;
}
Expand Down

0 comments on commit d0904c9

Please sign in to comment.