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

Method parseExpectedJSDoc

internal/parser/parser.go:963–973  ·  view source on GitHub ↗
(kind ast.Kind)

Source from the content-addressed store, hash-verified

961}
962
963func (p *Parser) parseExpectedJSDoc(kind ast.Kind) bool {
964 if p.token == kind {
965 p.nextTokenJSDoc()
966 return true
967 }
968 if !isKeywordOrPunctuation(kind) {
969 panic("Invalid JSDoc kind: expected keyword or punctuation")
970 }
971 p.parseErrorAtCurrentToken(diagnostics.X_0_expected, scanner.TokenToString(kind))
972 return false
973}
974
975func (p *Parser) parseExpectedMatchingBrackets(openKind ast.Kind, closeKind ast.Kind, openParsed bool, openPosition int) {
976 if p.token == closeKind {

Callers 2

Calls 5

nextTokenJSDocMethod · 0.95
TokenToStringFunction · 0.92
isKeywordOrPunctuationFunction · 0.85
panicFunction · 0.85

Tested by

no test coverage detected