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

Function lex_push

src/cypher/cypher.c:72–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 * ══════════════════════════════════════════════════════════════════ */
71
72static void lex_push(cbm_lex_result_t *r, cbm_token_type_t type, const char *text, int pos) {
73 if (r->count >= r->capacity) {
74 r->capacity = r->capacity ? r->capacity * PAIR_LEN : CBM_SZ_32;
75 r->tokens = safe_realloc(r->tokens, r->capacity * sizeof(cbm_token_t));
76 }
77 r->tokens[r->count++] = (cbm_token_t){.type = type, .text = heap_strdup(text), .pos = pos};
78}
79
80static void lex_push_n(cbm_lex_result_t *r, cbm_token_type_t type, const char *start, size_t len,
81 int pos) {

Callers 3

lex_string_literalFunction · 0.85
lex_try_two_charFunction · 0.85
cbm_lexFunction · 0.85

Calls 2

safe_reallocFunction · 0.85
heap_strdupFunction · 0.70

Tested by

no test coverage detected