1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 09:21:30 +03:00
kakoune/src/regex.cc

22 lines
337 B
C++
Raw Normal View History

#include "regex.hh"
namespace Kakoune
{
Regex::Regex(StringView re, RegexCompileFlags flags)
: m_impl{new CompiledRegex{compile_regex(re, flags)}},
m_str{re.str()}
2017-11-01 09:08:03 +03:00
{}
String option_to_string(const Regex& re)
{
2016-02-05 02:52:06 +03:00
return re.str();
}
Regex option_from_string(Meta::Type<Regex>, StringView str)
{
return Regex{str};
}
}