Skip to content

Commit fcdc348

Browse files
committed
[truffle] Use more whitespace for --target=tast
1 parent 97dec8e commit fcdc348

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nqp-truffle.nqp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ class TAST {
3838
nqp::runtruffle($!tree);
3939
}
4040

41-
sub sexpr(int $unquoted, $thing) {
41+
sub sexpr(int $unquoted, $thing, int $indent = 0) {
4242
if nqp::islist($thing) {
4343
my @ret;
4444
my int $first := 1;
4545
for $thing -> $element {
46-
nqp::push(@ret, sexpr($first, $element));
46+
nqp::push(@ret, ($first ?? '' !! nqp::x(' ', $indent+1)) ~ sexpr($first, $element, $indent + 1));
4747
$first := 0;
4848
}
49-
'(' ~ nqp::join(' ', @ret) ~ ')';
49+
'(' ~ nqp::join("\n", @ret) ~ ')';
5050
} elsif nqp::isint($thing) {
5151
~$thing;
5252
} elsif nqp::isnum($thing) {

0 commit comments

Comments
 (0)