MCPcopy Create free account
hub / github.com/microsoft/typescript-go / parseJSDocLinkPrefix

Method parseJSDocLinkPrefix

internal/parser/jsdoc.go:765–774  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

763}
764
765func (p *Parser) parseJSDocLinkPrefix() (string, bool) {
766 p.skipWhitespaceOrAsterisk()
767 if p.token == ast.KindOpenBraceToken && p.nextTokenJSDoc() == ast.KindAtToken && tokenIsIdentifierOrKeyword(p.nextTokenJSDoc()) {
768 kind := p.scanner.TokenValue()
769 if isJSDocLinkTag(kind) {
770 return kind, true
771 }
772 }
773 return "NONE", false
774}
775
776func isJSDocLinkTag(kind string) bool {
777 return kind == "link" || kind == "linkcode" || kind == "linkplain"

Callers 2

parseJSDocLinkMethod · 0.95

Calls 5

nextTokenJSDocMethod · 0.95
isJSDocLinkTagFunction · 0.85
TokenValueMethod · 0.80

Tested by

no test coverage detected