comparison dmd/Declaration.d @ 79:43073c7c7769

updated to 2.035 also implemented a few missing functions still crashes in Import.importAll though
author Trass3r
date Mon, 30 Aug 2010 03:57:51 +0200
parents 2e2a5c3f943a
children acd69f84627e
comparison
equal deleted inserted replaced
78:b98fa8a4bf04 79:43073c7c7769
1 module dmd.Declaration; 1 module dmd.Declaration;
2 2
3 import dmd.Dsymbol; 3 import dmd.Dsymbol;
4 import dmd.Type; 4 import dmd.Type;
5 import dmd.TypedefDeclaration;
5 import dmd.PROT; 6 import dmd.PROT;
6 import dmd.LINK; 7 import dmd.LINK;
7 import dmd.Identifier; 8 import dmd.Identifier;
9 import dmd.Json;
8 import dmd.Scope; 10 import dmd.Scope;
9 import dmd.Loc; 11 import dmd.Loc;
10 import dmd.STC; 12 import dmd.STC;
11 import dmd.FuncDeclaration; 13 import dmd.FuncDeclaration;
12 import dmd.VarDeclaration; 14 import dmd.VarDeclaration;
171 override void emitComment(Scope sc) 173 override void emitComment(Scope sc)
172 { 174 {
173 assert(false); 175 assert(false);
174 } 176 }
175 177
178 override void toJsonBuffer(OutBuffer buf)
179 {
180 //writef("Declaration.toJsonBuffer()\n");
181 buf.writestring("{\n");
182
183 JsonProperty(buf, Pname, toChars());
184 JsonProperty(buf, Pkind, kind());
185 if (type)
186 JsonProperty(buf, Ptype, type.toChars());
187
188 if (comment)
189 JsonProperty(buf, Pcomment, comment);
190
191 if (loc.linnum)
192 JsonProperty(buf, Pline, loc.linnum);
193
194 TypedefDeclaration td = isTypedefDeclaration();
195 if (td)
196 {
197 JsonProperty(buf, "base", td.basetype.toChars());
198 }
199
200 JsonRemoveComma(buf);
201 buf.writestring("}\n");
202 }
203
176 override void toDocBuffer(OutBuffer buf) 204 override void toDocBuffer(OutBuffer buf)
177 { 205 {
178 assert(false); 206 assert(false);
179 } 207 }
180 208