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

Method get_interface_extends

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

Get interface extends types

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

Source from the content-addressed store, hash-verified

1119
1120 /// Get interface extends types
1121 fn get_interface_extends(&self, node: &Node, source: &str) -> String {
1122 for i in 0..node.child_count() {
1123 if let Some(child) = node.child(i) {
1124 if child.kind() == "extends_type_clause" {
1125 let mut types = Vec::new();
1126 for j in 0..child.child_count() {
1127 if let Some(type_node) = child.child(j) {
1128 if type_node.kind() != "extends" && type_node.kind() != "," {
1129 if let Some(text) = self.node_text(&type_node, source) {
1130 types.push(text);
1131 }
1132 }
1133 }
1134 }
1135 return types.join(", ");
1136 }
1137 }
1138 }
1139 String::new()
1140 }
1141
1142 /// Build method signature
1143 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