Build a CommentsDoc object from the leading comments of a class, method, property or variable
Build a CommentsDoc object from the leading comments found in the code before the class/method/properties/variable
Name | Type | Description |
---|---|---|
leadingComments | Array of String | The leadingComments to use |
The currently builded comments
A RegExp to find the @desc, @classdesc, @sample,@type, @param, @return, @returns, @ignore tags
A RegExp to find a type in the string ( a string starting with { and ending with }
Set to uppercase the first letter of a text
Name | Type | Description |
---|---|---|
text | String | The text to capitalize |
This method build a TypeDescription object from the contains of a comment tags
Name | Type | Description |
---|---|---|
commentTag | String | The comment tag |
haveName | Boolean | A flag indicating that commentTag contains also a name to add in the TypeDescription |
Parse a comment tag. A comment tag is a text starting at the beginning of a comment, just after the /** or starting with a @ char and finishing just before the next @ char in the comment or just before the */
Name | Type | Description |
---|---|---|
commentTag | String | The comment tag to parse |
Parse a leading comment and extracts the @desc, @classdesc, @sample,@type, @param, @return, @returns, @ignore tags
Name | Type | Description |
---|---|---|
leadingComment | String | The comment to parse |
Parse a type tag ( the value into {} for a type, param, return or returns tags.
Remove the { } < > ! and space chars from the type, replace the . char with ' of ',
replace the ? char with 'null or ', replace the | char with ' or ' and finally capitalize the first letter
of the types, so '{Number}' is parsed to 'Number', '{?String}' is parsed to 'null or String',
'Array.
Name | Type | Description |
---|---|---|
type | String | The type tag to parse |