Created
December 15, 2010 15:50
-
-
Save uasi/742122 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Perl6/Grammar.pm b/src/Perl6/Grammar.pm | |
index 93b73c0..5f0c8b2 100644 | |
--- a/src/Perl6/Grammar.pm | |
+++ b/src/Perl6/Grammar.pm | |
@@ -860,8 +860,9 @@ rule package_def { | |
$/.CURSOR.panic('This appears to be Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6 style package block like "package Foo { ... }", or "module Foo; ...".'); | |
} | |
} | |
+ { $*IN_DECL := '' } | |
<statementlist> | |
- || <?[{]> <blockoid> | |
+ || <?[{]> { $*IN_DECL := '' } <blockoid> | |
|| <.panic: 'Malformed package declaration'> | |
] | |
} | |
@@ -1188,6 +1189,7 @@ token type_declarator:sym<subset> { | |
[ | |
[ | |
[ <longname> { $/.CURSOR.add_name($<longname>[0].Str); } ]? | |
+ { $*IN_DECL := '' } | |
<trait>* | |
[ where <EXPR('e=')> ]? | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See uasi/rakudo@97a19d2