Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add statement_prefix:sym<sink>.
  • Loading branch information
pmichaud committed Jun 26, 2010
1 parent d401972 commit 2334011
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Perl6/Actions.pm
Expand Up @@ -547,6 +547,16 @@ method statement_prefix:sym<gather>($/) {
make PAST::Op.new( :pasttype('call'), :name('!GATHER'), $past );
}

method statement_prefix:sym<sink>($/) {
my $blast := $<blorst>.ast;
$blast.blocktype('immediate');
make PAST::Stmts.new(
PAST::Op.new( :name('&eager'), $blast ),
PAST::Op.new( :name('&Nil') ),
:node($/)
);
}

method statement_prefix:sym<try>($/) {
my $block := $<blorst>.ast;
$block.blocktype('immediate');
Expand Down
1 change: 1 addition & 0 deletions src/Perl6/Grammar.pm
Expand Up @@ -478,6 +478,7 @@ token statement_prefix:sym<BEGIN> { <sym> <blorst> }
token statement_prefix:sym<CHECK> { <sym> <blorst> }
token statement_prefix:sym<INIT> { <sym> <blorst> }
token statement_prefix:sym<END> { <sym> <blorst> }
token statement_prefix:sym<sink> { <sym> <blorst> }
token statement_prefix:sym<try> { <sym> <blorst> }
token statement_prefix:sym<gather>{ <sym> <blorst> }
token statement_prefix:sym<do> { <sym> <blorst> }
Expand Down

0 comments on commit 2334011

Please sign in to comment.