develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35241 - branches/rvar2/languages/perl6/src/parser

From:
pmichaud
Date:
January 8, 2009 21:06
Subject:
[svn:parrot] r35241 - branches/rvar2/languages/perl6/src/parser
Message ID:
20090109050620.7ACBCCB9F9@x12.develooper.com
Author: pmichaud
Date: Thu Jan  8 21:06:19 2009
New Revision: 35241

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

Log:
[rakudo]:  Fix global * twigil.


Modified: branches/rvar2/languages/perl6/src/parser/actions.pm
==============================================================================
--- branches/rvar2/languages/perl6/src/parser/actions.pm	(original)
+++ branches/rvar2/languages/perl6/src/parser/actions.pm	Thu Jan  8 21:06:19 2009
@@ -1739,6 +1739,9 @@
 
         # If namespace qualified or has a '*' twigil, it's a package var.
         if @ns || $twigil eq '*' {
+            $twigil := '';
+            $varname := $sigil ~ $name;
+            $var.name($varname);
             $var.namespace(@ns);
             $var.scope('package');
             $var.viviself( container_itype($sigil) );
@@ -1758,9 +1761,8 @@
 
         # Until PCT has 'name' scope, we handle lexical/package lookup here.
         if $<sigil> eq '&' {
-            $var.scope('package');
             my $sym := outer_symbol($varname);
-            if $sym && $sym<scope> { $var.scope( $sym<scope> ); }
+            $var.scope( ($sym && $sym<scope>) || 'package');
         }
 
         # The ! twigil always implies attribute scope.



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