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

Function get_thread_parser

internal/cbm/cbm.c:226–239  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 1

cbm_extract_file_exFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected