Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Last active December 14, 2015 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/5023754 to your computer and use it in GitHub Desktop.
Save FROGGS/5023754 to your computer and use it in GitHub Desktop.
diff --git a/src/QRegex/P6Regex/Actions.nqp b/src/QRegex/P6Regex/Actions.nqp
index 5fe283a..dff6757 100755
--- a/src/QRegex/P6Regex/Actions.nqp
+++ b/src/QRegex/P6Regex/Actions.nqp
@@ -432,7 +432,12 @@ class QRegex::P6Regex::Actions is HLL::Actions {
while $i < $n {
my $ast := $clist[$i].ast;
if $ast.negate {
- $ast.subtype('zerowidth');
+ if $ast.rxtype eq 'cclass' {
+ $ast := QAST::Regex.new( :rxtype<conj>, :subtype<zerowidth>, $ast );
+ }
+ else {
+ $ast.subtype('zerowidth');
+ }
$qast := QAST::Regex.new( $ast, $qast, :rxtype<concat>, :node($/));
}
else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment