Classify class label from AST node kind
| 2778 | |
| 2779 | // Classify class label from AST node kind |
| 2780 | static const char *class_label_for_kind(const char *kind) { |
| 2781 | if (strcmp(kind, "interface_declaration") == 0 || strcmp(kind, "interface_type") == 0 || |
| 2782 | strcmp(kind, "trait_item") == 0 || strcmp(kind, "trait_definition") == 0 || |
| 2783 | strcmp(kind, "protocol_declaration") == 0) { |
| 2784 | return "Interface"; |
| 2785 | } |
| 2786 | if (strcmp(kind, "enum_specifier") == 0 || strcmp(kind, "enum_declaration") == 0 || |
| 2787 | strcmp(kind, "enum_item") == 0) { |
| 2788 | return "Enum"; |
| 2789 | } |
| 2790 | if (strcmp(kind, "type_alias_declaration") == 0 || strcmp(kind, "type_item") == 0 || |
| 2791 | strcmp(kind, "type_alias") == 0 || strcmp(kind, "type_definition") == 0) { |
| 2792 | return "Type"; |
| 2793 | } |
| 2794 | return "Class"; |
| 2795 | } |
| 2796 | |
| 2797 | // --- Parameter type extraction --- |
| 2798 |