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

Method offsetToSourcePos

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

Source from the content-addressed store, hash-verified

57 }
58
59 offsetToSourcePos(offsetPos: number) {
60 return offsetPos - this.startIndex;
61 }
62
63 // This method accepts either a string (plugin name) or an array pair
64 // (plugin name and options object). If an options object is given,

Callers 15

stmtToDirectiveFunction · 0.80
parseLiteralAtNodeFunction · 0.80
parseRegExpLiteralFunction · 0.80
hasPrecedingLineBreakFunction · 0.80
finalizeCommentMethod · 0.80
assertNoSpaceMethod · 0.80
parseConditionalMethod · 0.80
checkParamsMethod · 0.80
parseSubscriptsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected