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

Method node_text

atomic-semantic/src/parsers/python.rs:346–354  ·  view source on GitHub ↗

Get the text content of a node.

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

Source from the content-addressed store, hash-verified

344
345 /// Get the text content of a node.
346 fn node_text(&self, node: &Node, source: &str) -> String {
347 let start = node.start_byte();
348 let end = node.end_byte();
349 if end <= source.len() {
350 source[start..end].to_string()
351 } else {
352 String::new()
353 }
354 }
355
356 fn walk_tree_for_calls(
357 &self,

Callers 7

extract_functionMethod · 0.45
extract_classMethod · 0.45
extract_assignmentMethod · 0.45
extract_importMethod · 0.45
build_class_signatureMethod · 0.45
extract_call_nameMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected