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

Function lex_push

src/cypher/cypher.c:75–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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