Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow adverbs inside the first part of a ternary
You will probably still need to parenthesize the expression to avoid:
  Precedence of :v is too loose to use inside ?? !!; please parenthesize
but now you can at least make it work.
  • Loading branch information
lizmat committed Apr 17, 2015
1 parent 1e08477 commit c30f235
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Perl6/Grammar.nqp
Expand Up @@ -4264,7 +4264,6 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
<EXPR('j=')>
[ '!!'
|| <?before '::' <-[=]>> { self.typed_panic: "X::Syntax::ConditionalOperator::SecondPartInvalid", second-part => "::" }
|| <?before ':' <-[=]>> { self.typed_panic: "X::Syntax::ConditionalOperator::SecondPartInvalid", second-part => ":" }
|| <infixish> { self.typed_panic: "X::Syntax::ConditionalOperator::PrecedenceTooLoose", operator => ~$<infixish> }
|| <?{ ~$<EXPR> ~~ / '!!' / }> { self.typed_panic: "X::Syntax::ConditionalOperator::SecondPartGobbled" }
|| <?before \N*? [\n\N*?]? '!!'> { self.typed_panic: "X::Syntax::Confused", reason => "Confused: Bogus code found before the !! of conditional operator" }
Expand Down

0 comments on commit c30f235

Please sign in to comment.