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

Method node_text

atomic-semantic/src/parsers/java.rs:593–601  ·  view source on GitHub ↗

Get the text content of a node.

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

Source from the content-addressed store, hash-verified

591
592 /// Get the text content of a node.
593 fn node_text(&self, node: &Node, source: &str) -> String {
594 let start = node.start_byte();
595 let end = node.end_byte();
596 if end <= source.len() {
597 source[start..end].to_string()
598 } else {
599 String::new()
600 }
601 }
602
603 fn walk_tree_for_calls(
604 &self,

Callers 14

extract_classMethod · 0.45
extract_interfaceMethod · 0.45
extract_enumMethod · 0.45
extract_recordMethod · 0.45
extract_methodMethod · 0.45
extract_constructorMethod · 0.45
extract_fieldsMethod · 0.45
extract_importMethod · 0.45
build_class_signatureMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected