Skip to content
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

sub a:b['c'] generates .sub "a:b<Capture[0x...]>" #22

Closed
Benabik opened this issue Aug 22, 2011 · 1 comment
Closed

sub a:b['c'] generates .sub "a:b<Capture[0x...]>" #22

Benabik opened this issue Aug 22, 2011 · 1 comment

Comments

@Benabik
Copy link
Contributor

Benabik commented Aug 22, 2011

It seems that colonpair_str returns what I guess to be a PCT node instead of a string for the :b['c'] syntax. To expand the terse example in the title:

sub a:b['c']() { say("hi") }

generates the following PIR

.sub "a:b<Capture[0xeafa6588]>"  :subid("11_1313977936.07837") :outer("10_1313977936.07837")
    $P100 = "say"("hi")
    .return ($P100)
.end

This may seem somewhat cosmetic, but this also affects grammars, so the following from nom's setting:

    token special_variable:sym['$<'] {
        <sym> <!before \s* \w+ \s* '>' >

generates:

.sub "special_variable:sym<Capture[0xf4820400]>"  :subid("461_1313948700.73446") :method :outer("11_1313948700.73446")
    # cut for brevity
    ne $S10, "Capture[0xf4820400]", rx2590_fail

Which means that it doesn't match what it should.

@arnsholt
Copy link
Contributor

arnsholt commented Oct 5, 2013

Latest NQP generates .sub "a:b<c>".

@arnsholt arnsholt closed this as completed Oct 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants