ccm/lib/value.h

27 lines
537 B
C
Raw Normal View History

2024-03-18 17:20:40 +00:00
#ifndef CCM_VALUE_H
#define CCM_VALUE_H
#include "commons.h"
#include "type.h"
#include "vec.h"
typedef struct {
union {
double num;
vec_t* tuple;
} data;
Type type;
int line;
} value_t;
void value_init_num(value_t* self, double num, int line);
void value_init_new_tuple(value_t* self, vec_t* values, int line);
value_t* value_new_clone(value_t* self);
void value_free(value_t* self);
size_t value_str(value_t* self, char* buffer, size_t size);
int value_equals(value_t* self, value_t* rhs);
#endif