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

Function parseTestAnd

src/utils/bash/bashParser.ts:3729–3751  ·  view source on GitHub ↗
(P: ParseState, closer: string)

Source from the content-addressed store, hash-verified

3727}
3728
3729function parseTestAnd(P: ParseState, closer: string): TsNode | null {
3730 let left = parseTestUnary(P, closer)
3731 if (!left) return null
3732 while (true) {
3733 skipBlanks(P.L)
3734 if (peek(P.L) === '&' && peek(P.L, 1) === '&') {
3735 const s = P.L.b
3736 advance(P.L)
3737 advance(P.L)
3738 const op = mk(P, '&&', s, P.L.b, [])
3739 const right = parseTestUnary(P, closer)
3740 if (!right) break
3741 left = mk(P, 'binary_expression', left.startIndex, right.endIndex, [
3742 left,
3743 op,
3744 right,
3745 ])
3746 } else {
3747 break
3748 }
3749 }
3750 return left
3751}
3752
3753function parseTestUnary(P: ParseState, closer: string): TsNode | null {
3754 skipBlanks(P.L)

Callers 1

parseTestOrFunction · 0.85

Calls 5

parseTestUnaryFunction · 0.85
skipBlanksFunction · 0.85
advanceFunction · 0.85
peekFunction · 0.70
mkFunction · 0.70

Tested by

no test coverage detected