Look up a module-level string constant by name. */
| 27 | |
| 28 | /* Look up a module-level string constant by name. */ |
| 29 | static const char *lookup_string_constant(const CBMExtractCtx *ctx, const char *name) { |
| 30 | if (!name || !name[0]) { |
| 31 | return NULL; |
| 32 | } |
| 33 | const CBMStringConstantMap *map = &ctx->string_constants; |
| 34 | for (int i = 0; i < map->count; i++) { |
| 35 | if (strcmp(map->names[i], name) == 0) { |
| 36 | return map->values[i]; |
| 37 | } |
| 38 | } |
| 39 | return NULL; |
| 40 | } |
| 41 | |
| 42 | /* Check if a node type is a string literal */ |
| 43 | static int is_string_like(const char *kind) { |
no outgoing calls
no test coverage detected