http://d.puremagic.com/issues/show_bug.cgi?id=3415


Rainer Schuetze <r.sagita...@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |r.sagita...@gmx.de


--- Comment #2 from Rainer Schuetze <r.sagita...@gmx.de> 2010-04-14 00:04:47 
PDT ---
This happens for declarations in an AttribDeclaration, where the code for
adding commas is missing. Here's the patch:

Index: json.c
===================================================================
--- json.c    (revision 432)
+++ json.c    (working copy)
@@ -214,11 +214,17 @@

     if (d)
     {
+        size_t offset = buf->offset;
         for (unsigned i = 0; i < d->dim; i++)
         {   Dsymbol *s = (Dsymbol *)d->data[i];
+            if (offset != buf->offset)
+            {   buf->writestring(",\n");
+                offset = buf->offset;
+            }
             //printf("AttribDeclaration::toJsonBuffer %s\n", s->toChars());
             s->toJsonBuffer(buf);
         }
+        JsonRemoveComma(buf);
     }
 }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to