Skip to content

Commit ec2f2a8

Browse files
committed
skip non-declarative code when building NFAs
1 parent 131f8e7 commit ec2f2a8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/QRegex/NFA.nqp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class QRegex::NFA {
4444

4545
method regex_nfa($node, $from, $to) {
4646
my $method := ($node.rxtype // 'concat');
47+
nqp::say("got method $method");
4748
self.HOW.can(self, $method)
4849
?? self."$method"($node, $from, $to)
4950
!! self.fate($node, $from, $to);
@@ -157,6 +158,10 @@ class QRegex::NFA {
157158
self.fate($node, $from, $to)
158159
}
159160
}
161+
162+
method pastnode($node, $from, $to) {
163+
self.addedge($from, $to, $EDGE_EPSILON, 0);
164+
}
160165

161166
method past() {
162167
return 0 unless $!edges;

0 commit comments

Comments
 (0)