Add Set AST Constructor
[satune.git] / src / mutableset.c
index 3f33f9035b1f76ab62d1619a43a663d0466b3f99..18f038b420548738fffcc945d1f8eb50305dbf5a 100644 (file)
@@ -1,3 +1,15 @@
 #include "mutableset.h"
 
-void addElementMSet(MutableSet * set, uint64_t element) { pushVectorInt(set->members, element); }
+MutableSet * allocMutableSet(VarType t) {
+       MutableSet * tmp=(MutableSet *)ourmalloc(sizeof(MutableSet));
+       tmp->type=t;
+       tmp->isRange=false;
+       tmp->low=0;
+       tmp->high=0;
+       tmp->members=allocDefVectorInt();
+       return tmp;
+}
+
+void addElementMSet(MutableSet * set, uint64_t element) {
+       pushVectorInt(set->members, element);
+}