forked from lix-project/lix
fixup! replace own regex class with std::regex
This commit is contained in:
parent
b05b98df75
commit
c935e8eeaf
|
@ -1635,6 +1635,9 @@ static void prim_match(EvalState & state, const Pos & pos, Value * * args, Value
|
||||||
const size_t len = match.size() - 1;
|
const size_t len = match.size() - 1;
|
||||||
state.mkList(v, len);
|
state.mkList(v, len);
|
||||||
for (size_t i = 0; i < len; ++i) {
|
for (size_t i = 0; i < len; ++i) {
|
||||||
|
if (!match[i+1].matched)
|
||||||
|
mkNull(*(v.listElems()[i] = state.allocValue()));
|
||||||
|
else
|
||||||
mkString(*(v.listElems()[i] = state.allocValue()), match[i + 1].str().c_str());
|
mkString(*(v.listElems()[i] = state.allocValue()), match[i + 1].str().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue