Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #130069] [BUG] Unknown QAST error when creating List of Pairs

1 view
Skip to first unread message

Jan-Olof Hendig via RT

unread,
May 12, 2019, 1:30:48 PM5/12/19
to josh...@gmail.com
On Thu, 04 May 2017 17:36:32 -0700, cp...@zoffix.com wrote:
> On Thu, 10 Nov 2016 21:03:43 -0800, josh...@gmail.com wrote:
> > Normally Rakudo is happy for you to omit comma when declaring pairs
> > with
> > the `:key(value)` syntax, however I found that it does not like this
> > syntax
> > is Rat's are used as the value, like this:
> >
> > > (:this(3.5) :that(5.3))
> > Unknown QAST node type NQPMu
> >
>
> I took a stab at this one, but giving up for now.
>
> Things discovered:
> - It's the second `:that(5.3)` that is the thing causing the issue
> - To repro the issue, instead of a Rat you can use a constant, e.g.
> `:that(pi)`
> - ASTs:
> - Working version has: QAST::WVal(Rat) <wanted> :statement_id<?>
> 5.3
> - Broken version has: QAST::Want <wanted> (looks like it's missing
> stuff inside of it, which is what gives the error)
> - --target=parse:
> - Working version has EXPR => - 0: colonpair: (first) - 1:
> colonpair: (second)
> - Broken version has EXPR => - 0: colonpair: (first) -
> fake_infix: - OPER: - colonpair: (second)
>
> So looks like the Actions for `statement` token needs to rake through
> `fake_infix` capture and generate proper colonpair instead of empty
> QAST::Want.
>
> I gave up at that point, but hopefully my digging will be helpful to
> someone :)

Fixed with commit https://github.com/rakudo/rakudo/commit/91359141fb7501636b073ccaf6fb6598dc273bec

testneeded

0 new messages