Skip to main content

is_reference

Function is_reference 

Source
pub fn is_reference(node_kind: &str, language: &Language) -> bool
Expand description

Determines if a node with the given kind is a reference node for the given language.

Reference nodes are nodes that are used as anchors for diffing. Typically these are nodes that represent significant structural elements in the code, such as source files or function definitions.

You can think of reference nodes as “parts of code humans think about”. I.e. humans rarely think about a specific semicolon in a C++ file, but they do think about entire functions as whole entities.