Open Whiteknight opened 14 years ago
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 method postcircumfix<( )>
in Actions.pm generates a call op, but it looks like term:sym$P14 = ()
code (which should really be $P14 = "foo"()
or somesuch).
A quick fix that works for me locally is to add `[ '(' ~ ')' <.arglist>]? to term:sym
http://gist.github.com/455249
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.