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($/) );