develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34549 - branches/rvar/languages/perl6/src/parser

From:
pmichaud
Date:
December 28, 2008 21:56
Subject:
[svn:parrot] r34549 - branches/rvar/languages/perl6/src/parser
Message ID:
20081229055621.E3472CB9FA@x12.develooper.com
Author: pmichaud
Date: Sun Dec 28 21:56:21 2008
New Revision: 34549

Modified:
   branches/rvar/languages/perl6/src/parser/actions.pm

Log:
[rakudo]:  Fix up symbol table handling a bit.


Modified: branches/rvar/languages/perl6/src/parser/actions.pm
==============================================================================
--- branches/rvar/languages/perl6/src/parser/actions.pm	(original)
+++ branches/rvar/languages/perl6/src/parser/actions.pm	Sun Dec 28 21:56:21 2008
@@ -920,7 +920,7 @@
         $?SIGNATURE := PAST::Op.new( :pasttype('stmts'), :node($/) );
         $?SIGNATURE_BLOCK := PAST::Block.new( $?SIGNATURE,
                                               :blocktype('declaration') );
-        $?SIGNATURE_BLOCK.symbol( '!signature', :defined(1) );
+        $?SIGNATURE_BLOCK.symbol( '!signature', :force(1) );
         @?BLOCK.unshift($?SIGNATURE_BLOCK);
     }
     else {
@@ -1000,7 +1000,7 @@
 method parameter($/) {
     our $?SIGNATURE_BLOCK;
     my $past   := $( $<param_var> );
-    my $symbol := $?SIGNATURE_BLOCK.symbol( $past.name() );
+    my $symbol := $?SIGNATURE_BLOCK.symbol($past.name(), :force(1));
     my $sigil  := $<param_var><sigil>;
     my $quant  := $<quant>;
 
@@ -1088,7 +1088,7 @@
     ##  Declare symbol as lexical in current (signature) block.
     ##  This is needed in case any post_constraints try to reference
     ##  this new param_var.
-    $?SIGNATURE_BLOCK.symbol( $name , :scope('lexical') );
+    $?SIGNATURE_BLOCK.symbol( $name, :scope('lexical') );
 }
 
 
@@ -1733,8 +1733,7 @@
             $past.lvalue(1);
         }
         our $?BLOCK;
-        my $symbol := $?BLOCK.symbol( $past.name() );
-        $symbol<scope> := $scope;
+        my $symbol := $?BLOCK.symbol( $past.name(), :scope($scope) );
         $past.viviself( $symbol<viviself> );
         if $symbol<type> {
             $past := PAST::Op.new( :pirop('setprop'), 
@@ -1754,7 +1753,7 @@
         $past := $( $<multi_declarator> );
         if $past.isa(PAST::Var) {
             our $?BLOCK;
-            my $symbol := $?BLOCK.symbol( $past.name() );
+            my $symbol := $?BLOCK.symbol($past.name(), :force(1));
             my $type := $symbol<type>;
             for @($<fulltypename>) {
                 $type.push( $( $_ ) );



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About