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

Function extract_channels_python

internal/cbm/extract_channels.c:547–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547static void extract_channels_python(CBMExtractCtx *ctx) {
548 chan_const_table_t consts = {0};
549 scan_string_consts_python(ctx, &consts);
550
551 TSNodeStack stack;
552 ts_nstack_init(&stack, ctx->arena, CHAN_STACK_CAP);
553 ts_nstack_push(&stack, ctx->arena, ctx->root);
554
555 while (stack.count > 0) {
556 TSNode node = ts_nstack_pop(&stack);
557 const char *kind = ts_node_type(node);
558 if (strcmp(kind, "call") == 0) {
559 py_process_call(ctx, node, &consts);
560 } else if (strcmp(kind, "decorator") == 0) {
561 py_process_decorator(ctx, node, &consts);
562 }
563 uint32_t count = ts_node_child_count(node);
564 for (int i = (int)count - SKIP_ONE; i >= 0; i--) {
565 ts_nstack_push(&stack, ctx->arena, ts_node_child(node, (uint32_t)i));
566 }
567 }
568}
569
570/* ══════════════════════════════════════════════════════════════════
571 * Go — gorilla/nhooyr websocket (WriteMessage/ReadMessage)

Callers 1

cbm_extract_channelsFunction · 0.85

Calls 6

ts_nstack_initFunction · 0.85
ts_nstack_pushFunction · 0.85
ts_nstack_popFunction · 0.85
py_process_callFunction · 0.85
py_process_decoratorFunction · 0.85

Tested by

no test coverage detected