How to parse JSDoc

时光总嘲笑我的痴心妄想 提交于 2021-01-28 20:00:23

问题


I have an HTML file. There are some JSDoc inside like this:

/**
 * If true, this slider is disabled.  A disabled slider cannot be tapped
 * or dragged to change the slider value.
 *
 * @attribute disabled
 * @type boolean
 * @default false
 */

I need to get info and put into a bean

class MyBean {
    public String comment;
    public String attribute;
    public String type;
    public String defaultValue;
}

How do I parse my HTML file?


回答1:


There are several JSDoc parsers out there. Take a look into doctrine and jsdoc-parse for example.



来源:https://stackoverflow.com/questions/28972262/how-to-parse-jsdoc

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