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

Function parseWhileStatement

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

Source from the content-addressed store, hash-verified

1124
1125 // https://tc39.es/ecma262/#prod-WhileStatement
1126 parseWhileStatement(
1127 this: Parser,
1128 node: Undone<N.WhileStatement>,
1129 ): N.WhileStatement {
1130 this.next();
1131 node.test = this.parseHeaderExpression();
1132 this.state.labels.push(loopLabel);
1133
1134 // Parse the loop body.
1135 node.body = this.parseStatement();
1136
1137 this.state.labels.pop();
1138
1139 return this.finishNode(node, "WhileStatement");
1140 }
1141
1142 parseWithStatement(
1143 this: Parser,

Callers

nothing calls this directly

Calls 3

nextMethod · 0.80
finishNodeMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected