This repository has been archived on 2023-09-10. You can view files and clone it, but cannot push or open issues/pull-requests.
joko/lib/Type.hpp

32 lines
602 B
C++
Raw Permalink Normal View History

2023-09-09 13:09:43 +00:00
#ifndef jk_TYPE_HPP
#define jk_TYPE_HPP
#include "commons.hpp"
2023-09-09 22:03:28 +00:00
#define TYPE_TYPE(G) \
G(TYPE_NIL), \
G(TYPE_INT), \
2023-09-10 12:39:23 +00:00
G(TYPE_BOOL), \
2023-09-09 22:03:28 +00:00
G(TYPE_FUNCTION), \
G(TYPE_CODE), \
G(TYPE_REF)
2023-09-09 13:09:43 +00:00
namespace jk
{
JK_ENUM(Type, TYPE_TYPE);
class Type
{
public:
explicit Type(TypeType type);
virtual ~Type();
TypeType type() const { return m_type; }
private:
TypeType m_type;
};
}
#endif