Skip to content

Commit d27844e

Browse files
committed
Add a !cursor_pos, for explicitly setting pos.
1 parent 77c0c7d commit d27844e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/QRegex/Cursor.nqp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ role NQPCursorRole is export {
152152
$!bstack := nqp::null();
153153
$!pos := -3;
154154
}
155+
156+
method !cursor_pos(int $pos) {
157+
$!pos := $pos;
158+
}
155159

156160
method !cursor_next() {
157161
if nqp::defined($!restart) {

0 commit comments

Comments
 (0)