Skip to content

Instantly share code, notes, and snippets.

@rcombs
Created March 22, 2015 05:34
Show Gist options
  • Save rcombs/5972c3cb134ee80d107b to your computer and use it in GitHub Desktop.
Save rcombs/5972c3cb134ee80d107b to your computer and use it in GitHub Desktop.
typedef enum {
INTEGER,
FLOAT,
CHAR,
STRING,
SYMBOL,
LIST,
LPAREN,
RPAREN,
QUOTED,
} type_t;
typedef enum {
NIL,
UNDEFINED,
//etc...
} builtin_t;
/*Here's what an object looks like:*/
typedef struct {
type_t type;
union value {
int64_t integer;
double float;
char *string;
builtin_t builtin;
void *void;
}
} object_t;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment