MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / find_class_method_call

Function find_class_method_call

internal/cbm/extract_unified.c:708–731  ·  view source on GitHub ↗

Locate the class_method_call inside an RHS expression (peeking through a couple of common ObjectScript expression container node types).

Source from the content-addressed store, hash-verified

706// Locate the class_method_call inside an RHS expression (peeking through a
707// couple of common ObjectScript expression container node types).
708static TSNode find_class_method_call(TSNode root, const char *end) {
709 (void)end;
710 if (strcmp(ts_node_type(root), "class_method_call") == 0) {
711 return root;
712 }
713 static const char *containers[] = {"expression", "expr_atom", NULL};
714 for (const char **c = containers; *c; c++) {
715 TSNode inner = cbm_find_child_by_kind(root, *c);
716 if (!ts_node_is_null(inner)) {
717 TSNode hit = cbm_find_child_by_kind(inner, "class_method_call");
718 if (!ts_node_is_null(hit)) {
719 return hit;
720 }
721 TSNode inner2 = cbm_find_child_by_kind(inner, "expr_atom");
722 if (!ts_node_is_null(inner2)) {
723 hit = cbm_find_child_by_kind(inner2, "class_method_call");
724 if (!ts_node_is_null(hit)) {
725 return hit;
726 }
727 }
728 }
729 }
730 return cbm_find_child_by_kind(root, "class_method_call");
731}
732
733// On a `Set var = ##class(X).%New()` (or %OpenId/%Open, or a method whose
734// return type is known) map var -> X. On a class `Property`/`Relationship`,

Callers 1

Calls 1

cbm_find_child_by_kindFunction · 0.85

Tested by

no test coverage detected