MCPcopy Index your code
hub / github.com/microsoft/typescript-go / parseSwitchStatement

Method parseSwitchStatement

internal/parser/parser.go:1437–1448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1435}
1436
1437func (p *Parser) parseSwitchStatement() *ast.Node {
1438 pos := p.nodePos()
1439 jsdoc := p.jsdocScannerInfo()
1440 p.parseExpected(ast.KindSwitchKeyword)
1441 p.parseExpected(ast.KindOpenParenToken)
1442 expression := p.parseExpressionAllowIn()
1443 p.parseExpected(ast.KindCloseParenToken)
1444 caseBlock := p.parseCaseBlock()
1445 result := p.finishNode(p.factory.NewSwitchStatement(expression, caseBlock), pos)
1446 p.withJSDoc(result, jsdoc)
1447 return result
1448}
1449
1450func (p *Parser) parseThrowStatement() *ast.Node {
1451 // ThrowStatement[Yield] :

Callers 1

parseStatementMethod · 0.95

Calls 8

nodePosMethod · 0.95
jsdocScannerInfoMethod · 0.95
parseExpectedMethod · 0.95
parseCaseBlockMethod · 0.95
finishNodeMethod · 0.95
withJSDocMethod · 0.95
NewSwitchStatementMethod · 0.80

Tested by

no test coverage detected