Created
February 11, 2010 21:35
-
-
Save masak/301987 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
$ git diff | |
diff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm | |
index e0612b2..7c58e28 100644 | |
--- a/src/Perl6/Actions.pm | |
+++ b/src/Perl6/Actions.pm | |
@@ -467,6 +467,7 @@ method term:sym<scope_declarator>($/) { make $<scope_declarator>.ast; } | |
method term:sym<routine_declarator>($/) { make $<routine_declarator>.ast; } | |
method term:sym<multi_declarator>($/) { make $<multi_declarator>.ast; } | |
method term:sym<regex_declarator>($/) { make $<regex_declarator>.ast; } | |
+method term:sym<type_declarator>($/) { make $<type_declarator>.ast; } | |
method term:sym<statement_prefix>($/) { make $<statement_prefix>.ast; } | |
method term:sym<lambda>($/) { make create_code_object($<pblock>.ast, 'Block', 0, ''); } | |
diff --git a/src/Perl6/Grammar.pm b/src/Perl6/Grammar.pm | |
index e0d5fd0..5d74799 100644 | |
--- a/src/Perl6/Grammar.pm | |
+++ b/src/Perl6/Grammar.pm | |
@@ -533,7 +533,7 @@ token declarator { | |
| '(' ~ ')' <signature> <trait>* | |
| <routine_declarator> | |
| <regex_declarator> | |
-# | <type_declarator> | |
+ | <type_declarator> | |
] | |
} | |
@@ -738,6 +738,14 @@ rule regex_declarator { | |
] | |
} | |
+proto token type_declarator { <...> } | |
+ | |
+token type_declarator:sym<enum> { | |
+ <sym> <.ws> | |
+ <name>? <.ws> | |
+ <?before '(' | '<' | '<<' | '«' > <circumfix> | |
+} | |
+ | |
rule trait { | |
:my $*IN_DECL := ''; | |
[ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment