From 9bc507f1d6d141cc50a8deac92f5250d0ec5ff23 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Fri, 29 Aug 2014 08:36:53 +0000 Subject: [PATCH] added evaluator.h which I had forgoten --- src/runtime/c/pgf/evaluator.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/runtime/c/pgf/evaluator.h 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