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

Method sourceToOffsetPos

packages/babel-parser/src/parser/base.ts:59–61  ·  view source on GitHub ↗
(sourcePos: number)

Source from the content-addressed store, hash-verified

57 declare locData: Uint32Array;
58
59 sourceToOffsetPos(sourcePos: number) {
60 return sourcePos + this.startIndex;
61 }
62
63 offsetToSourcePos(offsetPos: number) {
64 return offsetPos - this.startIndex;

Callers 8

parseLabeledStatementFunction · 0.80
parseIdentifierNameFunction · 0.80
parseArrowMethod · 0.80
parseAsyncArrowHeadMethod · 0.80
skipBlockCommentFunction · 0.80
skipLineCommentFunction · 0.80
skipSpaceFunction · 0.80
readTemplateTokenFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected