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

Function cs_lex_string

internal/cbm/doclink_cs.c:1486–1501  ·  view source on GitHub ↗

"..." with backslash escapes; an unterminated one ends with its line. */

Source from the content-addressed store, hash-verified

1484
1485/* "..." with backslash escapes; an unterminated one ends with its line. */
1486static 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. */
1504static uint32_t cs_lex_verbatim(const cs_lex_t *lx, uint32_t i) {

Callers 1

cs_lex_literalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected