void CheckArgIsString(LispPtr arg, int arg_idx, LispEnvironment& env, int stack_top) { if (!InternalIsString(arg->String())) { ShowArgTypeErrorInfo(arg_idx, env.iStack[stack_top], env); throw LispErrNotString(); } }
void InternalApplyString(LispEnvironment& aEnvironment, LispPtr& aResult, const LispString* aOperator,LispPtr& aArgs) { if (!InternalIsString(aOperator)) throw LispErrNotString(); LispObject *head = LispAtom::New(aEnvironment, *SymbolName(aEnvironment, *aOperator)); head->Nixed() = (aArgs); LispPtr body(LispSubList::New(head)); aEnvironment.iEvaluator->Eval(aEnvironment, aResult, body); }