AST in JSON format
Maciej Stachowiak
mjs at apple.com
Mon Dec 7 07:45:15 PST 2009
On Dec 7, 2009, at 7:22 AM, Kevin Curtis wrote:
> This covers the origin of the idea and some of it's uses:
> https://mail.mozilla.org/pipermail/es-discuss/2009-May/009234.html
>
> I'm interested in JsonML AST as a DSL target.
>
> Hacking the YACC file in jsc to parse the ES5 grammar as expressed in
> JsonML could yield an (executable) spec of sorts.
I can see how modifying the AST client-side prior to execution could
be useful, to implement macro-like processing. But I don't see the use
case for serializing an AST in JSON-like format, or sending it over
the wire that way. It seems like it would be larger (and therefore
slower to transmit), and likely no faster to parse, as compared to
JavaScript source code. So shouldn't the serialization format just be
JS source code?
Regards,
Maciej
More information about the es-discuss
mailing list