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
Capture reference doesn't work in lookahead assertions #2303
Comments
From info@syntax-k.deThis example program explains it all: grammar test { if (test.parse("abc")) { grammar test2 is test { if (test2.parse("abc")) { grammar test3 is test { test3.parse("abc"); On rakudo star 2010.11, it prints Modifying the grammars to use positional captures yields the same results. -- Jörg Walter |
From @ShimmerFairyRunning the given script now gives as output: correct. Note that moving the code block out of the before assertion, like so: token TOP { <a><b> { say "have " ~ Gives the expected output for the third test: have a I suspect the issue is that the block, along with the rest of the regex passed to .before, gets evaluated in a context without access to $<a>, which I don't think is related to the reported bug (if it even is a bug). So, this bug could be closed with tests, if necessary. |
The RT System itself - Status changed from 'new' to 'open' |
From @diakopterseems fixed to me 12:12 <diakopter> m: grammar test { token a { a }; token b { b }; token TOP { |
From @zoffixznetTests added in Raku/roast@0b80402678 |
@zoffixznet - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#81136 (status was 'resolved')
Searchable as RT81136$
The text was updated successfully, but these errors were encountered: