MCPcopy Index your code
hub / github.com/nodejs/node / parseAmbientExternalModuleDeclaration

Function parseAmbientExternalModuleDeclaration

test/fixtures/snapshot/typescript.js:36998–37019  ·  view source on GitHub ↗
(pos, hasJSDoc, decorators, modifiers)

Source from the content-addressed store, hash-verified

36996 return withJSDoc(finishNode(node, pos), hasJSDoc);
36997 }
36998 function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
36999 var flags = 0;
37000 var name;
37001 if (token() === 157 /* SyntaxKind.GlobalKeyword */) {
37002 // parse 'global' as name of global scope augmentation
37003 name = parseIdentifier();
37004 flags |= 1024 /* NodeFlags.GlobalAugmentation */;
37005 }
37006 else {
37007 name = parseLiteralNode();
37008 name.text = internIdentifier(name.text);
37009 }
37010 var body;
37011 if (token() === 18 /* SyntaxKind.OpenBraceToken */) {
37012 body = parseModuleBlock();
37013 }
37014 else {
37015 parseSemicolon();
37016 }
37017 var node = factory.createModuleDeclaration(decorators, modifiers, name, body, flags);
37018 return withJSDoc(finishNode(node, pos), hasJSDoc);
37019 }
37020 function parseModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
37021 var flags = 0;
37022 if (token() === 157 /* SyntaxKind.GlobalKeyword */) {

Callers 1

parseModuleDeclarationFunction · 0.85

Calls 8

parseIdentifierFunction · 0.85
parseLiteralNodeFunction · 0.85
internIdentifierFunction · 0.85
parseModuleBlockFunction · 0.85
parseSemicolonFunction · 0.85
withJSDocFunction · 0.85
finishNodeFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…