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

Method node_text

atomic-semantic/src/parsers/swift.rs:557–565  ·  view source on GitHub ↗

Get the text content of a node.

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

Source from the content-addressed store, hash-verified

555
556 /// Get the text content of a node.
557 fn node_text(&self, node: &Node, source: &str) -> String {
558 let start = node.start_byte();
559 let end = node.end_byte();
560 if end <= source.len() {
561 source[start..end].to_string()
562 } else {
563 String::new()
564 }
565 }
566
567 fn walk_tree_for_calls(
568 &self,

Callers 12

find_type_identifierMethod · 0.45
extract_functionMethod · 0.45
extract_propertyMethod · 0.45
extract_importMethod · 0.45
extract_typealiasMethod · 0.45
is_exportedMethod · 0.45
build_init_signatureMethod · 0.45
find_property_nameMethod · 0.45
extract_call_nameMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected