aboutsummaryrefslogtreecommitdiff
path: root/model.h
diff options
context:
space:
mode:
authorTeddy <ted.sybil@gmail.com>2013-08-04 10:00:30 +0800
committerTeddy <ted.sybil@gmail.com>2013-08-04 10:00:30 +0800
commit9c1af3a6e77d7a0e1dc66aa9166d0ead6a56d963 (patch)
treeb12624f6170e77c1e7c0d8d0885838176dadc186 /model.h
parent9e834528d38a89eb4075b09b35fb7b6e7636740d (diff)
modified the API of Env: add_binding
Diffstat (limited to 'model.h')
-rw-r--r--model.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/model.h b/model.h
index 13a5af2..ee0e8ae 100644
--- a/model.h
+++ b/model.h
@@ -253,19 +253,19 @@ class Environment {
public:
/** Create an runtime environment
* @param prev_envt the outer environment
- * */
+ */
Environment(Environment *prev_envt);
- /** Add a binding entry which binds sym_obj to eval_obj */
- void add_binding(SymObj *sym_obj, EvalObj *eval_obj);
+ /** Add a binding entry which binds sym_obj to eval_obj
+ * @param def true to force the assignment
+ * @return when def is set to false, this return value is true iff. the
+ * assignment carried out successfully
+ */
+ bool add_binding(SymObj *sym_obj, EvalObj *eval_obj, bool def = true);
/** Extract the corresponding EvalObj if obj is a SymObj, or just
* simply return obj as it is
* @param obj the object as request
* */
EvalObj *get_obj(EvalObj *obj);
- /** Check if the desired obj exists
- * @return true for yes
- */
- bool has_obj(SymObj *);
};
/** @class Continuation