Mercurial > projects > dil
annotate trunk/src/dil/Symbol.d @ 560:709e223a8eb9
Added code related to symbols.
Added class ScopeSymbol. Module inherits from ScopeSymbol now.
Added methods classScope() and moduleScope(), and member symbol to class Scope.
Added enum SYM. Added member sid to class Symbol.
Aggregate and Function inherit from ScopeSymbol now.
Added Error to struct Types.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Wed, 26 Dec 2007 14:17:01 +0100 |
parents | 5431c0faf3b5 |
children | 302e50e71ec2 |
rev | line source |
---|---|
407
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
1 /++ |
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
2 Author: Aziz Köksal |
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
3 License: GPL3 |
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
4 +/ |
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
5 module dil.Symbol; |
560
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
6 |
407
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
7 import common; |
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
8 |
560
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
9 enum SYM |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
10 { |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
11 Module, |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
12 Class, |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
13 Struct, |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
14 Union, |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
15 Variable, |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
16 Function, |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
17 Type, |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
18 } |
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
19 |
407
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
20 class Symbol |
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
21 { |
560
709e223a8eb9
Added code related to symbols.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
407
diff
changeset
|
22 SYM sid; |
407
5431c0faf3b5
Added modules dil.Scope and dil.Symbol.
Aziz K?ksal <aziz.koeksal@gmail.com>
parents:
diff
changeset
|
23 } |