问题
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