diff 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 diff
--- a/dmd/ModuleDeclaration.d	Sun Oct 10 01:55:35 2010 +0400
+++ b/dmd/ModuleDeclaration.d	Sun Oct 10 03:47:23 2010 +0400
@@ -3,6 +3,7 @@
 import dmd.common;
 import dmd.Identifier;
 import dmd.ArrayTypes;
+import dmd.OutBuffer;
 
 class ModuleDeclaration
 {
@@ -19,6 +20,17 @@
 
     string toChars()
 	{
-		assert(false);
+		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();
 	}
-}
\ No newline at end of file
+}