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

Function lex_push

src/cypher/cypher.c:74–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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