Are there any open source JSDoc parser written in Javascript?

风流意气都作罢 提交于 2019-12-10 03:11:05

问题


I am looking for a JSDoc parser that I can use in my project. I am looking for something where I can pass in a JSDoc comment and receive a structured description of what that comment means. Most of the tools I have seen seem to be able to transform JSDoc comments into HTML or some other format. I am looking for something that will provide the intermediate representation of a comment that can be used to feed into other tools.

Are there any tools or libraries out there that I can use?


回答1:


The Doctrine project does exactly what I am looking for:

http://eslint.org/doctrine/demo/




回答2:


If you need only parsing functionality and don't care about tags meaning then comment-parser may help




回答3:


There is also a dojo project: https://github.com/wkeese/js-doc-parse

see http://www.sitepen.com/blog/2013/01/18/generating-and-viewing-custom-api-docs/

it will look like the dojo documentation ( http://dojotoolkit.org/api/ )




回答4:


what about jsdoc itself ? - with the command line jsdoc yourfile.js -X > parsed.json . With that you have the official thing.



来源:https://stackoverflow.com/questions/11851556/are-there-any-open-source-jsdoc-parser-written-in-javascript

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!