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

[svn:parrot] r34078 - branches/main/languages/perl6/src/parser

From:
pmichaud
Date:
December 18, 2008 12:29
Subject:
[svn:parrot] r34078 - branches/main/languages/perl6/src/parser
Message ID:
20081218202940.201CFCBA12@x12.develooper.com
Author: pmichaud
Date: Thu Dec 18 12:29:39 2008
New Revision: 34078

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

Log:
[rakudo]:  Add some comments to use_statement handling.


Modified: branches/main/languages/perl6/src/parser/actions.pm
==============================================================================
--- branches/main/languages/perl6/src/parser/actions.pm	(original)
+++ branches/main/languages/perl6/src/parser/actions.pm	Thu Dec 18 12:29:39 2008
@@ -325,6 +325,8 @@
     my $name := ~$<name>;
     my $past;
     if $name ne 'v6' && $name ne 'lib' {
+        ##  Create a loadinit node so the use module is loaded
+        ##  when this module is loaded...
         our $?BLOCK;
         $?BLOCK.loadinit().push(
             PAST::Op.new(
@@ -334,6 +336,8 @@
                 :node( $/ )
             )
         );
+        ##  ...and load it immediately to get its BEGIN semantics
+        ##  and symbols for the current compilation.
         use($name);
     }
     $past := PAST::Stmts.new( :node($/) );



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