Parser
this file is responsible for parsing comments in code files. it extracts various pieces of information such as description, category, subcategory, link, parameters, return values, and thrown errors from comments using regular expressions.
descriptionMatch
[variable]
Description: This method will extract the description from the comments block
Examples:
.getDescription(comment) => 'This method will extract the description from the comments block' Parser
categoryMatches
[variable]
Description: This method will extract the category from the comments block
Examples:
.getCategory(comment) => 'StringUtil' Parser
subCategoryRegex
[variable]
Description: This method will extract the subcategory from the comments block
Examples:
.getSubCategory(comment) => 'StringUtil' Parser
linkRegex
[variable]
Description: This method will extract the link from the comments block
Examples:
.getLink(comment) => 'StringUtil' Parser
paramsRegex
[variable]
Description: This method will extract all the params from the comments block
Examples:
.getParams(comment) => [{name: 'str', type: 'string', description: 'The string to convert to camel case'}] Parser
moduleRegex
[variable]
Description: This method will extract the module name from the comments block
Examples:
.getModuleName(comment) => 'StringUtil' Parser
returnsMatches
[variable]
Description: This method will extract the returns from the comments block
Examples:
.getReturnsValues(comment) => [{type: 'string', description: 'The string to convert to camel case'}] Parser
exampleRegex
[variable]
Description: This method will extract the examples from the comments block
Examples:
.getExamples(comment) => ['StringUtil.convertToCamelCase(\'hello world\') => \'helloWorld\''] Parser
throwsMatches
[variable]
Description: This method will extract the thrown errors from the comments block
Examples:
.getThrownErrors(comment) => [{type: 'Error', description: 'The string to convert to camel case'}] Parser
referencesRegex
[variable]
Description: This method will extract the references from the comments block
Examples:
.getReferences(comment) => [{text: 'StringUtil', type: 'localModule'}] Parser