diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-04 11:50:41 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-04 11:50:41 +0800 |
commit | 65f17438de5983ca010e10b4b24c5da65756a9b5 (patch) | |
tree | dfa88443d6cd10a14f587377f101e14359e98f56 /model.h | |
parent | d42c4bd97982c1252c5ad638a11aea5319c4be7f (diff) |
added exception facilities
Diffstat (limited to 'model.h')
-rw-r--r-- | model.h | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -11,10 +11,13 @@ using std::map; typedef unsigned char ClassType; // that range is enough -static const int CLS_RET_ADDR = 0; -static const int CLS_EVAL_OBJ = 1; -static const int CLS_SIM_OBJ = 0; -static const int CLS_CONS_OBJ = 1; +static const int CLS_RET_ADDR = 1 << 0; +static const int CLS_EVAL_OBJ = 1 << 1; + +static const int CLS_SIM_OBJ = 1 << 0; +static const int CLS_CONS_OBJ = 1 << 1; +static const int CLS_SYM_OBJ = 1 << 2; +static const int CLS_OPT_OBJ = 1 << 3; /** @class FrameObj * Objects that can be held in the evaluation stack @@ -69,7 +72,10 @@ class EvalObj : public FrameObj { * @return true if the object is not a construction (Cons) * */ bool is_simple_obj(); - /** External representation of this object */ + /** Check if the object is a symobl */ + bool is_sym_obj(); + /** Check if the object is an operator */ + bool is_opt_obj(); virtual void prepare(Cons *pc); /** Any EvalObj has its external representation */ virtual string ext_repr() = 0; |