From 3406f0a979e2465a993b20c2eb1033729c6a787c Mon Sep 17 00:00:00 2001 From: Teddy Date: Tue, 6 Aug 2013 19:11:22 +0800 Subject: added and restructured built-in procedures --- model.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'model.h') diff --git a/model.h b/model.h index 0fcf5d3..8a8fc61 100644 --- a/model.h +++ b/model.h @@ -24,6 +24,7 @@ const int CLS_CONS_OBJ = 1 << 1; const int CLS_SYM_OBJ = 1 << 2; const int CLS_OPT_OBJ = 1 << 3; const int CLS_NUM_OBJ = 1 << 4; +const int CLS_BOOL_OBJ = 1 << 5; #define TO_CONS(ptr) \ @@ -96,6 +97,8 @@ class EvalObj : public FrameObj { bool is_cons_obj(); /** Check if the object is a number */ bool is_num_obj(); + /** Check if the object is a boolean */ + bool is_bool_obj(); virtual void prepare(Cons *pc); /** Any EvalObj has its external representation */ virtual string ext_repr() = 0; @@ -247,7 +250,7 @@ class SpecialOptObj: public OptObj { SpecialOptObj(); }; -typedef EvalObj* (*BuiltinProc)(ArgList *); +typedef EvalObj* (*BuiltinProc)(ArgList *, const string &); /** @class BuiltinProcObj * Wrapping class for builtin procedures (arithmetic operators, etc.) */ -- cgit v1.2.3