summaryrefslogtreecommitdiff
path: root/src/astnode.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-12-24 01:08:21 -0700
committerMike Buland <eichlan@xagasoft.com>2011-12-24 01:08:21 -0700
commit32c32bc48c8fd7cffca301b8919fb26726f6467e (patch)
treefbe58058531f253e4e351312f87e8276ce087c31 /src/astnode.h
parentd7c0a793787eaf52c4302d6d1ea6cc43f7ff9ca7 (diff)
downloadstage-32c32bc48c8fd7cffca301b8919fb26726f6467e.tar.gz
stage-32c32bc48c8fd7cffca301b8919fb26726f6467e.tar.bz2
stage-32c32bc48c8fd7cffca301b8919fb26726f6467e.tar.xz
stage-32c32bc48c8fd7cffca301b8919fb26726f6467e.zip
Ast nearly done, builder coming along.
Diffstat (limited to 'src/astnode.h')
-rw-r--r--src/astnode.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/astnode.h b/src/astnode.h
index 780e07e..9584788 100644
--- a/src/astnode.h
+++ b/src/astnode.h
@@ -6,31 +6,38 @@
6class AstNode 6class AstNode
7{ 7{
8public: 8public:
9 AstNode();
10 virtual ~AstNode();
11
12 enum Type 9 enum Type
13 { 10 {
14 tValue = 0x01000000, 11 tLeaf = 0x01000000,
15 tVarName = 0x01000001, 12 tVarName = 0x01000001,
16 tLiteral = 0x01000002, 13 tLiteral = 0x01000002,
17 tFuncName = 0x01000003, 14 tFuncName = 0x01000003,
15 tNot = 0x01000004,
16 tComp = 0x01000005,
17 tCompGt = 0x01000006,
18 tCompLt = 0x01000007,
19 tCompGtEq = 0x01000008,
20 tCompLtEq = 0x01000009,
21 tStore = 0x0100000A,
22 tAnd = 0x0100000B,
23 tOr = 0x0100000C,
24
18 tBranch = 0x02000000, 25 tBranch = 0x02000000,
19 tScope = 0x02000001, 26 tScope = 0x02000001,
20 tIf = 0x02000002, 27 tIf = 0x02000002,
21 tElse = 0x02000003, 28 tForEach = 0x02000003,
22 tNot = 0x00000004, 29 tWhile = 0x02000004,
23 tComp = 0x02000005, 30
24 tCompGt = 0x02000006, 31 tTypeMask = 0x03000000,
25 tCompLt = 0x02000007,
26 tCompGtEq = 0x02000008,
27 tCompLtEq = 0x02000009,
28 tStore = 0x0200000A,
29 tAnd = 0x0200000B,
30 tOr = 0x0200000C,
31 }; 32 };
33
34 AstNode( Type eType );
35 virtual ~AstNode();
36
37 Type getType() const { return eType; }
32 38
33private: 39private:
40 Type eType;
34}; 41};
35 42
36#endif 43#endif