diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-10-04 23:00:19 +0800 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-11-01 14:05:14 +0800 |
| commit | fabeab1ee160819616ed4b98fcc39a29aa0eb293 (patch) | |
| tree | 7ded9c67f541b998d7341735189aabe103b4d67e /src | |
| parent | 854144c5359648a66e11f74229b3aaf75c12cd5d (diff) | |
Regex: reorder lookaround ops, group by direction
Diffstat (limited to 'src')
| -rw-r--r-- | src/regex_impl.cc | 10 | ||||
| -rw-r--r-- | src/regex_impl.hh | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/regex_impl.cc b/src/regex_impl.cc index 9ede5989..3e6cd832 100644 --- a/src/regex_impl.cc +++ b/src/regex_impl.cc @@ -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); diff --git a/src/regex_impl.hh b/src/regex_impl.hh index f6f79baf..0c15b57a 100644 --- a/src/regex_impl.hh +++ b/src/regex_impl.hh @@ -30,8 +30,8 @@ struct CompiledRegex SubjectBegin, SubjectEnd, LookAhead, - LookBehind, NegativeLookAhead, + LookBehind, NegativeLookBehind, }; |
