Mercurial > projects > ddmd
annotate dmd/AlignDeclaration.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 | e3afd1303184 |
children |
rev | line source |
---|---|
0 | 1 module dmd.AlignDeclaration; |
2 | |
114 | 3 import dmd.common; |
0 | 4 import dmd.AttribDeclaration; |
5 import dmd.OutBuffer; | |
6 import dmd.HdrGenState; | |
7 import dmd.Scope; | |
8 import dmd.Dsymbol; | |
9 import dmd.Array; | |
10 | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
11 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
|
12 |
0 | 13 class AlignDeclaration : AttribDeclaration |
14 { | |
187
b0d41ff5e0df
Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents:
178
diff
changeset
|
15 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
|
16 |
0 | 17 uint salign; |
18 | |
74
7e0d548de9e6
Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents:
72
diff
changeset
|
19 this(uint sa, Dsymbols decl) |
0 | 20 { |
178 | 21 register(); |
0 | 22 super(decl); |
23 salign = sa; | |
24 } | |
25 | |
72 | 26 override Dsymbol syntaxCopy(Dsymbol s) |
0 | 27 { |
28 assert(false); | |
29 } | |
30 | |
72 | 31 override void setScope(Scope sc) |
0 | 32 { |
33 //printf("\tAlignDeclaration::setScope '%s'\n",toChars()); | |
34 if (decl) | |
35 { | |
36 setScopeNewSc(sc, sc.stc, sc.linkage, sc.protection, sc.explicitProtection, salign); | |
37 } | |
38 } | |
39 | |
72 | 40 override void semantic(Scope sc) |
0 | 41 { |
42 //printf("\tAlignDeclaration::semantic '%s'\n",toChars()); | |
43 if (decl) | |
44 { | |
45 semanticNewSc(sc, sc.stc, sc.linkage, sc.protection, sc.explicitProtection, salign); | |
46 } | |
47 } | |
48 | |
72 | 49 override void toCBuffer(OutBuffer buf, HdrGenState* hgs) |
0 | 50 { |
51 assert(false); | |
52 } | |
72 | 53 } |