Mercurial > projects > ddmd
annotate dmd/WithScopeSymbol.d @ 192:eb38fdcb3e62 default tip
updated to compile with dmd2.062
author | korDen |
---|---|
date | Sat, 02 Mar 2013 01:25:52 -0800 |
parents | b0d41ff5e0df |
children |
rev | line source |
---|---|
0 | 1 module dmd.WithScopeSymbol; |
2 | |
114 | 3 import dmd.common; |
0 | 4 import dmd.ScopeDsymbol; |
5 import dmd.WithStatement; | |
6 import dmd.Loc; | |
7 import dmd.Identifier; | |
8 import dmd.Dsymbol; | |
9 | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
10 import dmd.DDMDExtensions; |
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
11 |
0 | 12 class WithScopeSymbol : ScopeDsymbol |
13 { | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
14 mixin insertMemberExtension!(typeof(this)); |
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
15 |
0 | 16 WithStatement withstate; |
17 | |
18 this(WithStatement withstate) | |
19 { | |
178 | 20 register(); |
129 | 21 this.withstate = withstate; |
0 | 22 } |
23 | |
72 | 24 override Dsymbol search(Loc loc, Identifier ident, int flags) |
0 | 25 { |
129 | 26 // Acts as proxy to the with class declaration |
27 return withstate.exp.type.toDsymbol(null).search(loc, ident, 0); | |
0 | 28 } |
29 | |
72 | 30 override WithScopeSymbol isWithScopeSymbol() { return this; } |
31 } |