Enum rustc_parse::parser::FlatToken
source · pub enum FlatToken {
Token(Token),
AttrTarget(AttributesData),
Empty,
}
Expand description
A helper struct used when building an AttrTokenStream
from
a LazyAttrTokenStream
. Both delimiter and non-delimited tokens
are stored as FlatToken::Token
. A vector of FlatToken
s
is then ‘parsed’ to build up an AttrTokenStream
with nested
AttrTokenTree::Delimited
tokens.
Variants§
Token(Token)
A token - this holds both delimiter (e.g. ‘{’ and ‘}’) and non-delimiter tokens
AttrTarget(AttributesData)
Holds the AttributesData
for an AST node. The
AttributesData
is inserted directly into the
constructed AttrTokenStream
as
an AttrTokenTree::Attributes
.
Empty
A special ‘empty’ token that is ignored during the conversion
to an AttrTokenStream
. This is used to simplify the
handling of replace ranges.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FlatToken
impl !Send for FlatToken
impl !Sync for FlatToken
impl Unpin for FlatToken
impl !UnwindSafe for FlatToken
Blanket Implementations§
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: 24 bytes
Size for each variant:
Token
: 24 bytesAttrTarget
: 24 bytesEmpty
: 0 bytes