Fixed inverted group thrown off by quantifiers
This commit is contained in:
parent
382db0898e
commit
f01ce3276e
1 changed files with 4 additions and 3 deletions
|
@ -603,10 +603,8 @@ struct RegExNodeGroup : public RegExNode {
|
|||
|
||||
int res = childset[i]->test(s, pos);
|
||||
|
||||
if (s.complete)
|
||||
return res;
|
||||
|
||||
if (inverse) {
|
||||
s.complete = false;
|
||||
if (res < 0)
|
||||
res = pos + 1;
|
||||
else
|
||||
|
@ -616,6 +614,9 @@ struct RegExNodeGroup : public RegExNode {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (s.complete)
|
||||
return res;
|
||||
|
||||
if (res >= 0) {
|
||||
if (reset_pos)
|
||||
res = pos;
|
||||
|
|
Loading…
Reference in a new issue