summaryrefslogtreecommitdiff
path: root/src/regex.cc
blob: 970721c7cc56991fe5c60f34b86499828b63d6fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "regex.hh"

namespace Kakoune
{

Regex::Regex(StringView re, RegexCompileFlags flags)
    : m_impl{new CompiledRegex{compile_regex(re, flags)}},
      m_str{re.str()}
{}

String option_to_string(const Regex& re)
{
    return re.str();
}

Regex option_from_string(Meta::Type<Regex>, StringView str)
{
    return Regex{str};
}

}