diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-09 17:58:48 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-09 17:58:48 +0800 |
commit | f8a870c48886e8828155d05b0da6b7868344ba6a (patch) | |
tree | c644eecb1eab55b3e08390efb179c6d6bdbab045 /builtin.h | |
parent | 01b2c905872ff38d5d8291f2f8de92c2771f183f (diff) |
added `and` operator
Diffstat (limited to 'builtin.h')
-rw-r--r-- | builtin.h | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -8,7 +8,6 @@ using std::string; const int EQUAL_QUEUE_SIZE = 262144; -bool is_list(Pair *ptr); /** @class InexactNumObj * Inexact number implementation (using doubles) @@ -234,6 +233,21 @@ class SpecialOptEval: public SpecialOptObj { ReprCons *get_repr_cons(); }; +/** @class SpecialOptAnd + * The implementation of `and` operator + */ +class SpecialOptAnd: public SpecialOptObj { + private: + unsigned char state; /**< 0 for prepared, 1 for pre_called */ + public: + SpecialOptAnd(); + void prepare(Pair *pc); + Pair *call(ArgList *args, Environment * &envt, + Continuation * &cont, FrameObj ** &top_ptr); + + ReprCons *get_repr_cons(); +}; + #define BUILTIN_PROC_DEF(func)\ EvalObj *(func)(ArgList *args, const string &name) |