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

Function ts_is_param

internal/cbm/doclink_ts.c:110–124  ·  view source on GitHub ↗

A parameter of the documented declaration. */

Source from the content-addressed store, hash-verified

108
109/* A parameter of the documented declaration. */
110static bool ts_is_param(const CBMDefinition *def, const char *ref, size_t n) {
111 if (!def->param_names) {
112 return def->signature && ts_param_in_signature(def->signature, ref, n);
113 }
114 for (int i = 0; def->param_names[i]; i++) {
115 const char *p = def->param_names[i];
116 while (*p == '.') {
117 p++; /* a rest parameter */
118 }
119 if (strlen(p) == n && memcmp(p, ref, n) == 0) {
120 return true;
121 }
122 }
123 return false;
124}
125
126static bool ts_is_url(const char *t, size_t n) {
127 size_t i = 0;

Callers 1

ts_pushFunction · 0.85

Calls 1

ts_param_in_signatureFunction · 0.85

Tested by

no test coverage detected