MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / flushContent

Function flushContent

source code/utils/bash/bashParser.ts:2349–2362  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2347 let contentStart = P.L.b
2348 let contentStartI = P.L.i
2349 const flushContent = (): void => {
2350 if (P.L.b > contentStart) {
2351 // Tree-sitter's extras rule /\s/ has higher precedence than
2352 // string_content (prec -1), so whitespace-only segments are elided.
2353 // `" ${x} "` → (string (expansion)) not (string (string_content)(expansion)(string_content)).
2354 // Note: this intentionally diverges from preserving all content — cc
2355 // tests relying on whitespace-only string_content need updating
2356 // (CCReconcile).
2357 const txt = P.src.slice(contentStartI, P.L.i)
2358 if (!/^[ \t]+$/.test(txt)) {
2359 parts.push(mk(P, 'string_content', contentStart, P.L.b, []))
2360 }
2361 }
2362 }
2363 while (P.L.i < P.L.len) {
2364 const c = peek(P.L)
2365 if (c === '"') break

Callers 1

parseDoubleQuotedFunction · 0.85

Calls 1

mkFunction · 0.85

Tested by

no test coverage detected