MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / parseProcessSub

Function parseProcessSub

src/utils/bash/bashParser.ts:1857–1879  ·  view source on GitHub ↗
(P: ParseState)

Source from the content-addressed store, hash-verified

1855}
1856
1857function parseProcessSub(P: ParseState): TsNode | null {
1858 const c = peek(P.L)
1859 if ((c !== '<' && c !== '>') || peek(P.L, 1) !== '(') return null
1860 const start = P.L.b
1861 advance(P.L)
1862 advance(P.L)
1863 const open = mk(P, c + '(', start, P.L.b, [])
1864 const body = parseStatements(P, ')')
1865 skipBlanks(P.L)
1866 let close: TsNode
1867 if (peek(P.L) === ')') {
1868 const cs = P.L.b
1869 advance(P.L)
1870 close = mk(P, ')', cs, P.L.b, [])
1871 } else {
1872 close = mk(P, ')', P.L.b, P.L.b, [])
1873 }
1874 return mk(P, 'process_substitution', start, close.endIndex, [
1875 open,
1876 ...body,
1877 close,
1878 ])
1879}
1880
1881function scanHeredocBodies(P: ParseState): void {
1882 // Skip to newline if not already there

Callers 3

tryParseRedirectFunction · 0.85
parseWordFunction · 0.85
parseExpansionRestFunction · 0.85

Calls 5

advanceFunction · 0.85
parseStatementsFunction · 0.85
skipBlanksFunction · 0.85
peekFunction · 0.70
mkFunction · 0.70

Tested by

no test coverage detected