dmd json file output

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Jan 21 06:37:06 PST 2013


On 1/21/13, Walter Bright <newshound2 at digitalmars.com> wrote:
> I think it's better to just put out the deco for the type:
>
> "type" : "PPPi"

It seems the simplest to implement. And core.demangle can be used to
get a string representation, which could eliminate the need for the
'pretty' field?

FWIW the way this is done for C++ typeinfo in .xml files is:

  <Variable id="_4" name="foo" type="_3">
  <PointerType id="_3" type="_2" size="32" align="32"/>
  <PointerType id="_2" type="_1" size="32" align="32"/>
  <PointerType id="_1" type="_0" size="32" align="32"/>
  <FundamentalType id="_0" name="int" size="32" align="32"/>

And then another variable such as PPi would have the type field set to _1.

But it would probably be overkill to try to do this for Json right
now, PPPi is a simple solution.


More information about the Digitalmars-d mailing list