From 53fc7ad49c85599dc679ef1398dff4806c8c14da Mon Sep 17 00:00:00 2001 From: pmichaud Date: Fri, 13 Nov 2009 23:19:53 -0600 Subject: [PATCH] Convert statement_control:make to prefix:make . --- src/NQP/Actions.pm | 9 +++++++++ src/NQP/Grammar.pm | 11 ++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/NQP/Actions.pm b/src/NQP/Actions.pm index d7b2df5..d3a36b0 100644 --- a/src/NQP/Actions.pm +++ b/src/NQP/Actions.pm @@ -639,6 +639,15 @@ method postfix:sym<-->($/) { :pasttype('inline') ); } +method prefix:sym($/) { + make PAST::Op.new( + PAST::Var.new( :name('$/'), :scope('contextual') ), + :pasttype('callmethod'), + :name('!make'), + :node($/) + ); +} + class NQP::RegexActions is Regex::P6Regex::Actions { diff --git a/src/NQP/Grammar.pm b/src/NQP/Grammar.pm index da757d7..68d015f 100644 --- a/src/NQP/Grammar.pm +++ b/src/NQP/Grammar.pm @@ -169,11 +169,11 @@ token statement_control:sym { # :s # [ || <.panic: 'return requires an expression argument'> ] #} - -token statement_control:sym { - :s - [ || <.panic: 'make requires an expression argument'> ] -} +# +#token statement_control:sym { +# :s +# [ || <.panic: 'make requires an expression argument'> ] +#} proto token statement_prefix { <...> } token statement_prefix:sym { } @@ -481,6 +481,7 @@ token infix:sym<::=> { ')> } token infix:sym<,> { ')> } token prefix:sym { \s ')> } +token prefix:sym { \s } grammar NQP::Regex is Regex::P6Regex::Grammar {