"..." with backslash escapes; an unterminated one ends with its line. */
| 1484 | |
| 1485 | /* "..." with backslash escapes; an unterminated one ends with its line. */ |
| 1486 | static uint32_t cs_lex_string(const cs_lex_t *lx, uint32_t i) { |
| 1487 | uint32_t j = i + SKIP_ONE; |
| 1488 | while (j < lx->n) { |
| 1489 | char c = lx->src[j]; |
| 1490 | if (c == '\\') { |
| 1491 | j += PAIR_LEN; |
| 1492 | } else if (c == '"') { |
| 1493 | return j + SKIP_ONE; |
| 1494 | } else if (c == '\n') { |
| 1495 | return j; |
| 1496 | } else { |
| 1497 | j++; |
| 1498 | } |
| 1499 | } |
| 1500 | return lx->n; |
| 1501 | } |
| 1502 | |
| 1503 | /* @"..." : a quote is written twice. `i` is at the opening quote. */ |
| 1504 | static uint32_t cs_lex_verbatim(const cs_lex_t *lx, uint32_t i) { |