# New Ticket Created by  Andrew Robbins 
# Please include the string:  [perl #117397]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117397 >


The spec says you should be able to use <::($name)>, but rakudo doesn't work.

me>
n: grammar G { rule TOP {^ <A>+ $}; regex B($what) { <::($what)> };
regex C { 'test' }; regex A { <B('C')> }; }; say G.parse('testtest')

p6eval>
niecza v24-35-g5c06e28: OUTPUT«「testtest」␤ A => 「test」␤  B => 「test」␤
::($what) => 「test」␤ A => 「test」␤  B => 「test」␤  ::($what) =>
「test」␤␤»

me>
r: grammar G { rule TOP {^ <A>+ $}; regex B($what) { <::($what)> };
regex C { 'test' }; regex A { <B('C')> }; }; say G.parse('testtest')

p6eval>
rakudo 25a9d6: OUTPUT«No such method 'QAST::Var<1988309812>' for
invocant of type 'G'␤  in regex B at /tmp/RtzoutigI0:1␤  in regex A at
/tmp/RtzoutigI0:1␤  in regex TOP at /tmp/RtzoutigI0:1␤  in method
parse at src/gen/CORE.setting:10941␤  in block  at
/tmp/RtzoutigI0:1␤␤»

Reply via email to