[][src]Enum moore_vhdl_syntax::lexer::token::Token

pub enum Token {
    Ident(Name),
    Lit(Literal),
    OpenDelim(DelimToken),
    CloseDelim(DelimToken),
    Keyword(Kw),
    Period,
    Comma,
    Colon,
    Semicolon,
    Apostrophe,
    Ampersand,
    Arrow,
    Condition,
    LtGt,
    VarAssign,
    Lshift,
    Rshift,
    Eq,
    Neq,
    Lt,
    Leq,
    Gt,
    Geq,
    MatchEq,
    MatchNeq,
    MatchLt,
    MatchLeq,
    MatchGt,
    MatchGeq,
    Add,
    Sub,
    Mul,
    Div,
    Pow,
    Pipe,
    Qmark,
    Eof,
}

A primary token as emitted by the lexer.

Variants

Ident(Name)

A basic or extended identifier.

Lit(Literal)

A literal.

OpenDelim(DelimToken)

An opening delimiter.

CloseDelim(DelimToken)

A closing delimiter.

Keyword(Kw)

A keyword.

PeriodCommaColonSemicolonApostropheAmpersandArrowConditionLtGtVarAssignLshiftRshiftEqNeqLtLeqGtGeqMatchEqMatchNeqMatchLtMatchLeqMatchGtMatchGeqAddSubMulDivPowPipeQmarkEof

The end of the input file.

Methods

impl Token
[src]

pub fn as_str(self) -> &'static str
[src]

pub fn is_ident(self) -> bool
[src]

Checks if this token is a identifier.

Trait Implementations

impl<T> TokenStream<Token> for BasicParser<T> where
    T: Grinder<Item = Option<u8>, Error = DiagBuilder2>, 
[src]

fn skip(&mut self)
[src]

Skip the current token. Usually the same as bump, but may be used to keep skipped tokens out of the consumed tokens count by some parsers. Read more

fn last_loc(&self) -> Location
[src]

Get the tail location of the last consumed token (bumped or skipped).

fn is_fatal(&self) -> bool
[src]

Check whether a fatal diagnostic has been emitted.

fn is_error(&self) -> bool
[src]

Check whether an error diagnostic has been emitted.

impl Eq for Token
[src]

impl Copy for Token
[src]

impl PartialEq<Token> for Token
[src]

impl Clone for Token
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Token
[src]

impl Display for Token
[src]

impl Hash for Token
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

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

Auto Trait Implementations

impl Send for Token

impl Sync for Token

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]