From inside an open parenthesis, consume through its matching ')'. */
| 174 | |
| 175 | /* From inside an open parenthesis, consume through its matching ')'. */ |
| 176 | static 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 | |
| 193 | static bool sqlv_read_string(sqlv_scan_t *sc) { |
| 194 | bool nl = false; |
no test coverage detected