forked from lix-project/hydra
Only pass the first value of each input in the inputs argument
Multiple alts are on their way out
This commit is contained in:
parent
4d967dd17a
commit
a5b986cf33
|
@ -257,9 +257,7 @@ int main(int argc, char * * argv)
|
||||||
state.mkAttrs(*inputsSet, autoArgs_.size());
|
state.mkAttrs(*inputsSet, autoArgs_.size());
|
||||||
for (auto & i : autoArgs_) {
|
for (auto & i : autoArgs_) {
|
||||||
Symbol inputName = state.symbols.create(i.first);
|
Symbol inputName = state.symbols.create(i.first);
|
||||||
Value * inputAttr = state.allocAttr(*inputsSet, inputName);
|
bool first = true;
|
||||||
state.mkList(*inputAttr, i.second.size());
|
|
||||||
int altIndex = 0;
|
|
||||||
for (auto & j : i.second) {
|
for (auto & j : i.second) {
|
||||||
Value * v = state.allocValue();
|
Value * v = state.allocValue();
|
||||||
if (j[0] == 'E')
|
if (j[0] == 'E')
|
||||||
|
@ -267,7 +265,10 @@ int main(int argc, char * * argv)
|
||||||
else
|
else
|
||||||
mkString(*v, string(j, 1));
|
mkString(*v, string(j, 1));
|
||||||
autoArgs[inputName].push_back(v);
|
autoArgs[inputName].push_back(v);
|
||||||
inputAttr->list.elems[altIndex++] = v;
|
if (first) {
|
||||||
|
inputsSet->attrs->push_back(Attr(inputName, *v));
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Symbol sInputs = state.symbols.create("inputs");
|
Symbol sInputs = state.symbols.create("inputs");
|
||||||
|
|
Loading…
Reference in a new issue