Resolve the FQN of an ObjectScript class_definition node (via its class_name).
| 861 | |
| 862 | // Resolve the FQN of an ObjectScript class_definition node (via its class_name). |
| 863 | static const char *objectscript_get_class_name(CBMExtractCtx *ctx, TSNode node) { |
| 864 | for (uint32_t i = 0; i < ts_node_named_child_count(node); i++) { |
| 865 | TSNode child = ts_node_named_child(node, i); |
| 866 | if (strcmp(ts_node_type(child), "class_name") == 0) { |
| 867 | char *name = cbm_node_text(ctx->arena, child, ctx->source); |
| 868 | if (name && name[0]) { |
| 869 | return cbm_fqn_compute(ctx->arena, ctx->project, ctx->rel_path, name); |
| 870 | } |
| 871 | } |
| 872 | } |
| 873 | return NULL; |
| 874 | } |
| 875 | |
| 876 | // Resolve the QN of an ObjectScript method/classmethod/query node for scope tracking. |
| 877 | static const char *objectscript_get_method_qn(CBMExtractCtx *ctx, TSNode node, |
no test coverage detected