diff options
author | Teddy <[email protected]> | 2013-08-11 11:25:26 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2013-08-11 11:25:26 +0800 |
commit | 448ac0bcc3a81e250a825c333dd01c77e754341a (patch) | |
tree | 4d8d104fa59bdf73274602dbe2927945abeb92e3 /builtin.h | |
parent | 05f893bbe7e8a839c26cc951fafb166c25d0a6ee (diff) |
`delay` and `force` support is added
Diffstat (limited to 'builtin.h')
-rw-r--r-- | builtin.h | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -284,6 +284,35 @@ class SpecialOptApply: public SpecialOptObj { ReprCons *get_repr_cons(); }; +/** @class SpecialOptDelay + * The implementation of `delay` operator + */ +class SpecialOptDelay: public SpecialOptObj { + public: + SpecialOptDelay(); + void prepare(Pair *pc); + Pair *call(ArgList *args, Environment * &envt, + Continuation * &cont, FrameObj ** &top_ptr); + + ReprCons *get_repr_cons(); +}; + +/** @class SpecialOptForce + * The implementation of `force` operator + */ +class SpecialOptForce: public SpecialOptObj { + private: + bool state; + PromObj* prom; + public: + SpecialOptForce(); + void prepare(Pair *pc); + Pair *call(ArgList *args, Environment * &envt, + Continuation * &cont, FrameObj ** &top_ptr); + + ReprCons *get_repr_cons(); +}; + #define BUILTIN_PROC_DEF(func)\ |