add pic_debug function

This commit is contained in:
Yuichi Nishiwaki
2013-10-10 17:48:01 +09:00
parent 0c382c2bdb
commit b640dc08e8
4 changed files with 47 additions and 0 deletions
+2
View File
@@ -19,4 +19,6 @@ pic_value pic_cdr(pic_state *, pic_value);
pic_value pic_intern_cstr(pic_state *, const char *);
void pic_debug(pic_state *, pic_value);
#endif
+8
View File
@@ -14,6 +14,9 @@ typedef struct {
} pic_value;
enum pic_tt {
/* immediate */
PIC_TT_NIL,
/* heap */
PIC_TT_PAIR,
PIC_TT_SYMBOL
};
@@ -36,6 +39,11 @@ struct pic_symbol {
char *name;
};
#define pic_pair_ptr(o) ((struct pic_pair *)o->u->data)
#define pic_symbol_ptr(o) ((struct pic_symbol *)o->u->data)
enum pic_tt pic_type(pic_value v);
pic_value pic_nil_value();
pic_value pic_obj_value(struct pic_object *obj);