Object.c 445 B

123456789101112131415
  1. #include "vm/Object.h"
  2. const char* oGetName(ObjectType ot) {
  3. switch(ot) {
  4. case OT_INT: return "int";
  5. case OT_FLOAT: return "float";
  6. case OT_CONST_STRING: return "const string";
  7. case OT_NULL: return "null";
  8. case OT_BOOL: return "bool";
  9. case OT_VOID: return "void";
  10. case OT_ARRAY: return "array";
  11. case OT_REFERENCE: return "reference";
  12. default: return "unknown";
  13. }
  14. }