MCPcopy Create free account
hub / github.com/babel/babel / parseModuleItem

Function parseModuleItem

packages/babel-parser/src/parser/statement.ts:339–348  ·  view source on GitHub ↗
(this: Parser)

Source from the content-addressed store, hash-verified

337
338 // https://tc39.es/ecma262/#prod-ModuleItem
339 parseModuleItem(this: Parser) {
340 return this.parseStatementLike(
341 ParseStatementFlag.AllowImportExport |
342 ParseStatementFlag.AllowDeclaration |
343 ParseStatementFlag.AllowFunctionDeclaration |
344 // This function is actually also used to parse StatementItems,
345 // which with Annex B enabled allows labeled functions.
346 ParseStatementFlag.AllowLabeledFunction,
347 );
348 }
349
350 // https://tc39.es/ecma262/#prod-StatementListItem
351 parseStatementListItem(this: Parser) {

Callers

nothing calls this directly

Calls 1

parseStatementLikeMethod · 0.80

Tested by

no test coverage detected