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

Function parseProcessSub

source code/utils/bash/bashParser.ts:1863–1885  ·  view source on GitHub ↗
(P: ParseState)

Source from the content-addressed store, hash-verified

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