summaryrefslogtreecommitdiff
path: root/src/runtime/c/pgf/edsl.h
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2012-01-20 13:41:10 +0000
committerkr.angelov <kr.angelov@gmail.com>2012-01-20 13:41:10 +0000
commit2eee382a62a909d5a3f2f5eda94f30fe68fd5335 (patch)
treeb0b0d513535895f244214aebf6358e172b8dce6d /src/runtime/c/pgf/edsl.h
parentb9728357126f8b9a6311cca17d9f0dcc2a7bfb9b (diff)
initial import of the C runtime
Diffstat (limited to 'src/runtime/c/pgf/edsl.h')
-rw-r--r--src/runtime/c/pgf/edsl.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/runtime/c/pgf/edsl.h b/src/runtime/c/pgf/edsl.h
new file mode 100644
index 000000000..af21e6c15
--- /dev/null
+++ b/src/runtime/c/pgf/edsl.h
@@ -0,0 +1,20 @@
+#ifndef PGF_EDSL_H_
+#define PGF_EDSL_H_
+
+#include <pgf/expr.h>
+
+#define APP(f, a) \
+ gu_new_variant_i(PGF_EDSL_POOL, PGF_EXPR_APP, PgfExprApp, f, a)
+#define APP2(f, a1, a2) APP(APP(f, a1), a2)
+#define APP3(f, a1, a2, a3) APP2(APP(f, a1), a2, a3)
+
+#define VAR(s) \
+ gu_new_variant_i(PGF_EDSL_POOL, PGF_EXPR_FUN, PgfExprFun, gu_cstring(#s))
+
+#define APPV(s, a) APP(VAR(s), a)
+#define APPV2(s, a1, a2) APP2(VAR(s), a1, a2)
+#define APPV3(s, a1, a2, a3) APP3(VAR(s), a1, a2)
+
+
+
+#endif // PGF_EDSL_H_