Skip to content

Commit af86b80

Browse files
committed
Dump extra info about QAST::SpecialArg when dumping the AST.
1 parent ba972b6 commit af86b80

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/QAST/SpecialArg.nqp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,17 @@ role QAST::SpecialArg {
1313
$!flat := $value unless $value =:= NO_VALUE;
1414
$!flat
1515
}
16+
17+
method dump_extra_node_info() {
18+
my $parent := self.HOW.parents(self, :local(1))[0];
19+
my $info := $parent.HOW.method_table($parent)<dump_extra_node_info>(self);
20+
21+
$info := nqp::chars($info) ?? $info ~ " " !! "";
22+
23+
if $!flat {
24+
$info ~ ":flat" ~ ($!named ?? " :named" !! "");
25+
} else {
26+
$info ~ ($!named ?? ":named<$!named>" !! "");
27+
}
28+
}
1629
}

0 commit comments

Comments
 (0)