dmd support for IDEs
Jeremie Pelletier
jeremiep at gmail.com
Sun Oct 11 19:47:27 PDT 2009
Walter Bright wrote:
> Jeremie Pelletier wrote:
>> Jeremie Pelletier wrote:
>>> Walter Bright wrote:
>>>> But if you want to contribute, how about a JSON parser for phobos?
>>>> You'll need one anyway for your IDE.
>>>>
>>>> BTW, JSON parsing comes for free with javascript. Why not
>>>> incorporate dmdscript into your IDE as its extension language?
>>>
>>> The official JSON website has tons of bindings, here's the C one:
>>>
>>> http://fara.cs.uni-potsdam.de/~jsg/json_parser/
>>>
>>> I'm gonna try and get it converted to D over the weekend.
>>
>> After some digging into the C sources, I decided I didn't like the way
>> they did it. I wanted the simplicity and elegance of JSON I use with
>> jQuery ($.toJSON and $.parseJSON). I looked again at the simple graphs
>> on json.org and decided it was simple enough to write a D parser from
>> scratch, here's what I have after a few hours of work, both methods
>> works, although I didn't thoroughly tested them yet.
>>
>> http://pastebin.com/f25b67726
>>
>> Let me know what you think and feel free to add it to phobos if you
>> like it :)
>>
>> Jeremie
>
> Looks nice! But it needs to be ported to Phobos, and needs unit tests!
Here you go: http://pastebin.com/f64b75abb
Compiled on dmd 2.033 against phobos with a unittest and it works great :)
I also needed to port my unicode character handling module to phobos
because the one currently used doesn't have a isUniControl() method:
http://pastebin.com/fe47f274
Jeremie
More information about the Digitalmars-d
mailing list