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

Function parseArithPostfix

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

Source from the content-addressed store, hash-verified

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

Callers 1

parseArithUnaryFunction · 0.85

Calls 4

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

Tested by

no test coverage detected