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

2019-05-12 Thread Jan-Olof Hendig via RT
On Thu, 04 May 2017 17:36:32 -0700, c...@zoffix.com wrote:
> On Thu, 10 Nov 2016 21:03:43 -0800, joshu...@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)  :statement_id
> 5.3
> - Broken version has: QAST::Want  (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


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

2017-05-04 Thread Zoffix Znet via RT
On Thu, 10 Nov 2016 21:03:43 -0800, joshu...@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)  :statement_id 5.3
- Broken version has: QAST::Want  (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 :)


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

2017-05-04 Thread Zoffix Znet via RT
On Thu, 10 Nov 2016 21:03:43 -0800, joshu...@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)  :statement_id 5.3
- Broken version has: QAST::Want  (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 :)


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

2016-11-10 Thread via RT
# New Ticket Created by  Joshua 
# Please include the string:  [perl #130069]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130069 >


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

( Full error received in REPL reproduced below

It works fine if integers or strings are used as values, and also works
fine with Rat's if you insert the comma: -

> (:this(3) :that(5))
(this => 3 that => 5)
> (:this('3.5') :that('5.3'))
(this => 3.5 that => 5.3)
> (:this(3.5), :that(5.3))
(this => 3.5 that => 5.3)
> (:this(3.5) :that(5.3))
Unknown QAST node type NQPMu
  in any compile_node at gen/moar/stage2/QAST.nqp line 6555
  in any compile_node at gen/moar/stage2/QAST.nqp line 5201
  in any as_mast at gen/moar/stage2/QAST.nqp line 5089
  in any compile_node at gen/moar/stage2/QAST.nqp line 6460
  in any as_mast at gen/moar/stage2/QAST.nqp line 5089
  in any handle_arg at gen/moar/stage2/QAST.nqp line 2829
  in any  at gen/moar/stage2/QAST.nqp line 2997
  in any compile_op at gen/moar/stage2/QAST.nqp line 1596
  in any compile_node at gen/moar/stage2/QAST.nqp line 5871
  in any as_mast at gen/moar/stage2/QAST.nqp line 5089
  in any handle_arg at gen/moar/stage2/QAST.nqp line 2829
  in any  at gen/moar/stage2/QAST.nqp line 2919
  in any compile_op at gen/moar/stage2/QAST.nqp line 1596
  in any compile_node at gen/moar/stage2/QAST.nqp line 5871
  in any as_mast at gen/moar/stage2/QAST.nqp line 5089
  in any compile_all_the_stmts at gen/moar/stage2/QAST.nqp line 5829
  in any compile_with_stmt_temps at gen/moar/stage2/QAST.nqp line 5804
  in any compile_node at gen/moar/stage2/QAST.nqp line 5789
  in any as_mast at gen/moar/stage2/QAST.nqp line 5089
  in any compile_all_the_stmts at gen/moar/stage2/QAST.nqp line 5829
  in any compile_node at gen/moar/stage2/QAST.nqp line 5784
  in any as_mast at gen/moar/stage2/QAST.nqp line 5089
  in any compile_all_the_stmts at gen/moar/stage2/QAST.nqp line 5829
  in any  at gen/moar/stage2/QAST.nqp line 5449
  in any  at gen/moar/stage2/QAST.nqp line 5428
  in any compile_node at gen/moar/stage2/QAST.nqp line 5380
  in any as_mast at gen/moar/stage2/QAST.nqp line 5085
  in any  at gen/moar/stage2/QAST.nqp line 2895
  in any compile_op at gen/moar/stage2/QAST.nqp line 1596
  in any compile_node at gen/moar/stage2/QAST.nqp line 5871
  in any as_mast at gen/moar/stage2/QAST.nqp line 5089
  in any compile_all_the_stmts at gen/moar/stage2/QAST.nqp line 5829
  in any  at gen/moar/stage2/QAST.nqp line 5449
  in any  at gen/moar/stage2/QAST.nqp line 5428
  in any compile_node at gen/moar/stage2/QAST.nqp line 5380
  in any as_mast at gen/moar/stage2/QAST.nqp line 5089
  in any compile_node at gen/moar/stage2/QAST.nqp line 5223
  in any as_mast at gen/moar/stage2/QAST.nqp line 5089
  in any to_mast at gen/moar/stage2/QAST.nqp line 4826
  in any to_mast at gen/moar/stage2/QAST.nqp line 6607
  in any interactive at src/Perl6/Compiler.nqp line 62