(token, kind, start, width)
| 130570 | } |
| 130571 | } |
| 130572 | function classifyComment(token, kind, start, width) { |
| 130573 | if (kind === 3 /* SyntaxKind.MultiLineCommentTrivia */) { |
| 130574 | // See if this is a doc comment. If so, we'll classify certain portions of it |
| 130575 | // specially. |
| 130576 | var docCommentAndDiagnostics = ts.parseIsolatedJSDocComment(sourceFile.text, start, width); |
| 130577 | if (docCommentAndDiagnostics && docCommentAndDiagnostics.jsDoc) { |
| 130578 | // TODO: This should be predicated on `token["kind"]` being compatible with `HasJSDoc["kind"]` |
| 130579 | ts.setParent(docCommentAndDiagnostics.jsDoc, token); |
| 130580 | classifyJSDocComment(docCommentAndDiagnostics.jsDoc); |
| 130581 | return; |
| 130582 | } |
| 130583 | } |
| 130584 | else if (kind === 2 /* SyntaxKind.SingleLineCommentTrivia */) { |
| 130585 | if (tryClassifyTripleSlashComment(start, width)) { |
| 130586 | return; |
| 130587 | } |
| 130588 | } |
| 130589 | // Simple comment. Just add as is. |
| 130590 | pushCommentRange(start, width); |
| 130591 | } |
| 130592 | function pushCommentRange(start, width) { |
| 130593 | pushClassification(start, width, 1 /* ClassificationType.comment */); |
| 130594 | } |
no test coverage detected