Mercurial > projects > ddmd
comparison dmd/ModuleDeclaration.d @ 174:af724d3510d7
lot os toCBuffer methods implemented
moved shared Type.* stuff into Global
author | korDen |
---|---|
date | Sun, 10 Oct 2010 03:47:23 +0400 |
parents | e6e542f37b94 |
children | e3afd1303184 |
comparison
equal
deleted
inserted
replaced
173:d237b38b5858 | 174:af724d3510d7 |
---|---|
1 module dmd.ModuleDeclaration; | 1 module dmd.ModuleDeclaration; |
2 | 2 |
3 import dmd.common; | 3 import dmd.common; |
4 import dmd.Identifier; | 4 import dmd.Identifier; |
5 import dmd.ArrayTypes; | 5 import dmd.ArrayTypes; |
6 import dmd.OutBuffer; | |
6 | 7 |
7 class ModuleDeclaration | 8 class ModuleDeclaration |
8 { | 9 { |
9 Identifier id; | 10 Identifier id; |
10 Identifiers packages; // array of Identifier's representing packages | 11 Identifiers packages; // array of Identifier's representing packages |
17 this.safe = safe; | 18 this.safe = safe; |
18 } | 19 } |
19 | 20 |
20 string toChars() | 21 string toChars() |
21 { | 22 { |
22 assert(false); | 23 scope OutBuffer buf = new OutBuffer(); |
24 if (packages) | |
25 { | |
26 foreach (pid; packages) | |
27 { | |
28 buf.writestring(pid.toChars()); | |
29 buf.writeByte('.'); | |
30 } | |
31 } | |
32 buf.writestring(id.toChars()); | |
33 buf.writeByte(0); | |
34 return buf.extractString(); | |
23 } | 35 } |
24 } | 36 } |