Skip to content

Commit 5db4340

Browse files
committed
Don't disregard backtrack modifiers directly placed on atoms. This was why assertions.t failed in Rakudo.
1 parent cf4bf1f commit 5db4340

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/QRegex/P6Regex/Actions.nqp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ class QRegex::P6Regex::Actions is HLL::Actions {
8080
QAST::Regex.new( :rxtype<quant>, :min(0), :max(1), $<separator>[0].ast ));
8181
}
8282
}
83-
$qast.backtrack('r') if $qast && !$qast.backtrack && %*RX<r>;
83+
$qast.backtrack('r') if $qast && !$qast.backtrack &&
84+
(%*RX<r> || $<backmod> && ~$<backmod>[0] eq ':');
8485
make $qast;
8586
}
8687

0 commit comments

Comments
 (0)