pub enum Token {
Show 23 variants
Comma,
Period,
Colon,
Semicolon,
At,
Hashtag,
DoubleHashtag,
Namespace,
Ternary,
AddColon,
SubColon,
Apostrophe,
Dollar,
Operator(Op),
OpenDelim(DelimToken),
CloseDelim(DelimToken),
Literal(Lit),
SysIdent(Name),
CompDir(Name),
Ident(Name),
EscIdent(Name),
Keyword(Kw),
Eof,
}Expand description
A primary token emitted by the lexer.
Variants§
Comma
Period
Colon
Semicolon
At
Hashtag
DoubleHashtag
Namespace
Ternary
AddColon
SubColon
Apostrophe
Dollar
Operator(Op)
OpenDelim(DelimToken)
An opening delimiter
CloseDelim(DelimToken)
A closing delimiter
Literal(Lit)
A literal
SysIdent(Name)
A system task or function identifier, e.g. “$display”
CompDir(Name)
A compiler directive, e.g. “`timescale”
Ident(Name)
An identifier
EscIdent(Name)
An escaped identifier
Keyword(Kw)
An unsigned number A keyword
Eof
Implementations§
Trait Implementations§
impl Copy for Token
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more