Enum syntex_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,
    Comma,
    Semi,
    Colon,
    ModSep,
    RArrow,
    LArrow,
    FatArrow,
    Pound,
    Dollar,
    Question,
    OpenDelim(DelimToken),
    CloseDelim(DelimToken),
    Literal(Lit, Option<Name>),
    Ident(Ident),
    Underscore,
    Lifetime(Ident),
    Interpolated(Nonterminal),
    DocComment(Name),
    MatchNt(Ident, Ident),
    SubstNt(Ident),
    Whitespace,
    Comment,
    Shebang(Name),
    Eof,
}

Variants

An opening delimiter, eg. {

A closing delimiter, eg. }

Doc comment

Parse a nonterminal (name to bind, name of NT)

A syntactic variable that will be filled in by macro expansion.

Whitespace

Comment

Methods

impl Token
[src]

Returns true if the token starts with '>'.

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

Returns true if the token is any literal

Returns true if the token is an identifier.

Returns true if the token is a documentation comment.

Returns true if the token is interpolated.

Returns true if the token is an interpolated path.

Returns true if the token is a lifetime.

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

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

Returns true if the token is either a strict or reserved keyword.

Returns true if the token is a strict keyword.

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

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 state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl Debug for Token
[src]

Formats the value using the given formatter.