Permalink
Browse files

fix peek_delimiters translation thinko

  • Loading branch information...
1 parent f534787 commit f91e9442ada70844d7f4e6c958dde5e4e9aa3f39 @kboga committed Jun 4, 2012
Showing with 10 additions and 8 deletions.
  1. +10 −8 src/HLL/Grammar.pm
View
@@ -325,14 +325,16 @@ position C<pos>.
# See if the opening bracket is repeated.
my $len := 0;
- while 1 {
- $pos := $pos + 1;
- $len := $len + 1;
- my $s := nqp::substr($target, $pos, 1);
- next if $s eq $start;
- last if $len == 1;
- $start := nqp::x($stop, $len);
- $stop := nqp::x($start, $len);
+ my $s;
+ repeat {
+ $pos := $pos + 1;
+ $len := $len + 1;
+ $s := nqp::substr($target, $pos, 1);
+ } while $s eq $start;
+
+ unless $len == 1 {
+ $start := nqp::x($start, $len);
+ $stop := nqp::x($stop, $len);
}
}
pir::return__vssi($start, $stop, $pos);

0 comments on commit f91e944

Please sign in to comment.