debug_node

Function debug_node 

Source
pub fn debug_node(node: &Node<'_>, source_code: &str) -> String
Expand description

Returns a string representation of a tree-sitter node and its children for debugging purposes.

§Arguments

  • node - The tree-sitter node to debug
  • source_code - The source code text that the node was parsed from

§Output Format

For each node, prints its kind and the corresponding source code text, with child nodes indented.