Enum syntax::parse::token::Token[][src]

pub enum Token {
    Eq,
    Lt,
    Le,
    EqEq,
    Ne,
    Ge,
    Gt,
    AndAnd,
    OrOr,
    Not,
    Tilde,
    BinOp(BinOpToken),
    BinOpEq(BinOpToken),
    At,
    Dot,
    DotDot,
    DotDotDot,
    DotDotEq,
    DotEq,
    Comma,
    Semi,
    Colon,
    ModSep,
    RArrow,
    LArrow,
    FatArrow,
    Pound,
    Dollar,
    Question,
    SingleQuote,
    OpenDelim(DelimToken),
    CloseDelim(DelimToken),
    Literal(LitOption<Name>),
    Ident(Identbool),
    Lifetime(Ident),
    Interpolated(Lrc<(Nonterminal, LazyTokenStream)>),
    DocComment(Name),
    Whitespace,
    Comment,
    Shebang(Name),
    Eof,
}

Variants

Used by proc macros for representing lifetimes, not generated by lexer right now.

An opening delimiter, eg. {

A closing delimiter, eg. }

Doc comment

Whitespace

Comment

Methods

impl Token
[src]

Recovers a Token from an ast::Ident. This creates a raw identifier if necessary.

Returns an identifier if this token is an identifier.

Returns a lifetime identifier if this token is a lifetime.

Returns true if the token is an identifier.

Returns true if the token is a given keyword, kw.

Returns true if the token is either a special identifier or a keyword.

Trait Implementations

impl Clone for Token
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Encodable for Token
[src]

impl Decodable for Token
[src]

impl PartialEq for Token
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Token
[src]

impl Hash for Token
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Token
[src]

Formats the value using the given formatter. Read more

impl From<Token> for TokenStream
[src]

Performs the conversion.

Auto Trait Implementations

impl !Send for Token

impl !Sync for Token