Skip to main content

structural_hash

Function structural_hash 

Source
pub fn structural_hash(node: Node<'_>, source: &[u8]) -> String
Expand description

Compute a structural hash from a tree-sitter AST node. Strips comments and normalizes whitespace so formatting-only changes produce the same hash. Uses streaming xxHash64 to avoid intermediate string allocations.