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

Function parseWhile

source code/utils/bash/bashParser.ts:3191–3200  ·  view source on GitHub ↗
(P: ParseState, kwTok: Token)

Source from the content-addressed store, hash-verified

3189}
3190
3191function parseWhile(P: ParseState, kwTok: Token): TsNode {
3192 const kw = leaf(P, kwTok.value, kwTok)
3193 const kids: TsNode[] = [kw]
3194 const cond = parseStatements(P, null)
3195 kids.push(...cond)
3196 const dg = parseDoGroup(P)
3197 if (dg) kids.push(dg)
3198 const last = kids[kids.length - 1]!
3199 return mk(P, 'while_statement', kw.startIndex, last.endIndex, kids)
3200}
3201
3202function parseFor(P: ParseState, forTok: Token): TsNode {
3203 const forKw = leaf(P, forTok.value, forTok)

Callers 1

parseCommandFunction · 0.85

Calls 4

leafFunction · 0.85
parseStatementsFunction · 0.85
parseDoGroupFunction · 0.85
mkFunction · 0.85

Tested by

no test coverage detected