Skip to main content

symbol_from_node

Function symbol_from_node 

Source
pub fn symbol_from_node(
    name: String,
    kind: SymbolKind,
    node: &Node<'_>,
    source: &str,
    parent_index: Option<usize>,
) -> ExtractedSymbol
Expand description

Build an ExtractedSymbol from a tree-sitter node.

Every language extracts name/kind from different node shapes, but the conversion from a tree-sitter Node to position fields is always the same.