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

Function parseStatementLike

packages/babel-parser/src/parser/statement.ts:388–404  ·  view source on GitHub ↗
(
    this: Parser,
    flags: ParseStatementFlag,
  )

Source from the content-addressed store, hash-verified

386 // ImportDeclaration and ExportDeclaration are also handled here so we can throw recoverable errors
387 // when they are not at the top level
388 parseStatementLike(
389 this: Parser,
390 flags: ParseStatementFlag,
391 ):
392 | N.Statement
393 | N.Declaration
394 | N.ImportDeclaration
395 | N.ExportDefaultDeclaration
396 | N.ExportNamedDeclaration
397 | N.ExportAllDeclaration {
398 let decorators: N.Decorator[] | null = null;
399
400 if (this.match(tt.at)) {
401 decorators = this.parseDecorators(true);
402 }
403 return this.parseStatementContent(flags, decorators);
404 }
405
406 parseStatementContent(
407 this: Parser,

Callers

nothing calls this directly

Calls 2

matchMethod · 0.80
parseStatementContentMethod · 0.80

Tested by

no test coverage detected