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

Function parseExpressionStatement

packages/babel-parser/src/parser/statement.ts:1210–1219  ·  view source on GitHub ↗
(
    node: Undone<N.ExpressionStatement>,
    expr: N.Expression,
    // Used by the placeholders plugin to parse placeholder labels
    _flags: ParseStatementFlag,
  )

Source from the content-addressed store, hash-verified

1208 }
1209
1210 parseExpressionStatement(
1211 node: Undone<N.ExpressionStatement>,
1212 expr: N.Expression,
1213 // Used by the placeholders plugin to parse placeholder labels
1214 _flags: ParseStatementFlag,
1215 ) {
1216 node.expression = expr;
1217 this.semicolon();
1218 return this.finishNode(node, "ExpressionStatement");
1219 }
1220
1221 // Parse a semicolon-enclosed block of statements, handling `"use
1222 // strict"` declarations when `allowDirectives` is true (used for

Callers

nothing calls this directly

Calls 2

finishNodeMethod · 0.80
semicolonMethod · 0.45

Tested by

no test coverage detected