Skip whitespace and comments. *ws_only (optional) is cleared if a comment was * among them. */
| 148 | /* Skip whitespace and comments. *ws_only (optional) is cleared if a comment was |
| 149 | * among them. */ |
| 150 | static void sqlv_skip_trivia(sqlv_scan_t *sc, bool *ws_only) { |
| 151 | while (sc->i < sc->len) { |
| 152 | if (isspace((unsigned char)sc->s[sc->i])) { |
| 153 | sqlv_step(sc); |
| 154 | } else if (sqlv_skip_comment(sc)) { |
| 155 | if (ws_only) { |
| 156 | *ws_only = false; |
| 157 | } |
| 158 | } else { |
| 159 | return; |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | /* Consume one quoted or dollar-quoted run if one starts here. */ |
| 165 | static bool sqlv_skip_any_quoted(sqlv_scan_t *sc) { |
no test coverage detected