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

Method sourceToOffsetPos

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

Source from the content-addressed store, hash-verified

53 declare locData: Uint32Array;
54
55 sourceToOffsetPos(sourcePos: number) {
56 return sourcePos + this.startIndex;
57 }
58
59 offsetToSourcePos(offsetPos: number) {
60 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