Skip to content

Commit

Permalink
Add totally awesome error message for foreach.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Apr 1, 2010
1 parent a1a04af commit b3e08f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Perl6/Grammar.pm
Expand Up @@ -371,6 +371,10 @@ token statement_control:sym<for> {
<xblock(1)>
}

token statement_control:sym<foreach> {
<sym> <.nofun> <.obs("'foreach'", "'for'")>
}

token statement_control:sym<loop> {
<sym>
[ <?[({]> <.panic: "Whitespace required after 'loop'"> ]?
Expand Down

0 comments on commit b3e08f9

Please sign in to comment.