Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
track current packages in @*PACKAGES
we will need it for exporting from nested packages
  • Loading branch information
moritz committed May 8, 2012
1 parent 632b1f9 commit 40547d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Perl6/Grammar.pm
Expand Up @@ -421,6 +421,8 @@ grammar Perl6::Grammar is HLL::Grammar {
:my $*UNIT;
:my $*UNIT_OUTER;
:my $*EXPORT;
# stack of packages, which the 'is export' needs
:my @*PACKAGES := [];

# A place for Pod
:my $*POD_BLOCKS := [];
Expand Down Expand Up @@ -1398,6 +1400,7 @@ grammar Perl6::Grammar is HLL::Grammar {
}
}

{ nqp::push(@*PACKAGES, $*PACKAGE); }
[
|| <?[{]>
[
Expand Down Expand Up @@ -1431,6 +1434,7 @@ grammar Perl6::Grammar is HLL::Grammar {
]
|| <.panic: "Unable to parse $*PKGDECL definition">
]
{ nqp::pop(@*PACKAGES); }
] || { $/.CURSOR.malformed($*PKGDECL) }
}

Expand Down

0 comments on commit 40547d6

Please sign in to comment.