| 1228 | * placed at all. */ |
| 1229 | |
| 1230 | static uint32_t cs_row_of(cs_scan_t *s, uint32_t pos) { |
| 1231 | const char *src = s->ctx->source; |
| 1232 | if (pos < s->row_pos) { |
| 1233 | s->row_pos = 0; |
| 1234 | s->row = 0; |
| 1235 | } |
| 1236 | for (uint32_t i = s->row_pos; i < pos; i++) { |
| 1237 | s->row += src[i] == '\n'; |
| 1238 | } |
| 1239 | s->row_pos = pos; |
| 1240 | return s->row; |
| 1241 | } |
| 1242 | |
| 1243 | /* A new entry of the brace list; its index, or CBM_NOT_FOUND. */ |
| 1244 | static int cs_brace_push(cs_scan_t *s, uint32_t pos, char kind) { |
no outgoing calls
no test coverage detected