Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix for the previous patch
Now character class subtraction do work.
  • Loading branch information
FROGGS committed Mar 2, 2013
1 parent 8fba6d4 commit 4b23ff4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/QRegex/P6Regex/Actions.nqp
Expand Up @@ -433,7 +433,7 @@ class QRegex::P6Regex::Actions is HLL::Actions {
my $ast := $clist[$i].ast;
if $ast.negate || $ast.rxtype eq 'cclass' && ~$ast.node le 'Z' {
$ast.subtype('zerowidth');
$qast := QAST::Regex.new( :rxtype<concat>, :node($/),
$qast := QAST::Regex.new( :rxtype<concat>, :node($/), :subtype<zerowidth>, :negate(1),
QAST::Regex.new( :rxtype<conj>, :subtype<zerowidth>, $ast ),
$qast );
}
Expand Down Expand Up @@ -517,7 +517,7 @@ class QRegex::P6Regex::Actions is HLL::Actions {
if nqp::chars($str);
$qast := +@alts == 1 ?? @alts[0] !!
$<sign> eq '-' ??
QAST::Regex.new( :rxtype<concat>, :node($/),
QAST::Regex.new( :rxtype<concat>, :node($/), :subtype<zerowidth>, :negate(1),
QAST::Regex.new( :rxtype<conj>, :subtype<zerowidth>, |@alts ),
QAST::Regex.new( :rxtype<cclass>, :name<.> ) ) !!
QAST::Regex.new( :rxtype<altseq>, |@alts );
Expand Down

0 comments on commit 4b23ff4

Please sign in to comment.