2014-10-13 16:12:33 +04:00
|
|
|
#include "regex.hh"
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
2017-12-01 14:57:02 +03:00
|
|
|
Regex::Regex(StringView re, RegexCompileFlags flags)
|
|
|
|
: m_impl{new CompiledRegex{compile_regex(re, flags)}},
|
2017-10-09 09:37:43 +03:00
|
|
|
m_str{re.str()}
|
2017-11-01 09:08:03 +03:00
|
|
|
{}
|
2016-05-10 11:12:30 +03:00
|
|
|
|
2014-10-13 16:12:33 +04:00
|
|
|
String option_to_string(const Regex& re)
|
|
|
|
{
|
2016-02-05 02:52:06 +03:00
|
|
|
return re.str();
|
2014-10-13 16:12:33 +04:00
|
|
|
}
|
|
|
|
|
2018-05-27 06:00:04 +03:00
|
|
|
Regex option_from_string(Meta::Type<Regex>, StringView str)
|
2014-10-13 16:12:33 +04:00
|
|
|
{
|
2018-05-27 06:00:04 +03:00
|
|
|
return Regex{str};
|
2014-10-13 16:12:33 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|