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

Function parseModuleSpecifier

test/fixtures/snapshot/typescript.js:37173–37185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37171 return finishNode(factory.createExternalModuleReference(expression), pos);
37172 }
37173 function parseModuleSpecifier() {
37174 if (token() === 10 /* SyntaxKind.StringLiteral */) {
37175 var result = parseLiteralNode();
37176 result.text = internIdentifier(result.text);
37177 return result;
37178 }
37179 else {
37180 // We allow arbitrary expressions here, even though the grammar only allows string
37181 // literals. We check to ensure that it is only a string literal later in the grammar
37182 // check pass.
37183 return parseExpression();
37184 }
37185 }
37186 function parseNamespaceImport() {
37187 // NameSpaceImport:
37188 // * as ImportedBinding

Calls 4

parseLiteralNodeFunction · 0.85
internIdentifierFunction · 0.85
parseExpressionFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…