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

Method node_text

atomic-semantic/src/parsers/go.rs:321–329  ·  view source on GitHub ↗

Get the text content of a node.

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

Source from the content-addressed store, hash-verified

319
320 /// Get the text content of a node.
321 fn node_text(&self, node: &Node, source: &str) -> String {
322 let start = node.start_byte();
323 let end = node.end_byte();
324 if end <= source.len() {
325 source[start..end].to_string()
326 } else {
327 String::new()
328 }
329 }
330
331 fn walk_tree_for_calls(
332 &self,

Callers 8

extract_functionMethod · 0.45
extract_methodMethod · 0.45
extract_type_specMethod · 0.45
extract_specMethod · 0.45
extract_importMethod · 0.45
extract_call_nameMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected