Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
skip non-declarative code when building NFAs
  • Loading branch information
diakopter committed Nov 18, 2011
1 parent 131f8e7 commit ec2f2a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/QRegex/NFA.nqp
Expand Up @@ -44,6 +44,7 @@ class QRegex::NFA {

method regex_nfa($node, $from, $to) {
my $method := ($node.rxtype // 'concat');
nqp::say("got method $method");
self.HOW.can(self, $method)
?? self."$method"($node, $from, $to)
!! self.fate($node, $from, $to);
Expand Down Expand Up @@ -157,6 +158,10 @@ class QRegex::NFA {
self.fate($node, $from, $to)
}
}

method pastnode($node, $from, $to) {
self.addedge($from, $to, $EDGE_EPSILON, 0);
}

method past() {
return 0 unless $!edges;
Expand Down

0 comments on commit ec2f2a8

Please sign in to comment.