fixup! replace own regex class with std::regex

This commit is contained in:
Alexander Ried 2016-10-19 16:03:53 +02:00
parent b05b98df75
commit c935e8eeaf

View file

@ -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());
} }
} }