A parameter of the documented declaration. */
| 108 | |
| 109 | /* A parameter of the documented declaration. */ |
| 110 | static 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 | |
| 126 | static bool ts_is_url(const char *t, size_t n) { |
| 127 | size_t i = 0; |
no test coverage detected