MCPcopy
hub / github.com/jquery/esprima / parseImportNamespaceSpecifier

Method parseImportNamespaceSpecifier

src/parser.ts:3411–3422  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3409
3410 // import <* as foo> ...;
3411 parseImportNamespaceSpecifier(): Node.ImportNamespaceSpecifier {
3412 const node = this.createNode();
3413
3414 this.expect('*');
3415 if (!this.matchContextualKeyword('as')) {
3416 this.throwError(Messages.NoAsAfterImportNamespace);
3417 }
3418 this.nextToken();
3419 const local = this.parseIdentifierName();
3420
3421 return this.finalize(node, new Node.ImportNamespaceSpecifier(local));
3422 }
3423
3424 parseImportDeclaration(): Node.ImportDeclaration {
3425 if (this.context.inFunctionBody) {

Callers 1

Calls 7

createNodeMethod · 0.95
expectMethod · 0.95
throwErrorMethod · 0.95
nextTokenMethod · 0.95
parseIdentifierNameMethod · 0.95
finalizeMethod · 0.95

Tested by

no test coverage detected