2023-12-09 17:24:41 +00:00
|
|
|
#ifndef RZ_TYPE_H
|
|
|
|
#define RZ_TYPE_H
|
|
|
|
|
|
|
|
#include "commons.h"
|
|
|
|
|
|
|
|
#define TYPE_KIND(G) \
|
2023-12-09 21:59:24 +00:00
|
|
|
G(TYPE_NUM), \
|
|
|
|
G(TYPE_BOOL)
|
2023-12-09 17:24:41 +00:00
|
|
|
|
|
|
|
RZ_ENUM_H(TypeKind, TYPE_KIND);
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
TypeKind kind;
|
|
|
|
} type_t;
|
|
|
|
|
|
|
|
void type_init(type_t* type, TypeKind kind);
|
|
|
|
void type_free(type_t* type);
|
|
|
|
|
|
|
|
int type_eq(type_t* type, type_t* rhs);
|
|
|
|
|
|
|
|
#endif
|