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

Function parseArithPostfix

src/utils/bash/bashParser.ts:4298–4315  ·  view source on GitHub ↗
(
  P: ParseState,
  stop: string,
  mode: ArithMode,
)

Source from the content-addressed store, hash-verified

4296}
4297
4298function parseArithPostfix(
4299 P: ParseState,
4300 stop: string,
4301 mode: ArithMode,
4302): TsNode | null {
4303 const prim = parseArithPrimary(P, stop, mode)
4304 if (!prim) return null
4305 const c = peek(P.L)
4306 const c1 = peek(P.L, 1)
4307 if ((c === '+' && c1 === '+') || (c === '-' && c1 === '-')) {
4308 const s = P.L.b
4309 advance(P.L)
4310 advance(P.L)
4311 const op = mk(P, c + c1, s, P.L.b, [])
4312 return mk(P, 'postfix_expression', prim.startIndex, op.endIndex, [prim, op])
4313 }
4314 return prim
4315}
4316
4317function parseArithPrimary(
4318 P: ParseState,

Callers 1

parseArithUnaryFunction · 0.85

Calls 4

parseArithPrimaryFunction · 0.85
advanceFunction · 0.85
peekFunction · 0.70
mkFunction · 0.70

Tested by

no test coverage detected