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
.WHAT and .HOW become macro-ish.
  • Loading branch information
jnthn committed Oct 2, 2010
1 parent 61e4a50 commit 5ece5ae
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/NQP/Actions.pm
Expand Up @@ -767,8 +767,21 @@ method regex_declarator($/, $key?) {

method dotty($/) {
my $past := $<args> ?? $<args>[0].ast !! PAST::Op.new( :node($/) );
$past.name( $<quote> ?? $<quote>.ast !! ~$<longname> );
$past.pasttype('callmethod');
if $<quote> {
$past.name($<quote>.ast);
$past.pasttype('callmethod');
}
elsif $<longname> eq 'HOW' {
$past.pirop('get_how PP');
$past.pasttype('pirop');
}
elsif $<longname> eq 'WHAT' {
$past.pirop('get_what PP');
}
else {
$past.name(~$<longname>);
$past.pasttype('callmethod');
}
make $past;
}

Expand Down

0 comments on commit 5ece5ae

Please sign in to comment.