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

Function parseObjPropValue

packages/babel-parser/src/parser/expression.ts:2374–2401  ·  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

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

Callers

nothing calls this directly

Calls 1

parseObjectPropertyMethod · 0.80

Tested by

no test coverage detected