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

Function createPositionWithColumnOffset

packages/babel-parser/src/util/location.ts:40–46  ·  view source on GitHub ↗
(
  position: Position,
  columnOffset: number,
)

Source from the content-addressed store, hash-verified

38 * function does not skip whitespaces.
39 */
40export function createPositionWithColumnOffset(
41 position: Position,
42 columnOffset: number,
43) {
44 const { line, column, index } = position;
45 return new Position(line, column + columnOffset, index + columnOffset);
46}

Callers 9

parseProgramFunction · 0.90
parsePrivateNameFunction · 0.90
parseTemplateElementFunction · 0.90
parseMaybeAssignMethod · 0.90
readRegexpFunction · 0.90
nextPosFunction · 0.90
readRadixNumberFunction · 0.90
readNumberFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected