aboutsummaryrefslogtreecommitdiff
path: root/builtin.h
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2013-08-11 11:25:26 +0800
committerTeddy <ted.sybil@gmail.com>2013-08-11 11:25:26 +0800
commit448ac0bcc3a81e250a825c333dd01c77e754341a (patch)
tree4d8d104fa59bdf73274602dbe2927945abeb92e3 /builtin.h
parent05f893bbe7e8a839c26cc951fafb166c25d0a6ee (diff)
`delay` and `force` support is added
Diffstat (limited to 'builtin.h')
-rw-r--r--builtin.h29
1 files changed, 29 insertions, 0 deletions
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)\