Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Benabik opened this Issue Aug 22, 2011 · 1 comment


None yet
2 participants

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)

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* '>' >


.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 commented Oct 5, 2013

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

@arnsholt arnsholt closed this Oct 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment