Make function to get top-level value from releaseExpr.

This commit is contained in:
John Soo 2022-04-21 11:34:49 -07:00
parent 2871c7a3f4
commit 4a3d2e0008
No known key found for this signature in database
GPG key ID: D8A148F8CE4DDBC2

View file

@ -116,6 +116,18 @@ struct MyArgs : MixEvalArgs, MixCommonArgs
static MyArgs myArgs; static MyArgs myArgs;
static Value* releaseExprTopLevelValue(EvalState & state, Bindings & autoArgs) {
Value vTop;
state.evalFile(lookupFileArg(state, myArgs.releaseExpr), vTop);
auto vRoot = state.allocValue();
state.autoCallFunction(autoArgs, vTop, *vRoot);
return vRoot;
}
static void worker( static void worker(
EvalState & state, EvalState & state,
Bindings & autoArgs, Bindings & autoArgs,