edits
[satune.git] / src / AST / element.h
1 #ifndef ELEMENT_H
2 #define ELEMENT_H
3 #include "classlist.h"
4 #include "mymemory.h"
5 #include "structs.h"
6 #include "astnode.h"
7
8 #define GETELEMENTTYPE(o) GETASTNODETYPE(o)
9 #define GETELEMENTPARENTS(o) (&((Element*)o)->parents)
10
11 struct Element {
12         ASTNode base;
13         VectorASTNode parents;
14 };
15
16 struct ElementSet {
17         Element base;
18         Set * set;
19         ElementEncoding * encoding;
20 };
21
22 struct ElementFunction {
23         Element base;
24         Function * function;
25         VectorElement* Elements;
26         Boolean * overflowstatus;
27 };
28
29 Element * allocElementSet(Set *s);
30 Element* allocElementFunction(Function * function, Element ** array, uint numArrays, Boolean * overflowstatus);
31 void deleteElement(Element *This);
32 #endif