summaryrefslogtreecommitdiff
path: root/src/runtime/c
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2014-08-29 08:36:53 +0000
committerkr.angelov <kr.angelov@gmail.com>2014-08-29 08:36:53 +0000
commitcee5f590cae53acc4a37396893c2464ef1db5df5 (patch)
tree1e7ae36a38287f738df2e08c36db721f9dff2764 /src/runtime/c
parent658b9adabededa77cde1642389759b50269d99f7 (diff)
added evaluator.h which I had forgoten
Diffstat (limited to 'src/runtime/c')
-rw-r--r--src/runtime/c/pgf/evaluator.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/runtime/c/pgf/evaluator.h b/src/runtime/c/pgf/evaluator.h
new file mode 100644
index 000000000..b2cffd167
--- /dev/null
+++ b/src/runtime/c/pgf/evaluator.h
@@ -0,0 +1,32 @@
+#ifndef PGF_EVALUATOR_H_
+#define PGF_EVALUATOR_H_
+
+struct PgfEvalState {
+ PgfPGF* pgf;
+ GuPool* pool;
+ GuExn* err;
+ GuBuf* stack;
+};
+
+typedef struct PgfClosure PgfClosure;
+typedef struct PgfEvalState PgfEvalState;
+
+typedef PgfClosure* (*PgfFunction)(PgfEvalState* state, PgfClosure* val);
+
+struct PgfClosure {
+ PgfFunction code;
+};
+
+typedef struct {
+ PgfClosure header;
+ PgfAbsFun* absfun;
+ PgfClosure* args[];
+} PgfValue;
+
+PgfClosure*
+pgf_evaluate_value(PgfEvalState* state, PgfClosure* closure);
+
+void
+pgf_evaluate_save_variables(PgfEvalState* state, PgfValue* val);
+
+#endif