Skip to content

Commit

Permalink
Fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Oct 25, 2010
1 parent 28714cc commit e671cca
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/SAFE.setting
Expand Up @@ -944,17 +944,15 @@ my class Regex is Sub {
my $mat;
my $C = Cursor.new($str);
while !$mat && ($i <= $str.chars) {
$mat = (self)($C.cursor($i++));
$mat = flat((self)($C.cursor($i++))).head;
}
unitem($mat.head);
$mat ?? unitem($mat) !! Any;
}
}
my class Grammar is Cursor {
method parse($text) {
my @results := self.new($text).TOP\
.grep({ $_.to == $text.chars });
@results ?? @results.shift !! Any; # TODO List.at-pos
flat(grep { $_.to == $text.chars }, self.new($text).TOP).head
}
}
# }}}
Expand Down

0 comments on commit e671cca

Please sign in to comment.