MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / get_interface_extends

Method get_interface_extends

atomic-semantic/src/parser.rs:1076–1095  ·  view source on GitHub ↗

Get interface extends types

(&self, node: &Node, source: &str)

Source from the content-addressed store, hash-verified

1074
1075 /// Get interface extends types
1076 fn get_interface_extends(&self, node: &Node, source: &str) -> String {
1077 for i in 0..node.child_count() {
1078 if let Some(child) = node.child(i) {
1079 if child.kind() == "extends_type_clause" {
1080 let mut types = Vec::new();
1081 for j in 0..child.child_count() {
1082 if let Some(type_node) = child.child(j) {
1083 if type_node.kind() != "extends" && type_node.kind() != "," {
1084 if let Some(text) = self.node_text(&type_node, source) {
1085 types.push(text);
1086 }
1087 }
1088 }
1089 }
1090 return types.join(", ");
1091 }
1092 }
1093 }
1094 String::new()
1095 }
1096
1097 /// Build method signature
1098 fn build_method_signature(&self, node: &Node, source: &str) -> String {

Callers 1

extract_interfaceMethod · 0.80

Calls 4

child_countMethod · 0.80
kindMethod · 0.45
node_textMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected