Skip to content

Commit bceccc5

Browse files
committed
implement <at($pos)>
1 parent cde2f95 commit bceccc5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/QRegex/Cursor.nqp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ role NQPCursorRole {
198198
$cur;
199199
}
200200

201+
method at($pos) {
202+
my $cur := self."!cursor_start"();
203+
$cur."!cursor_pass"($!pos) if +$pos == $!pos;
204+
$cur;
205+
}
206+
201207
method before($regex) {
202208
my $cur := self."!cursor_start"();
203209
nqp::bindattr_i($cur, $?CLASS, '$!pos', $!pos);

0 commit comments

Comments
 (0)