Strip generic parameters from a type text (List → List). */
| 224 | |
| 225 | /* Strip generic parameters from a type text (List<String> → List). */ |
| 226 | static const char *strip_generics(CBMArena *a, const char *type_text) { |
| 227 | if (!type_text) |
| 228 | return NULL; |
| 229 | const char *lt = strchr(type_text, '<'); |
| 230 | if (!lt) |
| 231 | return type_text; |
| 232 | return cbm_arena_strndup(a, type_text, (size_t)(lt - type_text)); |
| 233 | } |
| 234 | |
| 235 | /* Strip array suffix (`int[]` → `int`, `String[][]` → `String`, dim=2). */ |
| 236 | static const char *unwrap_array_text(CBMArena *a, const char *type_text, int *out_dim) { |
no test coverage detected