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

Function get_thread_parser

internal/cbm/cbm.c:225–238  ·  view source on GitHub ↗

Get or create a thread-local parser configured for the given language.

Source from the content-addressed store, hash-verified

223
224// Get or create a thread-local parser configured for the given language.
225static TSParser *get_thread_parser(const TSLanguage *ts_lang, CBMLanguage lang) {
226 if (!tl_parser) {
227 tl_parser = ts_parser_new();
228 if (!tl_parser) {
229 return NULL;
230 }
231 tl_parser_lang = CBM_LANG_COUNT;
232 }
233 if (tl_parser_lang != lang) {
234 ts_parser_set_language(tl_parser, ts_lang);
235 tl_parser_lang = lang;
236 }
237 return tl_parser;
238}
239
240// --- Allocator binding (defense-in-depth, #424) ---
241

Callers 1

cbm_extract_file_implFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected