New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mu methods cannot be used as grammar tokens due to default Actions class #5247
Comments
From @masak<ugexe> m: grammar Foo { token TOP { <return> }; token return { .+ }; In summary, it seems to be calling &return, but it shouldn't do that. |
From @zoffixznetStill present in rakudo 405519, except now one of the errors mentions "any !reduce" <Zoffix> m: grammar Foo { token TOP { <return> }; token return { .+ }; }; Foo.parse(1); |
From @zoffixznet����������������������������������������������������������������������������� TODO-fudged tests added in Raku/roast@f4e2505dbc ������������������������������������������ -- |
The RT System itself - Status changed from 'new' to 'open' |
From @jnthnOn Sat Jul 09 19:02:23 2016, cpan@zoffix.com wrote:
Ah, fun one. The problem is actually that after the return regex matches, it looks for actions. $*ACTIONS is likely set to Mu or Any if you don't supply an actions class. And Mu has a method return, which gets invoked. |
From @AlexDanielCode: Result: Code: Result: |
From @zoffixznetOn Mon, 23 Jan 2017 01:02:07 -0800, alex.jakimenko@gmail.com wrote:
This is a dupe of RT#127945. Tokens with names of Mu methods invoke those on the default Actions class. The workaround is to override those in your own Actions class. |
The RT System itself - Status changed from 'new' to 'open' |
@zoffixznet - Status changed from 'open' to 'rejected' |
From @zoffixznetThe aforementioned TODO fudge has been removed from the spec in Raku/roast@6bf5aaebdd |
I didn't mean to close this. Fat fingers. That said, I think that the fix to the issue I just mentioned this in means this issue may, hopefully will, be closed. |
Fixed in Raku/roast@31115d7 |
Migrated from rt.perl.org#127945 (status was 'open')
Searchable as RT127945$
The text was updated successfully, but these errors were encountered: