Multiple implementations (JS, Wasm, C) of a Lisp.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

18 lines
631 B

#ifndef MACROS_H
#define MACROS_H
#define CONS(p) (mem_get(p)->data->cons)
#define NUMBER(p) (mem_get(p)->data->number)
#define SYMBOL(p) (mem_get(p)->data->symbol)
#define TABLE(p) (mem_get(p)->data->table)
#define TABLE_PAIR(p) (mem_get(p)->data->tablePair)
#define SPECIAL_FORM(p) (mem_get(p)->data->specialForm)
#define NATIVE_FUNC(p) (mem_get(p)->data->nativeFunc)
#define FUNC(p) (mem_get(p)->data->func)
#define STREAM(p) (mem_get(p)->data->stream)
#define GLOBAL_ENV_GET(key) tbl_get(GLOBAL_ENV, key)
#define GLOBAL_ENV_SET(key, value) tbl_set(GLOBAL_ENV, key, value)
#endif