annotate dmd/AttribDeclaration.d @ 178:e3afd1303184

Many small bugs fixed Made all classes derive from TObject to detect memory leaks (functionality is disabled for now) Began work on overriding backend memory allocations (to avoid memory leaks)
author korDen
date Sun, 17 Oct 2010 07:42:00 +0400
parents 206db751bd4c
children b0d41ff5e0df
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
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 class AttribDeclaration : Dsymbol
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
17 Dsymbols decl; // array of Dsymbol's
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
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(Dsymbols decl)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 {
178
e3afd1303184 Many small bugs fixed
korDen
parents: 131
diff changeset
21 register();
e3afd1303184 Many small bugs fixed
korDen
parents: 131
diff changeset
22
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 this.decl = decl;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
26 Dsymbols include(Scope sc, ScopeDsymbol sd)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 return decl;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
31 override bool addMember(Scope sc, ScopeDsymbol sd, bool memnum)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
33 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
34 auto d = include(sc, sd);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
35
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
38 foreach(s; d)
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
39 m |= s.addMember(sc, sd, m | memnum);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
40 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
41
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
42 return m;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
43 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
44
131
206db751bd4c dmdfe 2.037 compiles now
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 114
diff changeset
45 void setScopeNewSc(Scope sc, StorageClass stc, LINK linkage, PROT protection, int explicitProtection, uint structalign)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
46 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
47 if (decl)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
48 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
49 Scope newsc = sc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
50 if (stc != sc.stc || linkage != sc.linkage || protection != sc.protection || explicitProtection != sc.explicitProtection || structalign != sc.structalign)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
51 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
52 // 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
53 newsc = sc.clone();
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
54 newsc.flags &= ~SCOPE.SCOPEfree;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
55 newsc.stc = stc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
56 newsc.linkage = linkage;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
57 newsc.protection = protection;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
58 newsc.explicitProtection = explicitProtection;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
59 newsc.structalign = structalign;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
60 }
77
ad4792a1cfd6 more D-ification container accessing
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 74
diff changeset
61 foreach(Dsymbol s; decl)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
62 s.setScope(newsc); // yes, the only difference from semanticNewSc()
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
63 if (newsc != sc)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
64 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
65 sc.offset = newsc.offset;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
66 newsc.pop();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
67 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
68 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
69 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
70
131
206db751bd4c dmdfe 2.037 compiles now
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 114
diff changeset
71 void semanticNewSc(Scope sc, StorageClass stc, LINK linkage, PROT protection, int explicitProtection, uint structalign)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
72 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
73 if (decl)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
74 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
75 Scope newsc = sc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
76 if (stc != sc.stc || linkage != sc.linkage || protection != sc.protection || explicitProtection != sc.explicitProtection || structalign != sc.structalign)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
77 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
78 // 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
79 newsc = sc.clone();
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
80 newsc.flags &= ~SCOPE.SCOPEfree;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
81 newsc.stc = stc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
82 newsc.linkage = linkage;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
83 newsc.protection = protection;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
84 newsc.explicitProtection = explicitProtection;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
85 newsc.structalign = structalign;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
86 }
77
ad4792a1cfd6 more D-ification container accessing
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 74
diff changeset
87 foreach(Dsymbol s; decl)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
88 s.semantic(newsc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
89 if (newsc != sc)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
90 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
91 sc.offset = newsc.offset;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
92 newsc.pop();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
93 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
94 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
95 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
96
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
97 override void semantic(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
98 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
99 auto d = include(sc, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
100
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
101 //printf("\tAttribDeclaration::semantic '%s', d = %p\n",toChars(), d);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
102 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
103 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
104 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
105 s.semantic(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
106 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
107 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
108
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
109 override void semantic2(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
110 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
111 auto d = include(sc, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
112
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
113 if (d)
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 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
116 s.semantic2(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
117 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
118 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
119
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
120 override void semantic3(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
121 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
122 auto d = include(sc, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
123
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
124 if (d)
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 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
127 s.semantic3(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
128 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
129 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
130
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
131 override void inlineScan()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
132 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
133 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
134
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
135 if (d)
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 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
138 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
139 //printf("AttribDeclaration.inlineScan %s\n", s.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
140 s.inlineScan();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
141 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
142 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
143 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
144
79
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
145 override void addComment(string comment)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
146 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
147 if (comment !is null)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
148 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
149 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
150 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
151 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
152 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
153 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
154 //printf("AttribDeclaration::addComment %s\n", s.toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
155 s.addComment(comment);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
156 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
157 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
158 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
159 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
160
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
161 override void emitComment(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
162 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
163 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
164 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
165
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
166 override string kind()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
167 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
168 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
169 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
170
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
171 override bool oneMember(Dsymbol* ps)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
172 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
173 auto d = include(null, null);
49
0aa7d1437ada AttribDeclaration.oneMember
korDen
parents: 13
diff changeset
174
0aa7d1437ada AttribDeclaration.oneMember
korDen
parents: 13
diff changeset
175 return Dsymbol.oneMembers(d, ps);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
176 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
177
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
178 override bool hasPointers()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
179 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
180 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
181
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
182 if (d)
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 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
185 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
186 if (s.hasPointers())
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
187 return true;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
188 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
189 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
190
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
191 return false;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
192 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
193
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
194 override void checkCtorConstInit()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
195 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
196 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
197 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
198 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
199 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
200 s.checkCtorConstInit();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
201 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
202 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
203
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
204 override void addLocalClass(ClassDeclarations aclasses)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
205 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
206 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
207 if (d)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
208 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
209 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
210 s.addLocalClass(aclasses);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
211 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
212 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
213
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
214 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
215 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
216 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
217 }
79
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
218
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
219 override void toJsonBuffer(OutBuffer buf)
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
220 {
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
221 //writef("AttribDeclaration.toJsonBuffer()\n");
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
222
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
223 Dsymbols d = include(null, null);
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
224
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
225 if (d)
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
226 {
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
227 foreach (Dsymbol s; d)
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
228 {
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
229 //writef("AttribDeclaration.toJsonBuffer %s\n", s.toChars());
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
230 s.toJsonBuffer(buf);
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
231 }
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
232 }
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
233 }
43073c7c7769 updated to 2.035
Trass3r
parents: 77
diff changeset
234
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
235 override AttribDeclaration isAttribDeclaration() { return this; }
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
236
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
237 override void toObjFile(int multiobj) // compile to .obj file
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
238 {
74
7e0d548de9e6 Switch Arrays of Dsymbols to the new templated Vector type
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 72
diff changeset
239 auto d = include(null, null);
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
240
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
241 if (d)
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 foreach(s; d)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
244 s.toObjFile(multiobj);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
245 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
246 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
247
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
248 override int cvMember(ubyte* p)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
249 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
250 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
251 }
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 49
diff changeset
252 }