On Sunday, 3 August 2014 at 20:40:47 UTC, Sean Kelly wrote:
This is tricky with a range. With an event-based parser I'd have events for object and array begin / end, but with a range you end up having an element that's a token, which is pretty weird.
Have a look at Token.Kind in the top of the module [1]. The enum has objectStart, objectEnd, arrayStart and arrayEnd. By just looking that that, it seems it already works very similar to an event parser, but with a range API. This is exactly like the XML pull parser in Tango.
[1] http://erdani.com/d/jgrandson.d -- /Jacob Carlborg