Mercurial > projects > ddmd
view 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 |
line wrap: on
line source
module dmd.ModuleDeclaration; import dmd.common; import dmd.Identifier; import dmd.ArrayTypes; import dmd.OutBuffer; class ModuleDeclaration { Identifier id; Identifiers packages; // array of Identifier's representing packages bool safe; this(Identifiers packages, Identifier id, bool safe) { this.packages = packages; this.id = id; this.safe = safe; } string toChars() { scope OutBuffer buf = new OutBuffer(); if (packages) { foreach (pid; packages) { buf.writestring(pid.toChars()); buf.writeByte('.'); } } buf.writestring(id.toChars()); buf.writeByte(0); return buf.extractString(); } }