(kind ast.Kind)
| 961 | } |
| 962 | |
| 963 | func (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 | |
| 975 | func (p *Parser) parseExpectedMatchingBrackets(openKind ast.Kind, closeKind ast.Kind, openParsed bool, openPosition int) { |
| 976 | if p.token == closeKind { |
no test coverage detected