Project restructuring to support the new direction
This commit is contained in:
27
example/c/common.h
Normal file
27
example/c/common.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef _COMMON_H_
|
||||
#define _COMMON_H_
|
||||
|
||||
#define SIZE 1024
|
||||
#define BROKEN_HEART 1
|
||||
#define CONS 2
|
||||
#define INTEGER 3
|
||||
#define SYMBOL 4
|
||||
#define BYE 5
|
||||
|
||||
typedef struct box_t {
|
||||
char type;
|
||||
union {
|
||||
int integer;
|
||||
char* symbol;
|
||||
struct cons_t* cons;
|
||||
};
|
||||
} box_t;
|
||||
|
||||
typedef struct cons_t {
|
||||
box_t car;
|
||||
box_t cdr;
|
||||
} cons_t;
|
||||
|
||||
extern cons_t *the_empty_list;
|
||||
|
||||
#endif // _COMMON_H_
|
||||
Reference in New Issue
Block a user