Mercurial > projects > ddmd
annotate dmd/SharedStaticDtorDeclaration.d @ 187:b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
author | Abscissa |
---|---|
date | Tue, 07 Jun 2011 23:37:34 -0400 |
parents | cd48cb899aee |
children | eb38fdcb3e62 |
rev | line source |
---|---|
179 | 1 module dmd.SharedStaticDtorDeclaration; |
2 | |
3 import dmd.StaticDtorDeclaration; | |
4 import dmd.Loc; | |
5 import dmd.Dsymbol; | |
6 import dmd.OutBuffer; | |
7 import dmd.HdrGenState; | |
8 import dmd.FuncDeclaration; | |
9 | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
179
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:
179
diff
changeset
|
11 |
179 | 12 class SharedStaticDtorDeclaration : StaticDtorDeclaration |
13 { | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
179
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:
179
diff
changeset
|
15 |
179 | 16 this(Loc loc, Loc endloc) |
17 { | |
18 super(loc, endloc, "_sharedStaticDtor"); | |
19 } | |
20 | |
21 Dsymbol syntaxCopy(Dsymbol s) | |
22 { | |
23 assert(!s); | |
24 SharedStaticDtorDeclaration sdd = new SharedStaticDtorDeclaration(loc, endloc); | |
25 return FuncDeclaration.syntaxCopy(sdd); | |
26 } | |
27 | |
28 void toCBuffer(OutBuffer buf, HdrGenState* hgs) | |
29 { | |
30 if (!hgs.hdrgen) | |
31 { | |
32 buf.writestring("shared "); | |
33 StaticDtorDeclaration.toCBuffer(buf, hgs); | |
34 } | |
35 } | |
36 | |
37 SharedStaticDtorDeclaration isSharedStaticDtorDeclaration() { return this; } | |
38 } |