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

Function parseWithStatement

packages/babel-parser/src/parser/statement.ts:1142–1156  ·  view source on GitHub ↗
(
    this: Parser,
    node: Undone<N.WithStatement>,
  )

Source from the content-addressed store, hash-verified

1140 }
1141
1142 parseWithStatement(
1143 this: Parser,
1144 node: Undone<N.WithStatement>,
1145 ): N.WithStatement {
1146 if (this.state.strict) {
1147 this.raise(Errors.StrictWith, this.state.startLoc);
1148 }
1149 this.next();
1150 node.object = this.parseHeaderExpression();
1151
1152 // Parse the statement body.
1153 node.body = this.parseStatement();
1154
1155 return this.finishNode(node, "WithStatement");
1156 }
1157
1158 parseEmptyStatement(node: Undone<N.EmptyStatement>): N.EmptyStatement {
1159 this.next();

Callers

nothing calls this directly

Calls 2

nextMethod · 0.80
finishNodeMethod · 0.80

Tested by

no test coverage detected