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 3071d43 commit 7fc7a08Copy full SHA for 7fc7a08
src/QRegex/Cursor.nqp
@@ -198,12 +198,14 @@ role NQPCursorRole {
198
}
199
200
method before($regex) {
201
- my $cur := self.'!cursor_start'();
202
- $cur.'!cursor_pass'($!pos, 'before')
203
- if $regex($cur);
+ my $cur := self."!cursor_start"();
+ nqp::bindattr_i($cur, $?CLASS, '$!pos', $!pos);
+ nqp::getattr_i($regex($cur), $?CLASS, '$!pos') >= 0 ??
204
+ $cur."!cursor_pass"($!pos, 'before') !!
205
+ $cur."!cursor_fail"();
206
$cur;
207
-
208
+
209
method ws() {
210
# skip over any whitespace, fail if between two word chars
211
my $cur := self."!cursor_start"();
0 commit comments