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

Method node_text

atomic-semantic/src/parsers/cpp.rs:688–696  ·  view source on GitHub ↗

Get the text content of a node.

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

Source from the content-addressed store, hash-verified

686
687 /// Get the text content of a node.
688 fn node_text(&self, node: &Node, source: &str) -> String {
689 let start = node.start_byte();
690 let end = node.end_byte();
691 if end <= source.len() {
692 source[start..end].to_string()
693 } else {
694 String::new()
695 }
696 }
697
698 fn walk_tree_for_calls(
699 &self,

Callers 12

extract_function_nameMethod · 0.45
extract_classMethod · 0.45
extract_structMethod · 0.45
extract_namespaceMethod · 0.45
extract_enumMethod · 0.45
extract_type_aliasMethod · 0.45
extract_typedefMethod · 0.45
find_typedef_nameMethod · 0.45
extract_includeMethod · 0.45
extract_defineMethod · 0.45
extract_call_nameMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected