Skip to content

Commit 03349b2

Browse files
committed
Fixing --target=parse on nqp
Was working fine on rakudo
1 parent 6c1ac9f commit 03349b2

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/QRegex/Cursor.nqp

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -751,19 +751,23 @@ class NQPMatch is NQPCapture {
751751
}
752752

753753
my int $i := 0;
754-
for self.list() {
755-
if $_ {
756-
nqp::islist($_)
757-
?? dump_match_array(@chunks, $indent, $i, $_)
758-
!! dump_match(@chunks, $indent, $i, $_);
759-
}
760-
$i := $i + 1;
754+
if self.list() {
755+
for self.list() {
756+
if $_ {
757+
nqp::islist($_)
758+
?? dump_match_array(@chunks, $indent, $i, $_)
759+
!! dump_match(@chunks, $indent, $i, $_);
760+
}
761+
$i := $i + 1;
762+
}
761763
}
762-
for self.hash() {
763-
if $_.value {
764-
nqp::islist($_.value)
765-
?? dump_match_array(@chunks, $indent, $_.key, $_.value)
766-
!! dump_match(@chunks, $indent, $_.key, $_.value);
764+
if self.hash() {
765+
for self.hash() {
766+
if $_.value {
767+
nqp::islist($_.value)
768+
?? dump_match_array(@chunks, $indent, $_.key, $_.value)
769+
!! dump_match(@chunks, $indent, $_.key, $_.value);
770+
}
767771
}
768772
}
769773
return join('', @chunks);

0 commit comments

Comments
 (0)