Skip to content

Commit

Permalink
Fix thinko in NFA building, which unbusts 2 out of the 3 failing S05 …
Browse files Browse the repository at this point in the history
…tests with PIRT.
  • Loading branch information
jnthn committed Jul 29, 2012
1 parent 302b444 commit 570712c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/QRegex/NFA.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ class QRegex::NFA {
}
elsif $subtype ne 'zerowidth' &&
($node.name eq 'alpha' ||
$subtype eq 'method' && (try $node[0][0] eq 'alpha')) {
$subtype eq 'method' &&
($node[0][0] ~~ QAST::SVal ?? $node[0][0].value !! $node[0][0]) eq 'alpha') {
$to := self.addedge($from, $to, $EDGE_CHARCLASS + $node.negate,
pir::const::CCLASS_ALPHABETIC);
self.addedge($from, $to, $EDGE_CODEPOINT + $node.negate, 95);
Expand Down

0 comments on commit 570712c

Please sign in to comment.