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

Method parseModule

src/parser.ts:3326–3336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3324 // https://tc39.github.io/ecma262/#sec-modules
3325
3326 parseModule(): Node.Module {
3327 this.context.strict = true;
3328 this.context.isModule = true;
3329 this.scanner.isModule = true;
3330 const node = this.createNode();
3331 const body = this.parseDirectivePrologues();
3332 while (this.lookahead.type !== Token.EOF) {
3333 body.push(this.parseStatementListItem());
3334 }
3335 return this.finalize(node, new Node.Module(body));
3336 }
3337
3338 parseScript(): Node.Script {
3339 const node = this.createNode();

Callers 3

api-tests.jsFile · 0.80
testParseFunction · 0.80
parseFunction · 0.80

Calls 5

createNodeMethod · 0.95
finalizeMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected