Regex: reorder lookaround ops, group by direction
This commit is contained in:
parent
854144c535
commit
fabeab1ee1
|
@ -30,8 +30,8 @@ struct ParsedRegex
|
|||
SubjectEnd,
|
||||
ResetStart,
|
||||
LookAhead,
|
||||
LookBehind,
|
||||
NegativeLookAhead,
|
||||
LookBehind,
|
||||
NegativeLookBehind,
|
||||
};
|
||||
|
||||
|
@ -572,14 +572,14 @@ private:
|
|||
push_op(CompiledRegex::LookAhead);
|
||||
push_string(node->children);
|
||||
break;
|
||||
case ParsedRegex::LookBehind:
|
||||
push_op(CompiledRegex::LookBehind);
|
||||
push_string(node->children, true);
|
||||
break;
|
||||
case ParsedRegex::NegativeLookAhead:
|
||||
push_op(CompiledRegex::NegativeLookAhead);
|
||||
push_string(node->children);
|
||||
break;
|
||||
case ParsedRegex::LookBehind:
|
||||
push_op(CompiledRegex::LookBehind);
|
||||
push_string(node->children, true);
|
||||
break;
|
||||
case ParsedRegex::NegativeLookBehind:
|
||||
push_op(CompiledRegex::NegativeLookBehind);
|
||||
push_string(node->children, true);
|
||||
|
|
|
@ -30,8 +30,8 @@ struct CompiledRegex
|
|||
SubjectBegin,
|
||||
SubjectEnd,
|
||||
LookAhead,
|
||||
LookBehind,
|
||||
NegativeLookAhead,
|
||||
LookBehind,
|
||||
NegativeLookBehind,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user