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

Function parseObjPropValue

packages/babel-parser/src/parser/expression.ts:2373–2400  ·  view source on GitHub ↗
(
    this: Parser,
    prop: Undone<T>,
    startLoc: Position | undefined | null,
    isGenerator: boolean,
    isAsync: boolean,
    isPattern: boolean,
    isAccessor: boolean,
    refExpressionErrors?: ExpressionErrors | null,
  )

Source from the content-addressed store, hash-verified

2371 }
2372
2373 parseObjPropValue<T extends N.ObjectMember>(
2374 this: Parser,
2375 prop: Undone<T>,
2376 startLoc: Position | undefined | null,
2377 isGenerator: boolean,
2378 isAsync: boolean,
2379 isPattern: boolean,
2380 isAccessor: boolean,
2381 refExpressionErrors?: ExpressionErrors | null,
2382 ): T {
2383 const node = (this.parseObjectMethod(
2384 prop as Undone<N.ObjectMethod>,
2385 isGenerator,
2386 isAsync,
2387 isPattern,
2388 isAccessor,
2389 ) ||
2390 this.parseObjectProperty(
2391 prop as Undone<N.ObjectProperty>,
2392 startLoc,
2393 isPattern,
2394 refExpressionErrors,
2395 )) as T;
2396
2397 if (!node) this.unexpected();
2398
2399 return node;
2400 }
2401
2402 // https://tc39.es/ecma262/#prod-PropertyName
2403 // when refExpressionErrors presents, it will parse private name

Callers

nothing calls this directly

Calls 1

parseObjectPropertyMethod · 0.80

Tested by

no test coverage detected