libexpr: move symbols into own struct
not all of these are even used by eval itself. notably sWith wasn't used at all, sEpsilon was only used by the eval cache one layer up, and other attributes are used in places even further away from eval itself. we can keep this commingling for now, but eventually we should clean it up too. Change-Id: I5684ac614361bf008e04472130c6c02082b4c2d7
This commit is contained in:
@@ -27,7 +27,7 @@ void emitTreeAttrs(
|
||||
auto attrs = state.buildBindings(10);
|
||||
|
||||
|
||||
state.mkStorePathString(tree.storePath, attrs.alloc(state.sOutPath));
|
||||
state.mkStorePathString(tree.storePath, attrs.alloc(state.s.outPath));
|
||||
|
||||
// FIXME: support arbitrary input attributes.
|
||||
|
||||
@@ -122,7 +122,7 @@ static void fetchTree(
|
||||
|
||||
fetchers::Attrs attrs;
|
||||
|
||||
if (auto aType = args[0]->attrs->get(state.sType)) {
|
||||
if (auto aType = args[0]->attrs->get(state.s.type)) {
|
||||
if (type)
|
||||
state.error<EvalError>(
|
||||
"unexpected attribute 'type'"
|
||||
@@ -136,7 +136,7 @@ static void fetchTree(
|
||||
attrs.emplace("type", type.value());
|
||||
|
||||
for (auto & attr : *args[0]->attrs) {
|
||||
if (attr.name == state.sType) continue;
|
||||
if (attr.name == state.s.type) continue;
|
||||
state.forceValue(*attr.value, attr.pos);
|
||||
if (attr.value->type() == nPath || attr.value->type() == nString) {
|
||||
auto s = state.coerceToString(attr.pos, *attr.value, context, "", false, false).toOwned();
|
||||
|
||||
Reference in New Issue
Block a user