Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
support case-insensitivity for ranges in character classes
  • Loading branch information
FROGGS committed Sep 7, 2013
1 parent 92cda32 commit 6b5c98e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/QRegex/P6Regex/Actions.nqp
Expand Up @@ -505,7 +505,15 @@ class QRegex::P6Regex::Actions is HLL::Actions {
my $ord1 := nqp::ord($rhs);
$/.CURSOR.panic("Illegal reversed character range in regex: " ~ ~$_)
if $ord0 > $ord1;
$str := nqp::concat($str, nqp::chr($ord0++)) while $ord0 <= $ord1;
if %*RX<i> {
while $ord0 <= $ord1 {
my $c := nqp::chr($ord0++);
$str := nqp::concat($str, nqp::lc($c) ~ nqp::uc($c));
}
}
else {
$str := nqp::concat($str, nqp::chr($ord0++)) while $ord0 <= $ord1;
}
}
elsif $_[0]<backslash> {
my $bs := $_[0]<backslash>.ast;
Expand Down

0 comments on commit 6b5c98e

Please sign in to comment.