Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
RT #77410 implement :ignorecase for cclasses
Approach was taken from P5Regex.
  • Loading branch information
FROGGS committed Mar 3, 2013
1 parent 4b23ff4 commit 110a95d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/QRegex/P6Regex/Actions.nqp
Expand Up @@ -511,7 +511,10 @@ class QRegex::P6Regex::Actions is HLL::Actions {
$bs.subtype('zerowidth') if $bs.negate;
@alts.push($bs);
}
else { $str := $str ~ ~$_[0]; }
else {
my $c := ~$_[0];
$str := $str ~ (%*RX<i> ?? nqp::lc($c) ~ nqp::uc($c) !! $c);
}
}
@alts.push(QAST::Regex.new( $str, :rxtype<enumcharlist>, :node($/), :negate( $<sign> eq '-' ) ))
if nqp::chars($str);
Expand Down

0 comments on commit 110a95d

Please sign in to comment.