pub enum PurescriptTokenType {
Show 84 variants
Whitespace,
Newline,
Comment,
Ado,
Case,
Class,
Data,
Derive,
Do,
Else,
False,
Forall,
Foreign,
If,
Import,
In,
Infix,
Infixl,
Infixr,
Instance,
Let,
Module,
Newtype,
Of,
Then,
True,
Type,
Where,
Arrow,
FatArrow,
Backslash,
Pipe,
Equal,
ColonColon,
Dot,
DotDot,
Plus,
Minus,
Star,
Slash,
Percent,
Caret,
EqualEqual,
NotEqual,
Less,
Greater,
LessEqual,
GreaterEqual,
And,
Or,
Append,
Compose,
ComposeFlipped,
Apply,
ApplyFlipped,
Bind,
BindFlipped,
LeftParen,
RightParen,
LeftBrace,
RightBrace,
LeftBracket,
RightBracket,
Comma,
Semicolon,
Colon,
Question,
Exclamation,
At,
Underscore,
Tick,
IntLiteral,
NumberLiteral,
StringLiteral,
CharLiteral,
BooleanLiteral,
Identifier,
UpperIdentifier,
Operator,
QualifiedIdentifier,
Root,
SourceFile,
Error,
Eof,
}Expand description
Token types for PureScript.
Variants§
Whitespace
Whitespace.
Newline
Newline.
Comment
Comment.
Ado
ado
Case
case
Class
class
Data
data
Derive
derive
Do
do
Else
else
False
false
Forall
forall
Foreign
foreign
If
if
Import
import
In
in
Infix
infix
Infixl
infixl
Infixr
infixr
Instance
instance
Let
let
Module
module
Newtype
newtype
Of
of
Then
then
True
true
Type
type
Where
where
Arrow
->
FatArrow
=>
Backslash
\
Pipe
|
Equal
=
ColonColon
::
Dot
.
DotDot
..
Plus
+
Minus
-
Star
*
Slash
/
Percent
%
Caret
^
EqualEqual
==
NotEqual
/=
Less
<
Greater
>
LessEqual
<=
GreaterEqual
>=
And
&&
Or
||
Append
<>
Compose
<<<
ComposeFlipped
>>>
Apply
$
ApplyFlipped
#
Bind
>>=
BindFlipped
=<<
LeftParen
(
RightParen
)
LeftBrace
{
RightBrace
}
LeftBracket
[
RightBracket
]
Comma
,
Semicolon
;
Colon
:
Question
?
Exclamation
!
At
@
Underscore
_
Tick
`
IntLiteral
Integer literal.
NumberLiteral
Floating point literal.
StringLiteral
String literal.
CharLiteral
Character literal.
BooleanLiteral
Boolean literal.
Identifier
Lowercase identifier.
UpperIdentifier
Uppercase identifier.
Operator
Operator.
QualifiedIdentifier
Qualified identifier.
Root
Root node.
SourceFile
Source file node.
Error
Error token.
Eof
End of file.
Trait Implementations§
Source§impl Clone for PurescriptTokenType
impl Clone for PurescriptTokenType
Source§fn clone(&self) -> PurescriptTokenType
fn clone(&self) -> PurescriptTokenType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PurescriptTokenType
impl Debug for PurescriptTokenType
Source§impl<'de> Deserialize<'de> for PurescriptTokenType
impl<'de> Deserialize<'de> for PurescriptTokenType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<PurescriptElementType> for PurescriptTokenType
impl From<PurescriptElementType> for PurescriptTokenType
Source§fn from(element: PurescriptElementType) -> Self
fn from(element: PurescriptElementType) -> Self
Converts to this type from the input type.
Source§impl From<PurescriptTokenType> for PurescriptElementType
impl From<PurescriptTokenType> for PurescriptElementType
Source§fn from(token: PurescriptTokenType) -> Self
fn from(token: PurescriptTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for PurescriptTokenType
impl Hash for PurescriptTokenType
Source§impl PartialEq for PurescriptTokenType
impl PartialEq for PurescriptTokenType
Source§impl Serialize for PurescriptTokenType
impl Serialize for PurescriptTokenType
Source§impl TokenType for PurescriptTokenType
impl TokenType for PurescriptTokenType
Source§const END_OF_STREAM: Self = Self::Eof
const END_OF_STREAM: Self = Self::Eof
A constant representing the end of the input stream.
Source§type Role = UniversalTokenRole
type Role = UniversalTokenRole
The associated role type for this token kind.
Source§fn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Returns true if this token represents trivia (whitespace, comments, etc.).
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this token matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalTokenRole) -> bool
fn is_universal(&self, role: UniversalTokenRole) -> bool
Returns true if this token matches the specified universal role.
Source§fn is_comment(&self) -> bool
fn is_comment(&self) -> bool
Returns true if this token represents a comment.
Source§fn is_whitespace(&self) -> bool
fn is_whitespace(&self) -> bool
Returns true if this token represents whitespace.
Source§fn is_end_of_stream(&self) -> bool
fn is_end_of_stream(&self) -> bool
Returns true if this token represents the end of the input stream.
impl Copy for PurescriptTokenType
impl Eq for PurescriptTokenType
impl StructuralPartialEq for PurescriptTokenType
Auto Trait Implementations§
impl Freeze for PurescriptTokenType
impl RefUnwindSafe for PurescriptTokenType
impl Send for PurescriptTokenType
impl Sync for PurescriptTokenType
impl Unpin for PurescriptTokenType
impl UnsafeUnpin for PurescriptTokenType
impl UnwindSafe for PurescriptTokenType
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