Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Kill !cursor_start, which used multiple return.
  • Loading branch information
jnthn committed Feb 11, 2013
1 parent 67eb623 commit a7f47d9
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/QRegex/Cursor.nqp
Expand Up @@ -93,33 +93,6 @@ role NQPCursorRole is export {
}
$new;
}

method !cursor_start() {
my $new := nqp::create(self);
my $sub := nqp::callercode();
nqp::bindattr($new, $?CLASS, '$!shared', $!shared);
nqp::bindattr($new, $?CLASS, '$!regexsub', nqp::ifnull(nqp::getcodeobj($sub), $sub));
if nqp::defined($!restart) {
nqp::bindattr_i($new, $?CLASS, '$!pos', $!pos);
nqp::bindattr($new, $?CLASS, '$!cstack', nqp::clone($!cstack)) if $!cstack;
pir::return__0PsiPPi(
$new,
nqp::getattr_s($!shared, ParseShared, '$!target'),
nqp::bindattr_i($new, $?CLASS, '$!from', $!from),
$?CLASS,
nqp::bindattr($new, $?CLASS, '$!bstack', nqp::clone($!bstack)),
1);
}
nqp::bindattr_i($new, $?CLASS, '$!pos', -3);
pir::return__0PsiPPi(
$new,
nqp::getattr_s($!shared, ParseShared, '$!target'),
nqp::bindattr_i($new, $?CLASS, '$!from', $!pos),
$?CLASS,
nqp::bindattr($new, $?CLASS, '$!bstack', nqp::list_i()),
0
)
}

# Starts a new Cursor, returning all information relating to it in an array.
# The array is valid until the next call to !cursor_start_all.
Expand Down

0 comments on commit a7f47d9

Please sign in to comment.