From 08a765d71271b3294422c70f7d1c5f9307583a0b Mon Sep 17 00:00:00 2001 From: pmichaud Date: Sat, 15 May 2010 07:48:19 -0500 Subject: [PATCH] Add typename parsing to variable declarations. (The typenames don't do anything yet, we just ignore them after parsing.) --- src/NQP/Actions.pm | 4 ++++ src/NQP/Grammar.pm | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/src/NQP/Actions.pm b/src/NQP/Actions.pm index bc61c0f..020b45a 100644 --- a/src/NQP/Actions.pm +++ b/src/NQP/Actions.pm @@ -365,6 +365,10 @@ method scope_declarator:sym($/) { make $.ast; } method scope_declarator:sym($/) { make $.ast; } method scoped($/) { + make $.ast; +} + +method declarator($/) { make $ ?? $.ast !! $.ast; diff --git a/src/NQP/Grammar.pm b/src/NQP/Grammar.pm index 95f590a..4f89679 100644 --- a/src/NQP/Grammar.pm +++ b/src/NQP/Grammar.pm @@ -271,6 +271,13 @@ token scope_declarator:sym { } token scope_declarator:sym { } rule scoped($*SCOPE) { + | + | + # eventually +} + +token typename { } + +token declarator { | | }