cancerberoSgx / short-jsdoc

jsdoc implementation with flexible and shorter syntax, written from scratch, with emphasis in rich type support
http://cancerberosgx.github.io/short-jsdoc/doc/guide/
ISC License
19 stars 1 forks source link

Modules, classes, and methods are ignored without their annotations. #5

Open bptremblay opened 8 years ago

bptremblay commented 8 years ago

This is like the behavior of YUIDoc, but not like the behavior of jsDoc. This places a burden on the developer to annotate every public method.

For an algorithm point of view, YUIDoc is sort of like this: 1) Parse source for /\ comments. 2) Read known tokens for annotations & parse optional parameters. 3) Whatever non-commented code that comes after this comment, link to the comment! 4) Apply model to a template.

Whereas jsDoc is more like this: 1) Use AST to identify modules, classes, globals, and methods. 2) Walk through all of these, and look for comments. 3) If comments are found, merge them, if not generate inferred documentation. 4) Apply model to a template.

cancerberoSgx commented 8 years ago

So currently, short-jsdoc is not binding the javascript ast with the jsdoc ast at all. As you said there are at least two approaches to solve this. Currently the easy one for jsdoc would be the yuidoc approach. I will mark this as an enhancement. Thanks.