24 lines
524 B
C
24 lines
524 B
C
#ifndef RZ_TYSY_H
|
|
#define RZ_TYSY_H
|
|
|
|
#include "commons.h"
|
|
#include "value.h"
|
|
|
|
typedef struct {
|
|
type_t* types[RZ_MAX_TYPES];
|
|
char* names[RZ_MAX_TYPES];
|
|
size_t size;
|
|
} tysy_t;
|
|
|
|
void tysy_init(tysy_t* tysy);
|
|
void tysy_free(tysy_t* tysy);
|
|
|
|
void tysy_register_new_type(tysy_t* tysy, char* name, type_t* type);
|
|
type_t* tysy_try_find_type(tysy_t* tysy, char* name);
|
|
|
|
value_t* tysy_new_num(tysy_t* tysy, double value);
|
|
value_t* tysy_new_bool(tysy_t* tysy, int value);
|
|
value_t* tysy_new_str(tysy_t* tysy, char* value);
|
|
|
|
#endif
|