PeekIter

Type Alias PeekIter 

Source
pub type PeekIter = Peekable<IntoIter>;

Aliased Type§

pub struct PeekIter { /* private fields */ }

Trait Implementations§

Source§

impl TreeIterExt for PeekIter

Source§

fn skip_puncts(&mut self, stoppers: &str) -> Vec<TokenTree>

skip until Self::next() isn’t a TokenTree::Punct

Source§

fn next_if_num(&mut self) -> Option<Literal>

only progress iter if next is a numeric literal & return it

Source§

fn try_next_float(&mut self) -> Option<(f32, LitFloat)>

Source§

fn peek_punct(&mut self) -> char

get next punct as char without progressing iter, if not a punct its a 'n'

Source§

fn split_punct(self, punct: char) -> Vec<TokenStream>

splits Tokens into multiple TokenStreams by a char delimiter.

  • doesn’t include empty parts.
Source§

fn collect_til_punct(&mut self, punct: char) -> Vec<TokenTree>