fixed bug in jpeg2000 decoding
[swftools.git] / lib / as3 / expr.h
index e43ecc1..d216c2c 100644 (file)
@@ -1,4 +1,4 @@
-/* ast.h
+/* expr.h
 
    Extension module for the rfxswf library.
    Part of the swftools package.
@@ -25,6 +25,7 @@
 #include "../q.h"
 #include "code.h"
 #include "registry.h"
+#include "pool.h"
 
 DECLARE(node);
 DECLARE(typedcode);
@@ -44,6 +45,7 @@ struct _nodetype {
     typedcode_t (*write)(node_t*n);
     typedcode_t (*read)(node_t*n);
     code_t* (*exec)(node_t*n);
+    constant_t (*eval)(node_t*n);
 };
 
 extern nodetype_t node_plus;
@@ -131,13 +133,17 @@ struct _node {
 node_t* mkdummynode();
 node_t* mkconstnode(constant_t*c);
 node_t* mkcodenode(typedcode_t c);
+node_t* mkstringnode(const char*s);
+node_t* mkaddnode(node_t*n1, node_t*n2);
 node_t* mkmultinode(nodetype_t*t, node_t*one);
 node_t* mknode1(nodetype_t*t, node_t*node);
 node_t* mknode2(nodetype_t*t, node_t*left, node_t*right);
 node_t* mknode3(nodetype_t*t, node_t*one, node_t*two, node_t*three);
 void node_free(node_t*n);
 typedcode_t node_read(node_t*n); //read and free
+typedcode_t node_write(node_t*n); //write and free
 code_t* node_exec(node_t*n); //exec and free
+constant_t node_eval(node_t*n); //eval and free
 void node_dump(node_t*n);
 
 #endif