Object.h 470 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef OBJECT_H
  2. #define OBJECT_H
  3. typedef enum {
  4. OT_INT,
  5. OT_FLOAT,
  6. OT_CONST_STRING,
  7. OT_NULL,
  8. OT_BOOL,
  9. OT_VOID,
  10. OT_ARRAY,
  11. OT_REFERENCE
  12. } ObjectType;
  13. typedef struct {
  14. int pointer;
  15. int index;
  16. } Reference;
  17. typedef struct {
  18. ObjectType type;
  19. union {
  20. int intValue;
  21. float floatValue;
  22. const char* stringValue;
  23. Reference reference;
  24. } as;
  25. } Object;
  26. const char* oGetName(ObjectType ot);
  27. #endif