summaryrefslogtreecommitdiff
path: root/zwgc/eval.h
diff options
context:
space:
mode:
authorGravatar Marc Horowitz <marc@mit.edu>1989-11-01 20:02:01 +0000
committerGravatar Marc Horowitz <marc@mit.edu>1989-11-01 20:02:01 +0000
commitd13d8a046838ce3d0e2643bb5b49f2ff77d679ca (patch)
tree05737bc11e3461836ce817939b9129ed58545ac7 /zwgc/eval.h
parentfd994e4099ad66fb3bf26cd636ca5d5cae72da68 (diff)
Initial revision
Diffstat (limited to 'zwgc/eval.h')
-rw-r--r--zwgc/eval.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/zwgc/eval.h b/zwgc/eval.h
new file mode 100644
index 0000000..9ce6307
--- /dev/null
+++ b/zwgc/eval.h
@@ -0,0 +1,27 @@
+#ifndef eval_MODULE
+#define eval_MODULE
+
+#include "new_string.h"
+
+/*
+ * string eval_expr(Node *expr)
+ * Modifies: dict
+ * Requires: expr is a proper expression (NOT NULL). (see node.c)
+ * Effects: Evaluates expr to its string value which is returned.
+ * The returned string is on the heap and must be freed
+ * eventually.
+ */
+
+extern string eval_expr();
+
+/*
+ * int eval_bool_expr(Node *expr)
+ * Modifies: dict
+ * Requires: expr is a proper expression or NULL. (see node.c)
+ * Effects: Evaluates expr to its boolean value which is returned.
+ * NULL is defined to have the boolean value true.
+ */
+
+extern int eval_bool_expr();
+
+#endif