Skip to content

Commit a4818ae

Browse files
committed
RT #115802, cclasses dont support zerowidth
1 parent ba02ea9 commit a4818ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/QRegex/P6Regex/Actions.nqp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,12 @@ class QRegex::P6Regex::Actions is HLL::Actions {
432432
while $i < $n {
433433
my $ast := $clist[$i].ast;
434434
if $ast.negate {
435-
$ast.subtype('zerowidth');
435+
if $ast.rxtype eq 'cclass' {
436+
$ast := QAST::Regex.new( :rxtype<conj>, :subtype<zerowidth>, $ast );
437+
}
438+
else {
439+
$ast.subtype('zerowidth');
440+
}
436441
$qast := QAST::Regex.new( $ast, $qast, :rxtype<concat>, :node($/));
437442
}
438443
else {

0 commit comments

Comments
 (0)