Enum rustc_parse::parser::FlatToken [−][src]
pub enum FlatToken {
Token(Token),
AttrTarget(AttributesData),
Empty,
}Expand description
A helper struct used when building an AttrAnnotatedTokenStream from
a LazyTokenStream. Both delimiter and non-delimited tokens
are stored as FlatToken::Token. A vector of FlatTokens
is then ‘parsed’ to build up an AttrAnnotatedTokenStream with nested
AttrAnnotatedTokenTree::Delimited tokens
Variants
Token(Token)A token - this holds both delimiter (e.g. ‘{’ and ‘}’) and non-delimiter tokens
Tuple Fields of Token
0: TokenAttrTarget(AttributesData)Holds the AttributesData for an AST node. The
AttributesData is inserted directly into the
constructed AttrAnnotatedTokenStream as
an AttrAnnotatedTokenTree::Attributes
Tuple Fields of AttrTarget
A special ‘empty’ token that is ignored during the conversion
to an AttrAnnotatedTokenStream. This is used to simplify the
handling of replace ranges.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for FlatToken
impl !UnwindSafe for FlatToken
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Token: 24 bytesAttrTarget: 16 bytesEmpty: 0 bytes