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

Function parseVarStatement

packages/babel-parser/src/parser/statement.ts:1113–1123  ·  view source on GitHub ↗
(
    this: Parser,
    node: Undone<N.VariableDeclaration>,
    kind: "var" | "let" | "const" | "using" | "await using",
    allowMissingInitializer: boolean = false,
  )

Source from the content-addressed store, hash-verified

1111 // https://tc39.es/ecma262/#prod-VariableStatement
1112 // https://tc39.es/ecma262/#prod-LexicalDeclaration
1113 parseVarStatement(
1114 this: Parser,
1115 node: Undone<N.VariableDeclaration>,
1116 kind: "var" | "let" | "const" | "using" | "await using",
1117 allowMissingInitializer: boolean = false,
1118 ): N.VariableDeclaration {
1119 this.next();
1120 this.parseVar(node, false, kind, allowMissingInitializer);
1121 this.semicolon();
1122 return this.finishNode(node, "VariableDeclaration");
1123 }
1124
1125 // https://tc39.es/ecma262/#prod-WhileStatement
1126 parseWhileStatement(

Callers

nothing calls this directly

Calls 3

nextMethod · 0.80
finishNodeMethod · 0.80
semicolonMethod · 0.45

Tested by

no test coverage detected