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

Function get_thread_parser

internal/cbm/cbm.c:654–667  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

652
653// Get or create a thread-local parser configured for the given language.
654static TSParser *get_thread_parser(const TSLanguage *ts_lang, CBMLanguage lang) {
655 if (!tl_parser) {
656 tl_parser = ts_parser_new();
657 if (!tl_parser) {
658 return NULL;
659 }
660 tl_parser_lang = CBM_LANG_COUNT;
661 }
662 if (tl_parser_lang != lang) {
663 ts_parser_set_language(tl_parser, ts_lang);
664 tl_parser_lang = lang;
665 }
666 return tl_parser;
667}
668
669// --- Allocator binding (defense-in-depth, #424) ---
670

Callers 3

extract_cpp_branch_viewsFunction · 0.85
extract_file_ex_bodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected