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:return to prefix:return .
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Nov 14, 2009
1 parent 0561bea commit e46c70d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/NQP/Grammar.pm
Expand Up @@ -165,10 +165,10 @@ token statement_control:sym<for> {
<xblock>
}

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

token statement_control:sym<make> {
<sym> :s
Expand Down Expand Up @@ -386,6 +386,7 @@ INIT {
NQP::Grammar.O(':prec<i=>, :assoc<right>', '%assignment');
NQP::Grammar.O(':prec<g=>, :assoc<list>, :nextterm<nulltermish>', '%comma');
NQP::Grammar.O(':prec<f=>, :assoc<list>', '%list_infix');
NQP::Grammar.O(':prec<e=>, :assoc<unary>', '%list_prefix');
}


Expand Down Expand Up @@ -479,6 +480,8 @@ 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>')> }


grammar NQP::Regex is Regex::P6Regex::Grammar {
token metachar:sym<:my> {
Expand Down

0 comments on commit e46c70d

Please sign in to comment.