CommentParser
Doc Comment Parser class.
Example:
for (let comment of node.leadingComments) {
let tags = CommentParser.parse(comment);
console.log(tags);
}
Test:
Static Method Summary
Static Public Methods | ||
public static |
buildComment(tags: Tag[]): string build comment from tags |
|
public static |
judge doc comment or not. |
|
public static |
parse comment to tags. |
|
public static |
parseFromNode(node: ASTNode): {tags: Tag[], commentNode: CommentNode} parse node to tags. |
Static Public Methods
public static buildComment(tags: Tag[]): string source
build comment from tags
Params:
Name | Type | Attribute | Description |
tags | Tag[] |
public static isESDoc(commentNode: ASTNode): boolean source
judge doc comment or not.
Params:
Name | Type | Attribute | Description |
commentNode | ASTNode | comment node. |