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

Function parseExpressionStatement

packages/babel-parser/src/parser/statement.ts:1213–1222  ·  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

1211 }
1212
1213 parseExpressionStatement(
1214 node: Undone<N.ExpressionStatement>,
1215 expr: N.Expression,
1216 // Used by the placeholders plugin to parse placeholder labels
1217 _flags: ParseStatementFlag,
1218 ) {
1219 node.expression = expr;
1220 this.semicolon();
1221 return this.finishNode(node, "ExpressionStatement");
1222 }
1223
1224 // Parse a semicolon-enclosed block of statements, handling `"use
1225 // 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