[][src]Module casco::stream

Types and traits that provide an abstraction over proc_macro2.

Structs

MultiSpan

Wraps multiple spans into a single struct.

Enums

Delimiter

Describes how a sequence of token trees is delimited.

Spacing

Whether a Punct is followed immediately by another Punct or followed by another token or whitespace.

TokenTree

A single token or a delimited sequence of token trees (e.g. [1, (), ..]).

Traits

Group

A delimited token stream.

Ident

An identifier (ident).

IntoTokenStream

Trait that converts a type into a token stream.

Literal

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.

Punct

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

Spanned

Trait that is implemented by everything that has a span (e.g. groups, idents, literals, puncts, token trees).

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.