Mercurial > projects > dil
annotate src/dil/ast/Expression.d @ 838:1ecf05e680ba
Changed build configuration.
From now on, the executable will be placed in bin/.
The postbuild.* scripts for Linux and Windows will place important files in
bin/ and bin/data/.
Added hasType() to class Expression.
Added search() to class Scope.
Added DontKnowYet to struct Types.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Wed, 20 Aug 2008 20:39:16 +0200 |
parents | bcb74c9b895c |
children |
rev | line source |
---|---|
621
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
1 /++ |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
2 Author: Aziz Köksal |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
3 License: GPL3 |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
4 +/ |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
5 module dil.ast.Expression; |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
6 |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
7 import dil.ast.Node; |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
8 import dil.semantic.Types; |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
9 import common; |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
10 |
645
89ee7802c978
Moved semantic() methods of expressions to class SemanticPass1.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
621
diff
changeset
|
11 /// The root class of all expressions. |
621
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
12 abstract class Expression : Node |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
13 { |
769
5e3ef1b2011c
Added and improved documentation.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
684
diff
changeset
|
14 Type type; /// The semantic type of this expression. |
621
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
15 |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
16 this() |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
17 { |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
18 super(NodeCategory.Expression); |
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
19 } |
791
5fe89bb8cbdd
Implemented syntax tree copying.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
769
diff
changeset
|
20 |
838
1ecf05e680ba
Changed build configuration.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
806
diff
changeset
|
21 /// Returns true if the member 'type' is not null. |
1ecf05e680ba
Changed build configuration.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
806
diff
changeset
|
22 bool hasType() |
1ecf05e680ba
Changed build configuration.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
806
diff
changeset
|
23 { |
1ecf05e680ba
Changed build configuration.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
806
diff
changeset
|
24 return type !is null; |
1ecf05e680ba
Changed build configuration.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
806
diff
changeset
|
25 } |
1ecf05e680ba
Changed build configuration.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
806
diff
changeset
|
26 |
791
5fe89bb8cbdd
Implemented syntax tree copying.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
769
diff
changeset
|
27 override abstract Expression copy(); |
621
2ac14bb6b84e
Moved class dil.ast.Expression to its own module.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
28 } |