Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tell parser that with/without do implicit $_
  • Loading branch information
TimToady committed Oct 17, 2015
1 parent 44a7ffa commit aedaae8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Perl6/Grammar.nqp
Expand Up @@ -1381,16 +1381,16 @@ grammar Perl6::Grammar is HLL::Grammar does STD {

rule statement_control:sym<if> {
$<sym>=[if|with]<.kok>
<xblock>
<xblock($<sym>[0] eq 'with')>
[
[
| 'else'\h*'if' <.typed_panic: 'X::Syntax::Malformed::Elsif'>
| 'elif' { $/.CURSOR.typed_panic('X::Syntax::Malformed::Elsif', what => "elif") }
| $<sym>='elsif' <xblock>
| $<sym>='orwith' <xblock>
| $<sym>='orwith' <xblock(1)>
]
]*
[ 'else' <else=.pblock> ]?
[ 'else' <else=.pblock(~$<sym>[-1] ~~ /with/)> ]?
}

rule statement_control:sym<unless> {
Expand Down

0 comments on commit aedaae8

Please sign in to comment.