Variable Stack::getVariableAt(int index) const { switch (getTypeAt(index)) { case kTypeNil: return Variable(kTypeNil); case kTypeBoolean: return getBooleanAt(index); case kTypeNumber: return getFloatAt(index); case kTypeString: return getStringAt(index); case kTypeTable: return getTableAt(index); case kTypeFunction: return getFunctionAt(index); case kTypeUserType: { const Common::UString exactType = getExactTypeAt(index); return Variable(getRawUserTypeAt(index, exactType), exactType); } default: return Variable(kTypeNone); } }
const char* getFirstString(SlimList *args) { return getStringAt(args, 0); }
int getIntAt(SlimList *args, int index) { return atoi(getStringAt(args, index)); }