Permalink
Browse files

track current packages in @*PACKAGES

we will need it for exporting from nested packages
  • Loading branch information...
1 parent 632b1f9 commit 40547d68e1b9838402588723f4eb548f9ba0a403 @moritz moritz committed May 8, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Perl6/Grammar.pm
View
@@ -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 := [];
@@ -1398,6 +1400,7 @@ grammar Perl6::Grammar is HLL::Grammar {
}
}
+ { nqp::push(@*PACKAGES, $*PACKAGE); }
[
|| <?[{]>
[
@@ -1431,6 +1434,7 @@ grammar Perl6::Grammar is HLL::Grammar {
]
|| <.panic: "Unable to parse $*PKGDECL definition">
]
+ { nqp::pop(@*PACKAGES); }
] || { $/.CURSOR.malformed($*PKGDECL) }
}

0 comments on commit 40547d6

Please sign in to comment.