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

Function elixir_process_call

internal/cbm/extract_channels.c:904–928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

902}
903
904static void elixir_process_call(CBMExtractCtx *ctx, TSNode call) {
905 TSNode target = ts_node_child_by_field_name(call, TS_FIELD("target"));
906 if (ts_node_is_null(target)) {
907 return;
908 }
909 char *target_text = cbm_node_text(ctx->arena, target, ctx->source);
910 if (!target_text) {
911 return;
912 }
913
914 TSNode args = ts_node_child_by_field_name(call, TS_FIELD("arguments"));
915
916 if (strstr(target_text, "PubSub.broadcast") || strstr(target_text, "PubSub.local_broadcast")) {
917 elixir_emit_second_arg(ctx, call, args, "phoenix_pubsub", CBM_CHANNEL_EMIT);
918 return;
919 }
920 if (strstr(target_text, "PubSub.subscribe")) {
921 elixir_emit_second_arg(ctx, call, args, "phoenix_pubsub", CBM_CHANNEL_LISTEN);
922 return;
923 }
924 if (strcmp(target_text, "push") == 0 || strcmp(target_text, "broadcast") == 0 ||
925 strcmp(target_text, "broadcast!") == 0) {
926 elixir_emit_second_arg(ctx, call, args, "phoenix_channel", CBM_CHANNEL_EMIT);
927 }
928}
929
930/* Detect handle_in("event", payload, socket) — Phoenix Channel listener */
931static void elixir_process_function_def(CBMExtractCtx *ctx, TSNode func_def) {

Callers 1

extract_channels_elixirFunction · 0.85

Calls 2

cbm_node_textFunction · 0.85
elixir_emit_second_argFunction · 0.85

Tested by

no test coverage detected