pub fn push_with_span_index(
        &mut self,
        node: Node,
        span_index: AstIndex,
    ) -> Result<AstIndex, ParserError> {
        self.nodes.push(AstNode {
            node,
            span: span_index,
        });
        AstIndex::try_from(self.nodes.len() - 1).map_err(|_| {
            ParserError::new(
                InternalError::AstCapacityOverflow.into(),
                *self.span(span_index),
            )
        })
    }
/// Pushes a node onto the tree, associating it with an existing span
Pushes a node onto the tree, associating it with an existing span
Pushes a node onto the tree associating it with an existing span
pub fn push_with_span_index(
        &mut self,
        node: Node,
        span_index: AstIndex,
    ) -> Result<AstIndex, ParserError> {
        self.nodes.push(AstNode {
            node,
            span: span_index,
        });
        AstIndex::try_from(self.nodes.len() - 1).map_err(|_| {
            ParserError::new(
                InternalError::AstCapacityOverflow.into(),
                *self.span(span_index),
            )
        })
    }
pub fn push_with_span_index ( & mut self , node : Node , span_index : AstIndex , ) -> Result < AstIndex , ParserError > { self . nodes . push ( AstNode { node , span : span_index , } ) ; AstIndex :: try_from ( self . nodes . len ( ) - 1 ) . map_err ( | _ | { ParserError :: new ( InternalError :: AstCapacityOverflow . into ( ) , * self . span ( span_index ) , ) } ) }
Pushes a node onto the tree, associating it with an existing span
Pushes a node onto the tree associating it with an existing span
&mut self
node
Node
span_index
AstIndex
&mut self
node
Node
span_index
AstIndex