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

Method parseNamespaceExportDeclaration

internal/parser/parser.go:2531–2542  ·  view source on GitHub ↗
(pos int, jsdoc jsdocScannerInfo, modifiers *ast.ModifierList)

Source from the content-addressed store, hash-verified

2529}
2530
2531func (p *Parser) parseNamespaceExportDeclaration(pos int, jsdoc jsdocScannerInfo, modifiers *ast.ModifierList) *ast.Node {
2532 p.parseExpected(ast.KindAsKeyword)
2533 p.parseExpected(ast.KindNamespaceKeyword)
2534 saveHasAwaitIdentifier := p.statementHasAwaitIdentifier
2535 name := p.parseIdentifier()
2536 p.statementHasAwaitIdentifier = saveHasAwaitIdentifier
2537 p.parseSemicolon()
2538 // NamespaceExportDeclaration nodes cannot have decorators or modifiers, we attach them here so we can report them in the grammar checker
2539 result := p.finishNode(p.factory.NewNamespaceExportDeclaration(modifiers, name), pos)
2540 p.withJSDoc(result, jsdoc)
2541 return result
2542}
2543
2544func (p *Parser) parseExportDeclaration(pos int, jsdoc jsdocScannerInfo, modifiers *ast.ModifierList) *ast.Node {
2545 saveContextFlags := p.contextFlags

Callers 1

Calls 6

parseExpectedMethod · 0.95
parseIdentifierMethod · 0.95
parseSemicolonMethod · 0.95
finishNodeMethod · 0.95
withJSDocMethod · 0.95

Tested by

no test coverage detected