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

Function sh_run

src/pipeline/pass_shell.c:2855–2866  ·  view source on GitHub ↗

Parse `text` as bash and walk it. */

Source from the content-addressed store, hash-verified

2853
2854/* Parse `text` as bash and walk it. */
2855static void sh_run(sh_t *s, TSParser *parser, const char *text, size_t len) {
2856 if (!ts_parser_set_language(parser, cbm_ts_language(CBM_LANG_BASH))) {
2857 return;
2858 }
2859 TSTree *tree = ts_parser_parse_string(parser, NULL, text, (uint32_t)len);
2860 if (!tree) {
2861 return;
2862 }
2863 s->src = text;
2864 sh_walk(s, ts_tree_root_node(tree));
2865 ts_tree_delete(tree);
2866}
2867
2868static void sh_script(sh_pass_t *p, const char *rel, const char *src, size_t len) {
2869 CBMArena a;

Callers 3

sh_scriptFunction · 0.85
sh_makefileFunction · 0.85
sh_ci_cmdFunction · 0.85

Calls 2

cbm_ts_languageFunction · 0.85
sh_walkFunction · 0.85

Tested by

no test coverage detected