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

Function parseWhile

src/utils/bash/bashParser.ts:3189–3198  ·  view source on GitHub ↗
(P: ParseState, kwTok: Token)

Source from the content-addressed store, hash-verified

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

Callers 1

parseCommandFunction · 0.85

Calls 5

leafFunction · 0.85
parseStatementsFunction · 0.85
parseDoGroupFunction · 0.85
mkFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected