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

Function hasPrecedingLineBreak

packages/babel-parser/src/parser/util.ts:128–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126 }
127
128 hasPrecedingLineBreak(): boolean {
129 return hasNewLine(
130 this.input,
131 this.offsetToSourcePos(this.state.lastTokEndLoc!.index),
132 this.state.start,
133 );
134 }
135
136 hasFollowingLineBreak(): boolean {
137 return hasNewLine(this.input, this.state.end, this.nextTokenStart());

Callers

nothing calls this directly

Calls 2

hasNewLineFunction · 0.90
offsetToSourcePosMethod · 0.80

Tested by

no test coverage detected