Mercurial > projects > dil
annotate trunk/src/SyntaxTree.d @ 275:e8de572e4d01
- Changed enum NodeType to NodeCategory.
- Fix in ctor of class Declaration: category is Declaration, not Expression.
author | aziz |
---|---|
date | Mon, 06 Aug 2007 14:00:03 +0000 |
parents | 32d354584b28 |
children | d6b2f7616ca5 |
rev | line source |
---|---|
142 | 1 /++ |
2 Author: Aziz Köksal | |
249 | 3 License: GPL3 |
142 | 4 +/ |
5 module SyntaxTree; | |
189 | 6 import Token; |
142 | 7 |
275 | 8 enum NodeCategory |
142 | 9 { |
10 Declaration, | |
11 Statement, | |
12 Expression, | |
242
7ec7ad8df9da
- Changed type of member tok in class BinaryExpression to Token*.
aziz
parents:
189
diff
changeset
|
13 Type, |
7ec7ad8df9da
- Changed type of member tok in class BinaryExpression to Token*.
aziz
parents:
189
diff
changeset
|
14 Other |
142 | 15 } |
16 | |
17 class Node | |
18 { | |
275 | 19 NodeCategory category; |
189 | 20 Token* begin, end; |
21 | |
275 | 22 this(NodeCategory category) |
142 | 23 { |
275 | 24 this.category = category; |
142 | 25 } |
189 | 26 |
27 void setTokens(Token* begin, Token* end) | |
28 { | |
29 this.begin = begin; | |
30 this.end = end; | |
31 } | |
142 | 32 } |