<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Feb 17, 2015 at 2:15 PM, Blair McBride <span dir="ltr"><<a href="mailto:bmcbride@mozilla.com" target="_blank">bmcbride@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Gijs Kruitbosch wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Because we already have a working parser and AST generator - Reflect.parse. Its output format, last I checked, is largely compatible with the existing toolset.<br>
</blockquote>
<br></span>
Reflect.parse's output is the standard that pretty much all other tools are based on. However, it's also inadequate for usage in pretty much all other tools. It's missing key things such as support for comments[1] - which many tools rely on. And of course there's the issue of nodejs compatibility. Other parsers are roughly the same, until you get down to certain details.<br>
<br>
There's been some activity lately in being more intentional and organised around parsing and AST trees, and developing a more formal spec, with <a href="https://github.com/estree/estree" target="_blank">https://github.com/estree/estree</a><br></blockquote><div><br></div><div>That reminds me of another area for improvement: automatic documentation generation. I think its wasteful of developers' time to update inline source/API docs *and* MDN. We should generate API docs from source code and markup MDN docs with additional comments, like how MSDN, <a href="http://php.net">php.net</a>, etc do their docs. Extraction of documentation from source also enables IDEs and editors to have cool features like autocomplete and pop-ups containing usage docs. This does poke the hornets nest of how to format docs. But I'd like to think the end result outweighs the pain to transition to it.<br></div></div></div></div>