Skip to content

Commit 570712c

Browse files
committed
Fix thinko in NFA building, which unbusts 2 out of the 3 failing S05 tests with PIRT.
1 parent 302b444 commit 570712c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/QRegex/NFA.nqp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ class QRegex::NFA {
126126
}
127127
elsif $subtype ne 'zerowidth' &&
128128
($node.name eq 'alpha' ||
129-
$subtype eq 'method' && (try $node[0][0] eq 'alpha')) {
129+
$subtype eq 'method' &&
130+
($node[0][0] ~~ QAST::SVal ?? $node[0][0].value !! $node[0][0]) eq 'alpha') {
130131
$to := self.addedge($from, $to, $EDGE_CHARCLASS + $node.negate,
131132
pir::const::CCLASS_ALPHABETIC);
132133
self.addedge($from, $to, $EDGE_CODEPOINT + $node.negate, 95);

0 commit comments

Comments
 (0)