On Sat Apr 16 05:37:53 2011, masak wrote: > <masak> awww. > <masak> who would have guessed, declaring a sub infix:<;> causes problems... > <masak> rakudo: our sub infix:<;>($lhs, $rhs) {}; { say "A"; say "B" } > <p6eval> rakudo 5ac05e: ( no output ) > <masak> :( > <masak> rakudo: our sub infix:<;>($lhs, $rhs) { say $lhs, $rhs }; 1; 2; 3 > <p6eval> rakudo 5ac05e: OUTPUT«infix:<;>1Bool::True2Bool::True3» > <masak> I believe this is backwards. the stopper ';' should take > precedence over any declared infixes, unless we're inside a > parenthetical thingy. > * masak submits rakudobug
<jnthn> What does STD think? <jnthn> std: sub infix:<;>($, $) {}; { say "A"; say "B" } <p6eval> std 4608239: OUTPUT«ok 00:01 122m» <jnthn> I'm thinking that example doesn't force it to reveal what it's parsing that ; as though <jnthn> And wondering how to construct one that does :) <colomon> without executing the code, I can't see how to do it. <jnthn> oh, maybe you can do it with statement modifiers <jnthn> std: sub infix:<;>($, $) {}; { say "A" if 1; say "B" if 1; } <p6eval> std 4608239: OUTPUT«ok 00:01 122m» <jnthn> I expect that'd fail if the ; wasn't being parsed as a statement sep there. <masak> jnthn++ * masak submits rakudobug <jnthn> You already did submit the Rakudo bug! :P <masak> apparently I'm getting senile. <masak> ok, I'll just amend that ticket, then. <colomon> std: (say "A" if 1) + 10 <p6eval> std 4608239: OUTPUT«ok 00:01 121m» <colomon> jnthn: are you sure? <masak> colomon: yes, it's the 'if' twice that makes it work. <jnthn> std: say "A" if 1 + say "B" if 1 <p6eval> std 4608239: OUTPUT«[31m===[0mSORRY![31m===[0mConfused [...] FAILED 00:01 120m»