1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef AST_NODE_H
#define AST_NODE_H
#include <bu/list.h>
class AstNode
{
public:
enum Type
{
tLeaf = 0x01000000,
tVarName = 0x01000001,
tLiteral = 0x01000002,
tFuncName = 0x01000003,
tNot = 0x01000004,
tComp = 0x01000005,
tCompGt = 0x01000006,
tCompLt = 0x01000007,
tCompGtEq = 0x01000008,
tCompLtEq = 0x01000009,
tStore = 0x0100000A,
tAnd = 0x0100000B,
tOr = 0x0100000C,
tBranch = 0x02000000,
tScope = 0x02000001,
tIf = 0x02000002,
tForEach = 0x02000003,
tWhile = 0x02000004,
tTypeMask = 0x03000000,
};
AstNode( Type eType );
virtual ~AstNode();
Type getType() const { return eType; }
private:
Type eType;
};
#endif
|