Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement foo:bar<baz>() sub calls.
  • Loading branch information
bacek committed Jun 20, 2010
1 parent 1a63388 commit 6c707c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/NQP/Actions.pm
Expand Up @@ -616,7 +616,7 @@ method term:sym<self>($/) {

method term:sym<identifier>($/) {
my $past := $<args>.ast;
$past.name(~$<identifier>);
$past.name(~$<deflongname>);
make $past;
}

Expand Down
2 changes: 1 addition & 1 deletion src/NQP/Grammar.pm
Expand Up @@ -377,7 +377,7 @@ proto token term { <...> }
token term:sym<self> { <sym> » }

token term:sym<identifier> {
<identifier> <?[(]> <args>
<deflongname> <?[(]> <args>
}

token term:sym<name> {
Expand Down
5 changes: 4 additions & 1 deletion t/nqp/11-sub.t
Expand Up @@ -2,7 +2,7 @@

# check subs

say('1..13');
say('1..14');

sub one ( ) {
say("ok 1 # sub def and call");
Expand Down Expand Up @@ -85,3 +85,6 @@ sub &twelve() {

sub Qstuff() { 13 };
say('ok ', Qstuff());

sub term:sym<self>() { 14 }
say('ok ', term:sym<self>());

0 comments on commit 6c707c6

Please sign in to comment.