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

Method sourceWithOffset

packages/babel-generator/src/printer.ts:541–551  ·  view source on GitHub ↗
(
    prop: "start" | "end",
    loc: Loc | null | undefined,
    columnOffset: number,
  )

Source from the content-addressed store, hash-verified

539 }
540
541 sourceWithOffset(
542 prop: "start" | "end",
543 loc: Loc | null | undefined,
544 columnOffset: number,
545 ): void {
546 if (!loc || this.format.preserveFormat) return;
547
548 this._catchUp(prop, loc);
549
550 this._buf.sourceWithOffset(prop, loc, columnOffset);
551 }
552
553 sourceIdentifierName(identifierName: string, pos?: Pos): void {
554 if (!this._buf._canMarkIdName) return;

Callers 2

rightBraceMethod · 0.95
rightParensMethod · 0.95

Calls 1

_catchUpMethod · 0.95

Tested by

no test coverage detected