Compute the dotted class QN for a given class_declaration node, matching * how the unified extractor names defs (module_qn-prefixed). */
| 3090 | /* Compute the dotted class QN for a given class_declaration node, matching |
| 3091 | * how the unified extractor names defs (module_qn-prefixed). */ |
| 3092 | static const char *class_qn_for_node(PHPLSPContext *ctx, TSNode class_node) { |
| 3093 | TSNode name_node = ts_node_child_by_field_name(class_node, "name", 4); |
| 3094 | if (ts_node_is_null(name_node)) |
| 3095 | return NULL; |
| 3096 | char *cname = php_node_text(ctx, name_node); |
| 3097 | if (!cname) |
| 3098 | return NULL; |
| 3099 | if (ctx->module_qn) { |
| 3100 | return cbm_arena_sprintf(ctx->arena, "%s.%s", ctx->module_qn, cname); |
| 3101 | } |
| 3102 | return cbm_arena_strdup(ctx->arena, cname); |
| 3103 | } |
| 3104 | |
| 3105 | static void extract_property_decl(PHPLSPContext *ctx, TSNode prop_decl, php_class_fields_t *out) { |
| 3106 | TSNode tnode = ts_node_child_by_field_name(prop_decl, "type", 4); |
no test coverage detected