Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Convert statement_control:make to prefix:make .
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Nov 14, 2009
1 parent e46c70d commit 53fc7ad
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
9 changes: 9 additions & 0 deletions src/NQP/Actions.pm
Expand Up @@ -639,6 +639,15 @@ method postfix:sym<-->($/) {
:pasttype('inline') );
}

method prefix:sym<make>($/) {
make PAST::Op.new(
PAST::Var.new( :name('$/'), :scope('contextual') ),
:pasttype('callmethod'),
:name('!make'),
:node($/)
);
}


class NQP::RegexActions is Regex::P6Regex::Actions {

Expand Down
11 changes: 6 additions & 5 deletions src/NQP/Grammar.pm
Expand Up @@ -169,11 +169,11 @@ token statement_control:sym<for> {
# <sym> :s
# [ <EXPR> || <.panic: 'return requires an expression argument'> ]
#}

token statement_control:sym<make> {
<sym> :s
[ <EXPR> || <.panic: 'make requires an expression argument'> ]
}
#
#token statement_control:sym<make> {
# <sym> :s
# [ <EXPR> || <.panic: 'make requires an expression argument'> ]
#}

proto token statement_prefix { <...> }
token statement_prefix:sym<INIT> { <sym> <blorst> }
Expand Down Expand Up @@ -481,6 +481,7 @@ token infix:sym<::=> { <sym> <O('%assignment, :pasttype<bind>')> }
token infix:sym<,> { <sym> <O('%comma, :pasttype<list>')> }

token prefix:sym<return> { <sym> \s <O('%list_prefix, :pasttype<return>')> }
token prefix:sym<make> { <sym> \s <O('%list_prefix')> }


grammar NQP::Regex is Regex::P6Regex::Grammar {
Expand Down

0 comments on commit 53fc7ad

Please sign in to comment.