summaryrefslogtreecommitdiff
path: root/src/regex_impl.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-03-05 03:10:47 +1100
committerMaxime Coste <mawww@kakoune.org>2018-03-05 03:10:47 +1100
commitd9e44dfacf64b7a04aeccf110e2d54bd89f5ecaf (patch)
tree226a77c97fabedfdff0d26ab65e68232db0f900d /src/regex_impl.hh
parent6c4faf2050d94f2229bf5bb1314efb7f28da6931 (diff)
Regex: Remove helper functions from regex_impl.hh
They were close duplicates from the ones in regex.hh and not used anywhere else.
Diffstat (limited to 'src/regex_impl.hh')
-rw-r--r--src/regex_impl.hh42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/regex_impl.hh b/src/regex_impl.hh
index 8fe40d16..ff9c8c0d 100644
--- a/src/regex_impl.hh
+++ b/src/regex_impl.hh
@@ -573,48 +573,6 @@ private:
Saves* m_captures = nullptr;
};
-template<typename It, MatchDirection direction = MatchDirection::Forward>
-bool regex_match(It begin, It end, const CompiledRegex& re, RegexExecFlags flags = RegexExecFlags::None)
-{
- ThreadedRegexVM<It, direction> vm{re};
- return vm.exec(begin, end, (RegexExecFlags)(flags & ~(RegexExecFlags::Search)) |
- RegexExecFlags::AnyMatch | RegexExecFlags::NoSaves);
-}
-
-template<typename It, MatchDirection direction = MatchDirection::Forward>
-bool regex_match(It begin, It end, Vector<It, MemoryDomain::Regex>& captures, const CompiledRegex& re,
- RegexExecFlags flags = RegexExecFlags::None)
-{
- ThreadedRegexVM<It, direction> vm{re};
- if (vm.exec(begin, end, flags & ~(RegexExecFlags::Search)))
- {
- std::copy(vm.captures().begin(), vm.captures().end(), std::back_inserter(captures));
- return true;
- }
- return false;
-}
-
-template<typename It, MatchDirection direction = MatchDirection::Forward>
-bool regex_search(It begin, It end, const CompiledRegex& re,
- RegexExecFlags flags = RegexExecFlags::None)
-{
- ThreadedRegexVM<It, direction> vm{re};
- return vm.exec(begin, end, flags | RegexExecFlags::Search | RegexExecFlags::AnyMatch | RegexExecFlags::NoSaves);
-}
-
-template<typename It, MatchDirection direction = MatchDirection::Forward>
-bool regex_search(It begin, It end, Vector<It, MemoryDomain::Regex>& captures, const CompiledRegex& re,
- RegexExecFlags flags = RegexExecFlags::None)
-{
- ThreadedRegexVM<It, direction> vm{re};
- if (vm.exec(begin, end, flags | RegexExecFlags::Search))
- {
- std::move(vm.captures().begin(), vm.captures().end(), std::back_inserter(captures));
- return true;
- }
- return false;
-}
-
}
#endif // regex_impl_hh_INCLUDED