We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6be8ad9 commit dceb34bCopy full SHA for dceb34b
src/QRegex/Cursor.nqp
@@ -228,16 +228,12 @@ role NQPCursorRole {
228
my @order := $nfa.run($!target, $pos);
229
230
# Push points onto the bstack.
231
- my $i := 0;
232
- my $num_matched := nqp::elems(@order);
233
my $caps := $!cstack ?? nqp::elems($!cstack) !! 0;
234
- while $i < $num_matched {
235
- #say("Pushing fate " ~ @fates[@order[$i]]);
236
- nqp::push_i($!bstack, @fates[@order[$i]]);
+ while @order {
+ nqp::push_i($!bstack, nqp::atpos_i(@fates, nqp::shift_i(@order)));
237
nqp::push_i($!bstack, $pos);
238
nqp::push_i($!bstack, 0);
239
nqp::push_i($!bstack, $caps);
240
- $i := $i + 1;
241
}
242
243
0 commit comments