Mercurial > projects > dil
comparison trunk/src/dil/ast/Types.d @ 701:65ad2f96df1f
Moved TypeNode to new module dil.ast.Type.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sat, 26 Jan 2008 23:53:34 +0100 |
parents | 19a34b69cc7d |
children | 5e3ef1b2011c |
comparison
equal
deleted
inserted
replaced
700:8e252b7c1459 | 701:65ad2f96df1f |
---|---|
2 Author: Aziz Köksal | 2 Author: Aziz Köksal |
3 License: GPL3 | 3 License: GPL3 |
4 +/ | 4 +/ |
5 module dil.ast.Types; | 5 module dil.ast.Types; |
6 | 6 |
7 public import dil.ast.Type; | |
7 import dil.ast.Node; | 8 import dil.ast.Node; |
8 import dil.ast.Expression; | 9 import dil.ast.Expression; |
9 import dil.ast.Parameters; | 10 import dil.ast.Parameters; |
10 import dil.lexer.Identifier; | 11 import dil.lexer.Identifier; |
11 import dil.semantic.Types; | 12 import dil.semantic.Types; |
12 import dil.Enums; | 13 import dil.Enums; |
13 | 14 |
14 /// The base class of all type nodes. | |
15 abstract class TypeNode : Node | |
16 { | |
17 TypeNode next; | |
18 Type type; /// The semantic type of this type node. | |
19 | |
20 this() | |
21 { | |
22 this(null); | |
23 } | |
24 | |
25 this(TypeNode next) | |
26 { | |
27 super(NodeCategory.Type); | |
28 addOptChild(next); | |
29 this.next = next; | |
30 } | |
31 } | |
32 | |
33 /// Syntax error. | 15 /// Syntax error. |
34 class IllegalType : TypeNode | 16 class IllegalType : TypeNode |
35 { | 17 { |
36 this() | 18 this() |
37 { | 19 { |