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

Function parseInitializer

packages/babel-parser/src/parser/statement.ts:2181–2194  ·  view source on GitHub ↗
(
    this: Parser,
    node: Undone<
      N.ClassProperty | N.ClassPrivateProperty | N.ClassAccessorProperty
    >,
  )

Source from the content-addressed store, hash-verified

2179
2180 // https://tc39.es/ecma262/#prod-Initializer
2181 parseInitializer(
2182 this: Parser,
2183 node: Undone<
2184 N.ClassProperty | N.ClassPrivateProperty | N.ClassAccessorProperty
2185 >,
2186 ): void {
2187 this.scope.enter(ScopeFlag.CLASS | ScopeFlag.SUPER);
2188 this.expressionScope.enter(sharedExpressionScope);
2189 this.prodParam.enter(ParamKind.PARAM);
2190 node.value = this.eat(tt.eq) ? this.parseMaybeAssignAllowIn() : null;
2191 this.expressionScope.exit();
2192 this.prodParam.exit();
2193 this.scope.exit();
2194 }
2195
2196 parseClassId(
2197 node: Undone<N.Class | N.StructDeclaration>,

Callers

nothing calls this directly

Calls 2

enterMethod · 0.45
exitMethod · 0.45

Tested by

no test coverage detected