Fix tabbing
[satune.git] / src / AST / function.h
index 61a6148fb9a568d380a42e1d073a4096401e5a48..50a59ec081c504b849fa1ce0349c0e6e9f35c36b 100644 (file)
@@ -4,11 +4,29 @@
 #include "mymemory.h"
 #include "ops.h"
 #include "structs.h"
+
+#define GETFUNCTIONTYPE(o) (((Function*)o)->type)
+
 struct Function {
-       enum ArithOp op;
-       VectorSet* domains;
+       FunctionType type;
+};
+
+struct FunctionOperator {
+       Function base;
+       ArithOp op;
+       uint numDomains;
+       Set ** domains;
        Set * range;
-       enum OverFlowBehavior overflowbehavior;
+       OverFlowBehavior overflowbehavior;
+};
+
+struct FunctionTable {
+       Function base;
        Table* table;
 };
+
+Function* allocFunctionOperator( ArithOp op, Set ** domain, uint numDomain, Set * range,OverFlowBehavior overflowbehavior);
+Function* allocFunctionTable (Table* table);
+void deleteFunction(Function* This);
+
 #endif