Re: [JS-internals] Improvements to the Sphinx in-tree documentation generation

2013-12-19 Thread Jason Orendorff
Moving back to dev-platform. On 12/17/13 4:41 PM, Gregory Szorc wrote: > I guess what I'm trying to say is that SpiderMonkey/JavaScript appears > lacking in the "language services" arena. The concrete features you mentioned are extracting doc comments and minimization, so that's what I'll address

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-17 Thread Jeff Walden
On 12/16/2013 03:09 PM, Gregory Szorc wrote: > Perhaps Reflect.parse() could grow a new option to expose "comment" nodes or > could attach comment metadata to specific node types? It's really not possible to do the latter. Comments don't appertain to specific nodes at all. They're just random

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Brandon Benvie
On 12/16/2013 12:57 PM, Andrew Sutherland wrote: The Esprima JS parser can already generate comment nodes. The API otherwise conforms to the same output standards as SpiderMonkey's Parser API. There's also acorn, which is an ES5 parser written in JS that's in the tree (http://mxr.mozilla.or

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Eric Shepherd
On December 16, 2013 at 3:50:13 PM, Benjamin Smedberg (benja...@smedbergs.us) wrote: Is there any objection on your side to just having sphinx `mach  build-docs` push directly to MDN? If not, that seems slightly preferable  to posting them at  https://ci.mozilla.org/job/mozilla-central-docs/Tree_D

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Gregory Szorc
On 12/16/13, 12:50 PM, Benjamin Smedberg wrote: On 12/16/2013 3:40 PM, Eric Shepherd wrote: This could be a "best of both worlds" scenario that you guys could be quite happy with. The only reason we haven't finished implementing support for this is that no teams have stepped up to say they'd de

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Benjamin Smedberg
On 12/16/2013 3:40 PM, Eric Shepherd wrote: This could be a "best of both worlds" scenario that you guys could be quite happy with. The only reason we haven't finished implementing support for this is that no teams have stepped up to say they'd definitely use it; once one does, I think it wou

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Eric Shepherd
On December 16, 2013 at 1:21:06 PM, Gregory Szorc (g...@mozilla.com) wrote: I agree our current mechanism for JS documentation is pretty bad. We  desire to document both the source and MDN for obvious reasons. But  nobody wants to burdened with writing docs twice. So typically in-tree  or MDN docs

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Gregory Szorc
On 12/16/13, 10:46 AM, Jeff Walden wrote: On 12/16/2013 01:17 PM, Gregory Szorc wrote: Does SpiderMonkey expose documentation blocks to the AST? If not, should it? No, and probably not. Comments are not tokens, so they're not in the AST. Right now SpiderMonkey pretty much just throws them a

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Jeff Walden
On 12/16/2013 01:17 PM, Gregory Szorc wrote: > Does SpiderMonkey expose documentation blocks to the AST? If not, should it? No, and probably not. Comments are not tokens, so they're not in the AST. Right now SpiderMonkey pretty much just throws them away (except to the extent the comment inclu

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Gijs Kruitbosch
On 16/12/13, 18:17 , Gregory Szorc wrote: Are there any JS doc tools that can export to a machine readable format? Does SpiderMonkey expose documentation blocks to the AST? If not, should it? Other parsers certainly expose comments in the AST; I don't think they explicitly have pointers from t

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Gregory Szorc
On 12/16/13, 12:58 AM, Gijs Kruitbosch wrote: From what I've been able to tell from the interwebs, extracting documentation (autodoc-fashion) from JS/C++/IDL isn't possible with Sphinx. Is that correct? It is possible. Sphinx can consume Doxygen's XML output to generate C++ docs via Breathe

Re: Improvements to the Sphinx in-tree documentation generation

2013-12-16 Thread Gijs Kruitbosch
From what I've been able to tell from the interwebs, extracting documentation (autodoc-fashion) from JS/C++/IDL isn't possible with Sphinx. Is that correct? This makes me sad because it means I probably have to end up copy-pasting my source code documentation elsewhere either way (in which ca

Improvements to the Sphinx in-tree documentation generation

2013-12-12 Thread Gregory Szorc
After I announced the in-tree build docs powered by Sphinx a few months ago [1], a few people came to me and said "that's really cool - I want something like that for my module." I'm pleased to announce that as of bug 939367 landing in inbound a few hours ago, you can now deposit Sphinx docs a