Compute the dotted class QN for a given class_declaration node, matching * how the unified extractor names defs (module_qn-prefixed). */
| 2868 | /* Compute the dotted class QN for a given class_declaration node, matching |
| 2869 | * how the unified extractor names defs (module_qn-prefixed). */ |
| 2870 | static const char *class_qn_for_node(PHPLSPContext *ctx, TSNode class_node) { |
| 2871 | TSNode name_node = ts_node_child_by_field_name(class_node, "name", 4); |
| 2872 | if (ts_node_is_null(name_node)) |
| 2873 | return NULL; |
| 2874 | char *cname = php_node_text(ctx, name_node); |
| 2875 | if (!cname) |
| 2876 | return NULL; |
| 2877 | if (ctx->module_qn) { |
| 2878 | return cbm_arena_sprintf(ctx->arena, "%s.%s", ctx->module_qn, cname); |
| 2879 | } |
| 2880 | return cbm_arena_strdup(ctx->arena, cname); |
| 2881 | } |
| 2882 | |
| 2883 | static void extract_property_decl(PHPLSPContext *ctx, TSNode prop_decl, php_class_fields_t *out) { |
| 2884 | TSNode tnode = ts_node_child_by_field_name(prop_decl, "type", 4); |
no test coverage detected