Skip to content

Instantly share code, notes, and snippets.

@mlschroe
Created August 1, 2011 13:55
Show Gist options
  • Save mlschroe/1118161 to your computer and use it in GitHub Desktop.
Save mlschroe/1118161 to your computer and use it in GitHub Desktop.
--- src/Perl6/Actions.pm.orig 2011-08-01 11:05:44.000000000 +0000
+++ src/Perl6/Actions.pm 2011-08-01 13:36:00.000000000 +0000
@@ -708,6 +708,7 @@ class Perl6::Actions is HLL::Actions {
method statement_control:sym<CATCH>($/) {
my $block := $<block>.ast;
+ ($*ST.cur_lexpad())[0].pop;
push_block_handler($/, $*ST.cur_lexpad(), $block<past_block>);
$*ST.cur_lexpad().handlers()[0].handle_types_except('CONTROL');
make PAST::Var.new( :name('Nil'), :scope('lexical') );
@@ -715,6 +716,7 @@ class Perl6::Actions is HLL::Actions {
method statement_control:sym<CONTROL>($/) {
my $block := $<block>.ast;
+ ($*ST.cur_lexpad())[0].pop;
push_block_handler($/, $*ST.cur_lexpad(), $block<past_block>);
$*ST.cur_lexpad().handlers()[0].handle_types('CONTROL');
make PAST::Var.new( :name('Nil'), :scope('lexical') );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment