A structural hash of a CST. Ignores span and
CSTNode.value|value since the span can differ if the same text is
parsed twice in two different places, and the value is a mutable memoization
helper.
The result is cached, so hashing a tree costs one walk, ever. Structural
edits do not happen in place -- a traversal rebuilds the nodes above an edit,
and rebuilt nodes start with no cached hash.
A structural hash of a CST. Ignores span and CSTNode.value|value since the span can differ if the same text is parsed twice in two different places, and the value is a mutable memoization helper.
The result is cached, so hashing a tree costs one walk, ever. Structural edits do not happen in place -- a traversal rebuilds the nodes above an edit, and rebuilt nodes start with no cached hash.