From 448ac0bcc3a81e250a825c333dd01c77e754341a Mon Sep 17 00:00:00 2001 From: Teddy Date: Sun, 11 Aug 2013 11:25:26 +0800 Subject: `delay` and `force` support is added --- builtin.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'builtin.h') diff --git a/builtin.h b/builtin.h index 7a34315..332e882 100644 --- a/builtin.h +++ b/builtin.h @@ -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)\ -- cgit v1.2.3