Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix args passed to indirect object call
  • Loading branch information
FROGGS committed Jun 15, 2013
1 parent a9deae2 commit cd6b480
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/Perl5/Actions.nqp
Expand Up @@ -4219,23 +4219,26 @@ class Perl5::Actions is HLL::Actions does STDActions {

method arglist($/) {
$V5DEBUG && say("arglist($/)");
my $past := QAST::Op.new( :op('call'), :node($/) );
my @args;
if $<arg> {
for $<arg> -> $arg {
if $arg<EXPR> {
my $expr := $arg<EXPR>.ast;
my @args := nqp::istype($expr, QAST::Op) && $expr.name eq '&infix:<,>'
my @arg := nqp::istype($expr, QAST::Op) && $expr.name eq '&infix:<,>'
?? $expr.list
!! [$expr];
for @args {
$past.push($_);
for @arg {
@args.push($_);
}
}
}
}
my $past := QAST::Op.new( :op('call'), :node($/), |@args );
if $<indirect_object> {
$past.name('&infix:<,>');
$past := QAST::Op.new( :op('callmethod'), $<indirect_object>.ast, $past )
$past := +@args
?? QAST::Op.new( :op('callmethod'), $<indirect_object>.ast, $past )
!! QAST::Op.new( :op('callmethod'), $<indirect_object>.ast );
}

make $past;
Expand Down

0 comments on commit cd6b480

Please sign in to comment.