Created
May 15, 2010 10:49
-
-
Save bacek/402132 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/NQP/Grammar.pm b/src/NQP/Grammar.pm | |
index 95f590a..081d58c 100644 | |
--- a/src/NQP/Grammar.pm | |
+++ b/src/NQP/Grammar.pm | |
@@ -275,7 +275,9 @@ rule scoped($*SCOPE) { | |
| <routine_declarator> | |
} | |
-token variable_declarator { <variable> } | |
+token variable_declarator { | |
+ [ <type=.name> <.ws> ]? <variable> | |
+} | |
proto token routine_declarator { <...> } | |
token routine_declarator:sym<sub> { <sym> <routine_def> } | |
@@ -300,6 +302,7 @@ rule method_def { | |
token signature { [ [<.ws><parameter><.ws>] ** ',' ]? } | |
token parameter { | |
+ [ <type=.name> <.ws> ]? | |
[ | |
| $<quant>=['*'] <param_var> | |
| [ <param_var> | <named_param> ] $<quant>=['?'|'!'|<?>] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment