mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
fixup! replace own regex class with std::regex
This commit is contained in:
parent
b05b98df75
commit
c935e8eeaf
1 changed files with 4 additions and 1 deletions
|
@ -1635,6 +1635,9 @@ static void prim_match(EvalState & state, const Pos & pos, Value * * args, Value
|
|||
const size_t len = match.size() - 1;
|
||||
state.mkList(v, len);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue