Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
preparations for use with arglist
  • Loading branch information
moritz committed May 5, 2012
1 parent 3b028e9 commit ff4843a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Perl6/Grammar.pm
Expand Up @@ -726,6 +726,7 @@ grammar Perl6::Grammar is HLL::Grammar {

token statement_control:sym<use> {
:my $longname;
:my $arglist;
:my $*IN_DECL := 'use';
:my $*HAS_SELF := '';
:my $*SCOPE := 'use';
Expand All @@ -751,7 +752,21 @@ grammar Perl6::Grammar is HLL::Grammar {
}
[
|| <.spacey> <arglist>
<.NYI('arglist case of use')>
{
my $ast = $<arglist>.ast;
if $ast<has_compile_time_value> {
$arglist := $ast<compile_time_value>;
}
else {
$*W.push_lexpad($/);
my $block := $*W.pop_lexpad;
$block.push($ast);
my $thunk := $*W.make_simple_code_object($block,
'Block');
$arglist := $thunk();
}

}
|| {
unless ~$<doc> && !%*COMPILING<%?OPTIONS><doc> {
if $longname {
Expand Down

0 comments on commit ff4843a

Please sign in to comment.