[][src]Trait casco::stream::TokenStream

pub trait TokenStream: IntoIterator<Item = TokenTree<Self>> {
    type Group: Group<Self> + Spanned<Self::Span> + Clone + Debug;
    type Ident: Ident + Spanned<Self::Span> + Clone + Debug;
    type Literal: Literal + Spanned<Self::Span> + Clone + Debug;
    type Punct: Punct + Spanned<Self::Span> + Clone + Debug;
    type Span: Copy + Debug;
}

The main type provided by this crate, representing an abstract stream of tokens, or, more specifically, a sequence of token trees. The type provides an interface for iterating over those token trees and, conversely, collecting a number of token trees into one stream.

Associated Types

type Group: Group<Self> + Spanned<Self::Span> + Clone + Debug

A delimited token stream.

type Ident: Ident + Spanned<Self::Span> + Clone + Debug

An identifier.

type Literal: Literal + Spanned<Self::Span> + Clone + Debug

A literal string ("hello"), byte string (b"hello"), character ('a'), byte character (b'a'), an integer or floating point number with or without a suffix (1, 1u8, 2.3, 2.3f32). Boolean literals like true and false do not belong here, they are Idents.

type Punct: Punct + Spanned<Self::Span> + Clone + Debug

An Punct is a single punctuation character like +, - or #.

type Span: Copy + Debug

A region of source code, along with macro expansion information.

Loading content...

Implementors

impl TokenStream for casco::concrete::TokenStream[src]

type Group = Group

type Ident = Ident

type Literal = Literal

type Punct = Punct

type Span = Span

impl TokenStream for casco::proc_macro2::TokenStream[src]

type Group = Group

type Ident = Ident

type Literal = Literal

type Punct = Punct

type Span = Span

Loading content...