[−][src]Trait casco::stream::TokenStream
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 Ident
s.
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.