add sSYMBOLs to pic_state
This commit is contained in:
parent
395f48bc81
commit
0ceb9c9953
|
@ -71,6 +71,9 @@ typedef struct {
|
|||
pic_sym sQUASIQUOTE, sUNQUOTE, sUNQUOTE_SPLICING;
|
||||
pic_sym sDEFINE_SYNTAX, sDEFINE_MACRO;
|
||||
pic_sym sDEFINE_LIBRARY, sIMPORT, sEXPORT;
|
||||
pic_sym sCONS, sCAR, sCDR, sNILP;
|
||||
pic_sym sADD, sSUB, sMUL, sDIV;
|
||||
pic_sym sEQ, sLT, sLE, sGT, sGE;
|
||||
|
||||
struct xhash *sym_tbl;
|
||||
const char **sym_pool;
|
||||
|
|
13
src/state.c
13
src/state.c
|
@ -98,6 +98,19 @@ pic_open(int argc, char *argv[], char **envp)
|
|||
register_core_symbol(pic, sDEFINE_LIBRARY, "define-library");
|
||||
register_core_symbol(pic, sIMPORT, "import");
|
||||
register_core_symbol(pic, sEXPORT, "export");
|
||||
register_core_symbol(pic, sCONS, "cons");
|
||||
register_core_symbol(pic, sCAR, "car");
|
||||
register_core_symbol(pic, sCDR, "cdr");
|
||||
register_core_symbol(pic, sNILP, "null?");
|
||||
register_core_symbol(pic, sADD, "+");
|
||||
register_core_symbol(pic, sSUB, "-");
|
||||
register_core_symbol(pic, sMUL, "*");
|
||||
register_core_symbol(pic, sDIV, "/");
|
||||
register_core_symbol(pic, sEQ, "=");
|
||||
register_core_symbol(pic, sLT, "<");
|
||||
register_core_symbol(pic, sLE, "<=");
|
||||
register_core_symbol(pic, sGT, ">");
|
||||
register_core_symbol(pic, sGE, ">=");
|
||||
pic_gc_arena_restore(pic, ai);
|
||||
|
||||
pic_init_core(pic);
|
||||
|
|
Loading…
Reference in New Issue