Made `eval()` clearer/more concise

This commit is contained in:
rxi 2020-04-05 16:42:15 +01:00
parent 61c9ee30f4
commit 3efa0756c4
1 changed files with 2 additions and 5 deletions

View File

@ -617,11 +617,8 @@ static fe_Object* eval(fe_Context *ctx, fe_Object *obj, fe_Object *env, fe_Objec
fe_Object cl, *va, *vb;
int n, gc;
switch (type(obj)) {
case FE_TSYMBOL: return cdr(getbound(obj, env));
case FE_TPAIR: break;
default: return obj;
}
if (type(obj) == FE_TSYMBOL) { return cdr(getbound(obj, env)); }
if (type(obj) != FE_TPAIR) { return obj; }
car(&cl) = obj, cdr(&cl) = ctx->calllist;
ctx->calllist = &cl;