MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / parseArithPostfix

Function parseArithPostfix

source code/utils/bash/bashParser.ts:4304–4321  ·  view source on GitHub ↗
(
  P: ParseState,
  stop: string,
  mode: ArithMode,
)

Source from the content-addressed store, hash-verified

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