use of com.laytonsmith.core.constructs.IVariable in project CommandHelper by EngineHub.
the class Script method seval.
/**
* Runs eval on the code tree, and if it returns an ival, resolves it.
*
* @param c
* @param env
* @return
*/
public Construct seval(ParseTree c, final Environment env) {
Construct ret = eval(c, env);
while (ret instanceof IVariable) {
IVariable cur = (IVariable) ret;
ret = env.getEnv(GlobalEnv.class).GetVarList().get(cur.getVariableName(), cur.getTarget()).ival();
}
return ret;
}
Aggregations