Skip to content

Commit 0bbd9c1

Browse files
committed
Handle empty concat nodes in NFA builder; fixes tests we regressed in the protoregexes branch.
1 parent ad45f01 commit 0bbd9c1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/QRegex/NFA.nqp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class QRegex::NFA {
8787
$from := self.regex_nfa($node[$i], $from, -1);
8888
$i := $i + 1;
8989
}
90-
$from > 0 ?? self.regex_nfa($node[$i], $from, $to) !! $to;
90+
$from > 0 && $n >= 0 ?? self.regex_nfa($node[$i], $from, $to) !! $to;
9191
}
9292

9393
method enumcharlist($node, $from, $to) {
@@ -196,7 +196,6 @@ class QRegex::NFA {
196196
@done[$st] := $gen;
197197
for $!states[$st] -> $act, $arg, $to {
198198
if $act == $EDGE_FATE {
199-
say("# crossing fate edge $arg at $offset");
200199
@fatepos[$arg] := $offset;
201200
}
202201
elsif $act == $EDGE_EPSILON && @done[$to] != $gen {

0 commit comments

Comments
 (0)