MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / stringEnd

Function stringEnd

src/extraction/sfc-script.ts:245–253  ·  view source on GitHub ↗
(at: number, quote: number)

Source from the content-addressed store, hash-verified

243
244 /** The offset after the quoted JavaScript string at `at`, or -1: a string ends on its own line. */
245 const stringEnd = (at: number, quote: number): number => {
246 for (let j = at + 1; j < n; j++) {
247 const c = source.charCodeAt(j);
248 if (c === Ch.Backslash) j++;
249 else if (c === quote) return j + 1;
250 else if (c === Ch.Newline) break;
251 }
252 return -1;
253 };
254
255 /** The offset after the template literal at `at`, or -1. */
256 const templateEnd = (at: number, nesting: number): number => {

Callers 1

expressionEndFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected