Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
"next()" Creates bad PIR #5
In this gist, the keyword "next" is called like a function with "next()". I'm not sure if this would be valid Perl6 or not, but the generated PIR has this snippet:
This is a PIR parse error and Parrot barfs over it.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
The cause of this issue is, as far as I can make out, that the loop control primitives are implemented as special instances of term:sym<> that generate custom PAST. When those terms are followed by a postcircumfix:sym<( )>, things go a bit pear-shaped.
I think the problem is that
A quick fix that works for me locally is to add `[ '(' ~ ')' <.arglist>]? to term:sym, but it's most likely not an ideal fix.