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

Function sh_list

src/pipeline/pass_shell.c:2595–2609  ·  view source on GitHub ↗

a && b || c: the first runs, the rest only maybe. */

Source from the content-addressed store, hash-verified

2593
2594/* a && b || c: the first runs, the rest only maybe. */
2595static void sh_list(sh_t *s, TSNode n) {
2596 sh_touch_t t = {0};
2597 uint32_t cnt = ts_node_named_child_count(n);
2598 for (uint32_t i = 0; i < cnt; i++) {
2599 TSNode c = ts_node_named_child(n, i);
2600 if (i == 0) {
2601 sh_walk(s, c);
2602 continue;
2603 }
2604 sh_mark_t m = sh_mark(s);
2605 sh_walk(s, c);
2606 sh_clause_end(s, m, &t);
2607 }
2608 sh_group_end(s, &t);
2609}
2610
2611static void sh_if(sh_t *s, TSNode n) {
2612 sh_touch_t t = {0};

Callers 1

sh_walkFunction · 0.85

Calls 4

sh_walkFunction · 0.85
sh_markFunction · 0.85
sh_clause_endFunction · 0.85
sh_group_endFunction · 0.85

Tested by

no test coverage detected