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

Function swift_call_args

internal/cbm/extract_calls.c:3892–3898  ·  view source on GitHub ↗

Swift models a call as a target expression plus a call_suffix, and its grammar * declares no "arguments" field at all, so the generic field lookup finds * nothing for every Swift call. Reach the argument list through the suffix * instead. A trailing closure has a call_suffix with no value_arguments, which * returns a null node and leaves the call without a string argument, as before. */

Source from the content-addressed store, hash-verified

3890 * instead. A trailing closure has a call_suffix with no value_arguments, which
3891 * returns a null node and leaves the call without a string argument, as before. */
3892static TSNode swift_call_args(TSNode node) {
3893 TSNode suffix = cbm_find_child_by_kind(node, "call_suffix");
3894 if (ts_node_is_null(suffix)) {
3895 return (TSNode){0};
3896 }
3897 return cbm_find_child_by_kind(suffix, "value_arguments");
3898}
3899
3900static bool node_has_token(TSNode node, const char *token) {
3901 uint32_t count = ts_node_child_count(node);

Callers 1

handle_callsFunction · 0.85

Calls 1

cbm_find_child_by_kindFunction · 0.85

Tested by

no test coverage detected