On Tue, May 06, 2008 at 11:35:20PM -0700, Stephen Weeks wrote:
> Both rakudo's grammar and STD.pm have this line in token methodop:
>
> | ':' <?before \s> <!{ $+inquote }> <EXPR(%list_prefix)>
>
> t/spec/S29-list/minmax.t has the following parse failure in a few places,
> though:
>
> is @array.min:{ $^a <=> $^b }, -9,
>
> This doesn't parse because there's no whitespace after the :
According to TimToady on #perl6, :{ $^a <=> $^b} is an
adverbial block (see S02).
So, I'm guessing the :{...} should be parsed by the
<postcircumfix> option of the <colonpair> rule:
token colonpair {
':'
[
| '!' <ident> {*} #= false
| <ident> $<val>=[ <.unsp>? <postcircumfix> ]? {*} #= value
| <postcircumfix> {*} #= structural
| <sigil> <twigil>? <desigilname> {*} #= varname
]
}
We may still need to find out what causes the parsefail in
Rakudo, though.
Pm