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

Function parseTestAnd

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

Source from the content-addressed store, hash-verified

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

Callers 1

parseTestOrFunction · 0.85

Calls 5

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

Tested by

no test coverage detected