Author: pmichaud Date: Sun Dec 2 16:15:58 2007 New Revision: 23388 Modified: branches/perl6-devel/languages/perl6/perl6.pir branches/perl6-devel/languages/perl6/src/parser/actions.pl
Log: [perl6-devel]: * Clean up $BLOCK and $aBLOCK to be $?BLOCK and @?BLOCK. Modified: branches/perl6-devel/languages/perl6/perl6.pir ============================================================================== --- branches/perl6-devel/languages/perl6/perl6.pir (original) +++ branches/perl6-devel/languages/perl6/perl6.pir Sun Dec 2 16:15:58 2007 @@ -36,7 +36,7 @@ $P1.'parseactions'($P2) $P0 = new 'ResizablePMCArray' - set_hll_global ['Perl6';'Grammar';'Actions'], '$aBLOCK', $P0 + set_hll_global ['Perl6';'Grammar';'Actions'], '@?BLOCK', $P0 .end Modified: branches/perl6-devel/languages/perl6/src/parser/actions.pl ============================================================================== --- branches/perl6-devel/languages/perl6/src/parser/actions.pl (original) +++ branches/perl6-devel/languages/perl6/src/parser/actions.pl Sun Dec 2 16:15:58 2007 @@ -9,27 +9,27 @@ method statement_block($/, $key) { ## FIXME: $?BLOCK, @?BLOCK - our $BLOCK; - our $aBLOCK; + our $?BLOCK; + our @?BLOCK; if ($key eq 'open') { - $BLOCK := PAST::Block.new( PAST::Stmts.new(), + $?BLOCK := PAST::Block.new( PAST::Stmts.new(), :blocktype('immediate'), :node($/) - ); - PIR q< $P0 = get_global '$BLOCK' >; # FIXME: @?BLOCK.unshift(...) - PIR q< $P1 = get_global '$aBLOCK' >; + ); + PIR q< $P0 = get_global '$?BLOCK' >; # FIXME: @?BLOCK.unshift(...) + PIR q< $P1 = get_global '@?BLOCK' >; PIR q< unshift $P1, $P0 >; } if ($key eq 'close') { my $past; - PIR q< $P0 = get_global '$aBLOCK' >; + PIR q< $P0 = get_global '@?BLOCK' >; PIR q< $P0 = shift $P0 >; PIR q< store_lex '$past', $P0 >; - $BLOCK := $aBLOCK[0]; + $?BLOCK := @?BLOCK[0]; $past.push($($<statementlist>)); make $past; } - PIR q< .return () >; # FIXME: shouldn't need this + PIR q< .return () >; # FIXME: ought to eliminate this somehow } @@ -74,12 +74,12 @@ method scope_declarator($/) { my $past := $( $<variable> ); my $name := $past.name(); - our $BLOCK; # FIXME: $?BLOCK - unless $BLOCK.symbol($name) { + our $?BLOCK; + unless $?BLOCK.symbol($name) { $past.isdecl(1); my $scope := 'lexical'; if (~$<declarator> eq 'our') { $scope := 'package'; } - $BLOCK.symbol($name, :scope($scope)); + $?BLOCK.symbol($name, :scope($scope)); } make $past; }