Struct rslint_lexer::Token [−][src]
pub struct Token {
pub kind: SyntaxKind,
pub len: usize,
}
Expand description
A single raw token such as >>
or ||
or "abc"
.
Fields
kind: SyntaxKind
The kind of token this is.
len: usize
How long the token is in bytes. For tokens with escape sequences
like strings with \uXXXX
escapes, the length is the raw length, not considering the char backed by the escape.
Implementations
Create a new token which has an exact length of 1.
Create a new token which has a specific length.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
Blanket Implementations
Mutably borrows from an owned value. Read more
Whether this implementor has acknowledged the 1.1.0 update to
unerase
’s documented implementation requirements. Read more