Regex: reorder lookaround ops, group by direction

This commit is contained in:
Maxime Coste 2017-10-04 23:00:19 +08:00
parent 854144c535
commit fabeab1ee1
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -30,8 +30,8 @@ struct CompiledRegex
SubjectBegin,
SubjectEnd,
LookAhead,
LookBehind,
NegativeLookAhead,
LookBehind,
NegativeLookBehind,
};