fn parse_node(&mut self) -> CdResult<Node<T>> {
        let (init_idx, _) = self.peek().expect("Node can't be empty!");
        let mut end_idx = init_idx;

        // We read the number until we find the closing parenthesis.
        while let Some((idx, c)) = self.next() {
            if c == ')' {
                let val: T = self.parse_slice(init_idx, end_idx)?;

                // In case the user tries to literally write "NaN" (real funny).
                return if val.is_nan() {
                    Err(CdError::InvalidSymbol { pos: end_idx })
                } else {
                    Ok(Node::ringed(val))
                };
            }

            end_idx = idx;
        }

        // We never found the matching parenthesis.
        Err(CdError::MismatchedParenthesis { pos: self.len() })
    }
/// Parses a multi-character node. This contains a floating point literal
/// inside of a set of parentheses.
///
/// By the time this method is called, we've already skipped the opening
/// parenthesis.
Parses a multi-character node. This contains a floating point literal
inside of a set of parentheses.

By the time this method is called, we've already skipped the opening
parenthesis.
Parses a multi - character node . This contains a floating point literal inside of a set of parentheses . By the time this method is called we ' ve already skipped the opening parenthesis .
fn parse_node(&mut self) -> CdResult<Node<T>> {
        let (init_idx, _) = self.peek().expect("Node can't be empty!");
        let mut end_idx = init_idx;
        // We read the number until we find the closing parenthesis.
        while let Some((idx, c)) = self.next() {
            if c == ')' {
                let val: T = self.parse_slice(init_idx, end_idx)?;
                // In case the user tries to literally write "NaN" (real funny).
                return if val.is_nan() {
                    Err(CdError::InvalidSymbol { pos: end_idx })
                } else {
                    Ok(Node::ringed(val))
                };
            }
            end_idx = idx;
        }
        // We never found the matching parenthesis.
        Err(CdError::MismatchedParenthesis { pos: self.len() })
    }
fn parse_node ( & mut self ) -> CdResult < Node < T > > { let ( init_idx , _ ) = self . peek ( ) . expect ( " " ) ; let mut end_idx = init_idx ; // We read the number until we find the closing parenthesis. while let Some ( ( idx , c ) ) = self . next ( ) { if c == ')' { let val : T = self . parse_slice ( init_idx , end_idx ) ? ; // In case the user tries to literally write "NaN" (real funny). return if val . is_nan ( ) { Err ( CdError :: InvalidSymbol { pos : end_idx } ) } else { Ok ( Node :: ringed ( val ) ) } ; } end_idx = idx ; } // We never found the matching parenthesis. Err ( CdError :: MismatchedParenthesis { pos : self . len ( ) } ) }
Parses a multi-character node.
Parses a multi - character node .
&mut self
&mut self