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

Function consumeKeyword

src/utils/bash/bashParser.ts:3688–3697  ·  view source on GitHub ↗
(P: ParseState, name: string, kids: TsNode[])

Source from the content-addressed store, hash-verified

3686}
3687
3688function consumeKeyword(P: ParseState, name: string, kids: TsNode[]): void {
3689 skipNewlines(P)
3690 const save = saveLex(P.L)
3691 const t = nextToken(P.L, 'cmd')
3692 if (t.type === 'WORD' && t.value === name) {
3693 kids.push(leaf(P, name, t))
3694 } else {
3695 restoreLex(P.L, save)
3696 }
3697}
3698
3699// ───────────────────── Test & Arithmetic Expressions ─────────────────────
3700

Callers 3

parseIfFunction · 0.85
parseDoGroupFunction · 0.85
parseCaseFunction · 0.85

Calls 6

skipNewlinesFunction · 0.85
saveLexFunction · 0.85
nextTokenFunction · 0.85
leafFunction · 0.85
restoreLexFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected