Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Dump extra info about QAST::SpecialArg when dumping the AST.
  • Loading branch information
pmurias committed Oct 23, 2015
1 parent ba972b6 commit af86b80
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/QAST/SpecialArg.nqp
Expand Up @@ -13,4 +13,17 @@ role QAST::SpecialArg {
$!flat := $value unless $value =:= NO_VALUE;
$!flat
}

method dump_extra_node_info() {
my $parent := self.HOW.parents(self, :local(1))[0];
my $info := $parent.HOW.method_table($parent)<dump_extra_node_info>(self);

$info := nqp::chars($info) ?? $info ~ " " !! "";

if $!flat {
$info ~ ":flat" ~ ($!named ?? " :named" !! "");
} else {
$info ~ ($!named ?? ":named<$!named>" !! "");
}
}
}

0 comments on commit af86b80

Please sign in to comment.