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,
    OpenDelim(DelimToken),
    CloseDelim(DelimToken),
    Literal(LitOption<Name>),
    Ident(Ident),
    Underscore,
    Lifetime(Ident),
    Interpolated(Lrc<(Nonterminal, LazyTokenStream)>),
    DocComment(Name),
    Whitespace,
    Comment,
    Shebang(Name),
    Eof,
}

Variants

An opening delimiter, eg. {

A closing delimiter, eg. }

Doc comment

Whitespace

Comment

Methods

impl Token
[src]

[src]

[src]

Returns true if the token starts with '>'.

[src]

Returns true if the token can appear at the start of an expression.

[src]

Returns true if the token can appear at the start of a type.

[src]

Returns true if the token can appear at the start of a generic bound.

[src]

Returns true if the token is any literal

[src]

[src]

Returns true if the token is an identifier.

[src]

Returns true if the token is a documentation comment.

[src]

Returns true if the token is interpolated.

[src]

Returns true if the token is an interpolated path.

[src]

Returns a lifetime with the span and a dummy id if it is a lifetime, or the original lifetime if it is an interpolated lifetime, ignoring the span.

[src]

Returns true if the token is a lifetime.

[src]

Returns true if the token is either the mut or const keyword.

[src]

[src]

[src]

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

[src]

[src]

[src]

Returns true if the token is a keyword used in the language.

[src]

Returns true if the token is a keyword reserved for possible future use.

[src]

[src]

Returns tokens that are likely to be typed accidentally instead of the current token. Enables better error recovery when the wrong token is found.

[src]

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

[src]

Trait Implementations

impl Clone for Token
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Encodable for Token
[src]

[src]

impl Decodable for Token
[src]

[src]

impl PartialEq for Token
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for Token
[src]

impl Hash for Token
[src]

[src]

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

1.3.0
[src]

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

impl Debug for Token
[src]

[src]

Formats the value using the given formatter. Read more

impl From<Token> for TokenStream
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl !Send for Token

impl !Sync for Token