annotate dmd/AttribDeclaration.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.AttribDeclaration;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
114
e28b18c23469 added a module dmd.common for commonly used stuff
Trass3r
parents: 82
diff changeset
3 import dmd.common;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 import dmd.Dsymbol;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 import dmd.Array;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 import dmd.Scope;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7 import dmd.ScopeDsymbol;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8 import dmd.LINK;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9 import dmd.STC;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 import dmd.PROT;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 import dmd.ArrayTypes;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 import dmd.OutBuffer;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 import dmd.HdrGenState;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
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 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
16
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 class AttribDeclaration : Dsymbol
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 {
187
b0d41ff5e0df Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents: 178
diff changeset
19 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
20
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
21 Dsymbols decl; // array of Dsymbol's
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
22
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
23 this(Dsymbols decl)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 {
178
e3afd1303184 Many small bugs fixed
korDen
parents: 131
diff changeset
25 register();
e3afd1303184 Many small bugs fixed
korDen
parents: 131
diff changeset
26
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 this.decl = decl;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
30 Dsymbols include(Scope sc, ScopeDsymbol sd)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32 return decl;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
33 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
34
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
35 override bool addMember(Scope sc, ScopeDsymbol sd, bool memnum)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37 bool m = false;
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
38 auto d = include(sc, sd);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
39
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
40 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
41 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
42 foreach(s; d)
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
43 m |= s.addMember(sc, sd, m | memnum);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
44 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
45
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
46 return m;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
47 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
48
131
206db751bd4c dmdfe 2.037 compiles now
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 114
diff changeset
49 void setScopeNewSc(Scope sc, StorageClass stc, LINK linkage, PROT protection, int explicitProtection, uint structalign)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
50 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
51 if (decl)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
52 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
53 Scope newsc = sc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
54 if (stc != sc.stc || linkage != sc.linkage || protection != sc.protection || explicitProtection != sc.explicitProtection || structalign != sc.structalign)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
55 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
56 // create new one for changes
82
e95073e26356 fixed a hack I used as a lack of copy ctor in D
korDen
parents: 79
diff changeset
57 newsc = sc.clone();
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
58 newsc.flags &= ~SCOPE.SCOPEfree;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
59 newsc.stc = stc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
60 newsc.linkage = linkage;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
61 newsc.protection = protection;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
62 newsc.explicitProtection = explicitProtection;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
63 newsc.structalign = structalign;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
64 }
77
ad4792a1cfd6 more D-ification container accessing
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 74
diff changeset
65 foreach(Dsymbol s; decl)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
66 s.setScope(newsc); // yes, the only difference from semanticNewSc()
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
67 if (newsc != sc)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
68 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
69 sc.offset = newsc.offset;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
70 newsc.pop();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
71 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
72 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
73 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
74
131
206db751bd4c dmdfe 2.037 compiles now
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 114
diff changeset
75 void semanticNewSc(Scope sc, StorageClass stc, LINK linkage, PROT protection, int explicitProtection, uint structalign)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
76 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
77 if (decl)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
78 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
79 Scope newsc = sc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
80 if (stc != sc.stc || linkage != sc.linkage || protection != sc.protection || explicitProtection != sc.explicitProtection || structalign != sc.structalign)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
81 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
82 // create new one for changes
82
e95073e26356 fixed a hack I used as a lack of copy ctor in D
korDen
parents: 79
diff changeset
83 newsc = sc.clone();
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
84 newsc.flags &= ~SCOPE.SCOPEfree;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
85 newsc.stc = stc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
86 newsc.linkage = linkage;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
87 newsc.protection = protection;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
88 newsc.explicitProtection = explicitProtection;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
89 newsc.structalign = structalign;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
90 }
77
ad4792a1cfd6 more D-ification container accessing
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 74
diff changeset
91 foreach(Dsymbol s; decl)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
92 s.semantic(newsc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
93 if (newsc != sc)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
94 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
95 sc.offset = newsc.offset;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
96 newsc.pop();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
97 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
98 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
99 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
100
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
101 override void semantic(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
102 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
103 auto d = include(sc, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
104
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
105 //printf("\tAttribDeclaration::semantic '%s', d = %p\n",toChars(), d);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
106 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
107 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
108 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
109 s.semantic(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
110 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
111 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
112
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
113 override void semantic2(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
114 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
115 auto d = include(sc, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
116
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
117 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
118 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
119 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
120 s.semantic2(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
121 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
122 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
123
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
124 override void semantic3(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
125 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
126 auto d = include(sc, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
127
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
128 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
129 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
130 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
131 s.semantic3(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
132 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
133 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
134
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
135 override void inlineScan()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
136 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
137 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
138
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
139 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
140 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
141 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
142 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
143 //printf("AttribDeclaration.inlineScan %s\n", s.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
144 s.inlineScan();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
145 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
146 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
147 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
148
79
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
149 override void addComment(string comment)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
150 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
151 if (comment !is null)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
152 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
153 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
154 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
155 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
156 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
157 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
158 //printf("AttribDeclaration::addComment %s\n", s.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
159 s.addComment(comment);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
160 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
161 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
162 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
163 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
164
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
165 override void emitComment(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
166 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
167 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
168 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
169
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
170 override string kind()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
171 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
172 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
173 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
174
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
175 override bool oneMember(Dsymbol* ps)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
176 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
177 auto d = include(null, null);
49
0aa7d1437ada AttribDeclaration.oneMember
korDen
parents: 13
diff changeset
178
0aa7d1437ada AttribDeclaration.oneMember
korDen
parents: 13
diff changeset
179 return Dsymbol.oneMembers(d, ps);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
180 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
181
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
182 override bool hasPointers()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
183 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
184 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
185
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
186 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
187 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
188 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
189 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
190 if (s.hasPointers())
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
191 return true;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
192 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
193 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
194
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
195 return false;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
196 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
197
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
198 override void checkCtorConstInit()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
199 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
200 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
201 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
202 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
203 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
204 s.checkCtorConstInit();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
205 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
206 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
207
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
208 override void addLocalClass(ClassDeclarations aclasses)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
209 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
210 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
211 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
212 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
213 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
214 s.addLocalClass(aclasses);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
215 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
216 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
217
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
218 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
219 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
220 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
221 }
79
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
222
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
223 override void toJsonBuffer(OutBuffer buf)
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
224 {
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
225 //writef("AttribDeclaration.toJsonBuffer()\n");
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
226
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
227 Dsymbols d = include(null, null);
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
228
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
229 if (d)
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
230 {
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
231 foreach (Dsymbol s; d)
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
232 {
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
233 //writef("AttribDeclaration.toJsonBuffer %s\n", s.toChars());
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
234 s.toJsonBuffer(buf);
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
235 }
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
236 }
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
237 }
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
238
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
239 override AttribDeclaration isAttribDeclaration() { return this; }
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
240
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
241 override void toObjFile(int multiobj) // compile to .obj file
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
242 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
243 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
244
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
245 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
246 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
247 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
248 s.toObjFile(multiobj);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
249 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
250 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
251
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
252 override int cvMember(ubyte* p)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
253 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
254 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
255 }
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
256 }