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

Method offsetToSourcePos

packages/babel-parser/src/parser/base.ts:48–50  ·  view source on GitHub ↗
(offsetPos: number)

Source from the content-addressed store, hash-verified

46 }
47
48 offsetToSourcePos(offsetPos: number) {
49 return offsetPos - this.startIndex;
50 }
51
52 // This method accepts either a string (plugin name) or an array pair
53 // (plugin name and options object). If an options object is given,

Callers 13

stmtToDirectiveFunction · 0.80
parseLiteralAtNodeFunction · 0.80
parseRegExpLiteralFunction · 0.80
hasPrecedingLineBreakFunction · 0.80
finalizeCommentMethod · 0.80
assertNoSpaceMethod · 0.80
checkParamsMethod · 0.80
parseClassPropertyMethod · 0.80
parseMethodMethod · 0.80
setLocFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected