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

Function parseProcessSub

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

Source from the content-addressed store, hash-verified

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

Callers 3

tryParseRedirectFunction · 0.85
parseWordFunction · 0.85
parseExpansionRestFunction · 0.85

Calls 5

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

Tested by

no test coverage detected