MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / parseArithCommaList

Function parseArithCommaList

src/utils/bash/bashParser.ts:4134–4151  ·  view source on GitHub ↗

Top-level: comma-separated list. arithmetic_expansion emits multiple children.

(
  P: ParseState,
  stop: string,
  mode: ArithMode = 'var',
)

Source from the content-addressed store, hash-verified

4132
4133/** Top-level: comma-separated list. arithmetic_expansion emits multiple children. */
4134function parseArithCommaList(
4135 P: ParseState,
4136 stop: string,
4137 mode: ArithMode = 'var',
4138): TsNode[] {
4139 const out: TsNode[] = []
4140 while (true) {
4141 const e = parseArithTernary(P, stop, mode)
4142 if (e) out.push(e)
4143 skipBlanks(P.L)
4144 if (peek(P.L) === ',' && !isArithStop(P, stop)) {
4145 advance(P.L)
4146 continue
4147 }
4148 break
4149 }
4150 return out
4151}
4152
4153function parseArithTernary(
4154 P: ParseState,

Callers 4

parseCommandFunction · 0.85
parseDollarLikeFunction · 0.85
parseForFunction · 0.85
parseArithPrimaryFunction · 0.85

Calls 6

parseArithTernaryFunction · 0.85
skipBlanksFunction · 0.85
isArithStopFunction · 0.85
advanceFunction · 0.85
peekFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected