diff dmd/EnumMember.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 e28b18c23469
line wrap: on
line diff
--- a/dmd/EnumMember.d	Sun Aug 29 14:39:08 2010 +0100
+++ b/dmd/EnumMember.d	Mon Aug 30 03:57:51 2010 +0200
@@ -5,6 +5,7 @@
 import dmd.Type;
 import dmd.Loc;
 import dmd.Identifier;
+import dmd.Json;
 import dmd.Scope;
 import dmd.OutBuffer;
 import dmd.HdrGenState;
@@ -58,6 +59,24 @@
 		}
 	}
 
+	override void toJsonBuffer(OutBuffer buf)
+	{
+		//writef("EnumMember.toJsonBuffer()\n");
+		buf.writestring("{\n");
+
+		JsonProperty(buf, Pname, toChars());
+		JsonProperty(buf, Pkind, kind());
+
+		if (comment)
+			JsonProperty(buf, Pcomment, comment);
+
+		if (loc.linnum)
+			JsonProperty(buf, Pline, loc.linnum);
+
+		JsonRemoveComma(buf);
+		buf.writestring("}\n");
+	}
+
 	override string kind()
 	{
 		return "enum member";