MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / sqlv_skip_balanced

Function sqlv_skip_balanced

internal/cbm/sql_values.c:176–191  ·  view source on GitHub ↗

From inside an open parenthesis, consume through its matching ')'. */

Source from the content-addressed store, hash-verified

174
175/* From inside an open parenthesis, consume through its matching ')'. */
176static bool sqlv_skip_balanced(sqlv_scan_t *sc) {
177 int depth = 1;
178 while (sc->i < sc->len) {
179 if (sqlv_skip_comment(sc) || sqlv_skip_any_quoted(sc)) {
180 continue;
181 }
182 char c = sc->s[sc->i];
183 sqlv_step(sc);
184 if (c == '(') {
185 depth++;
186 } else if (c == ')' && --depth == 0) {
187 return true;
188 }
189 }
190 return false;
191}
192
193static bool sqlv_read_string(sqlv_scan_t *sc) {
194 bool nl = false;

Callers 1

sqlv_scan_tupleFunction · 0.85

Calls 3

sqlv_skip_commentFunction · 0.85
sqlv_skip_any_quotedFunction · 0.85
sqlv_stepFunction · 0.85

Tested by

no test coverage detected