Skip to content

Commit

Permalink
Fix charrange NFA to handle ignoremark.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Nov 11, 2015
1 parent 4570019 commit 367c227
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/QRegex/NFA.nqp
Expand Up @@ -27,6 +27,8 @@ class QRegex::NFA {
my $EDGE_CODEPOINT_IM := 19;
my $EDGE_CODEPOINT_IM_NEG := 20;
my $EDGE_CODEPOINT_IM_LL := 21;
my $EDGE_CHARRANGE_M := 22;
my $EDGE_CHARRANGE_M_NEG := 23;

my $ACTIONS;
my $nfadeb;
Expand Down Expand Up @@ -237,7 +239,9 @@ class QRegex::NFA {
method charrange($node, $from, $to) {
my $indent := dentin();
note("$indent charrange $from -> $to") if $nfadeb;
my $base_edge := $EDGE_CHARRANGE;
my $base_edge := $node[0] eq 'ignoremark' || $node[0] eq 'ignorecase+ignoremark'
?? $EDGE_CHARRANGE_M
!! $EDGE_CHARRANGE;
my @to_add;
if $node[0] eq 'ignorecase' || $node[0] eq 'ignorecase+ignoremark' {
nqp::push(@to_add, nqp::ord(nqp::lc(nqp::chr($node[1].value))));
Expand Down

0 comments on commit 367c227

Please sign in to comment.