/// Returns a list of `TokenSlice`s if the stream is a delimited list, breaking the
/// stream on commas.
Returns a list of `TokenSlice`s if the stream is a delimited list, breaking the
stream on commas.
Returns a list of ` TokenSlice ` s if the stream is a delimited list breaking the stream on commas .
pub fn maybe_comma_list(&self) -> Option<Vec<&TokenSlice>> {
        let maybe_tts = self.maybe_delimited();
        let ts: &TokenSlice;
        match maybe_tts {
            Some(t) => {
                ts = t;
            }
            None => {
                return None;
            }
        }
        let splits: Vec<&TokenSlice> = ts.split(|x| match *x {
                TokenTree::Token(_, Token::Comma) => true,
                _ => false,
            })
            .filter(|x| x.len() > 0)
            .collect();
        Some(splits)
    }
pub fn maybe_comma_list ( & self ) -> Option < Vec < & TokenSlice > > { let maybe_tts = self . maybe_delimited ( ) ; let ts : & TokenSlice ; match maybe_tts { Some ( t ) => { ts = t ; } None => { return None ; } } let splits : Vec < & TokenSlice > = ts . split ( | x | match * x { TokenTree :: Token ( _ , Token :: Comma ) => true , _ => false , } ) . filter ( | x | x . len ( ) > 0 ) . collect ( ) ; Some ( splits ) }
Returns a list of `TokenSlice`s if the stream is a delimited list, breaking the
stream on commas.
Returns a list of ` TokenSlice ` s if the stream is a delimited list breaking the stream on commas .
&self