Skip to main content

push_node

Function push_node 

Source
pub fn push_node(
    facts: &mut Vec<RawNode>,
    language: Language,
    kind: NodeKind,
    name: Option<String>,
    node: &Node<'_>,
    parent_idx: Option<usize>,
) -> usize
Expand description

Create a RawNode from the supplied metadata and append it to facts.

Returns the index of the newly inserted node so that parent/child relationships can be maintained.