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

Method get_interface_extends

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

Get interface extends types

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

Source from the content-addressed store, hash-verified

1091
1092 /// Get interface extends types
1093 fn get_interface_extends(&self, node: &Node, source: &str) -> String {
1094 for i in 0..node.child_count() {
1095 if let Some(child) = node.child(i) {
1096 if child.kind() == "extends_type_clause" {
1097 let mut types = Vec::new();
1098 for j in 0..child.child_count() {
1099 if let Some(type_node) = child.child(j) {
1100 if type_node.kind() != "extends" && type_node.kind() != "," {
1101 if let Some(text) = self.node_text(&type_node, source) {
1102 types.push(text);
1103 }
1104 }
1105 }
1106 }
1107 return types.join(", ");
1108 }
1109 }
1110 }
1111 String::new()
1112 }
1113
1114 /// Build method signature
1115 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