pub enum HaskellElementType {
Show 102 variants
Whitespace,
Newline,
Comment,
Case,
Class,
Data,
Default,
Deriving,
Do,
Else,
Foreign,
If,
Import,
In,
Infix,
Infixl,
Infixr,
Instance,
Let,
Module,
Newtype,
Of,
Then,
Type,
Where,
Underscore,
As,
Qualified,
Hiding,
Identifier,
Constructor,
Number,
Integer,
Float,
String,
StringLiteral,
Char,
CharLiteral,
Plus,
Minus,
Star,
Slash,
Percent,
Assign,
Equal,
NotEqual,
Less,
Greater,
LessEqual,
GreaterEqual,
And,
Or,
Arrow,
LeftArrow,
DoubleArrow,
Pipe,
Ampersand,
Bang,
Exclamation,
Question,
Colon,
DoubleColon,
Semicolon,
Comma,
Dot,
DoubleDot,
DotDot,
Dollar,
At,
Tilde,
Backslash,
Append,
LeftParen,
RightParen,
LeftBracket,
RightBracket,
LeftBrace,
RightBrace,
Quote,
Backquote,
Backtick,
Function,
DataDeclaration,
ModuleDeclaration,
ImportDeclaration,
TypeAliasDeclaration,
TypeSignature,
Equation,
Pattern,
LiteralExpression,
IdentifierExpression,
PrefixExpression,
InfixExpression,
ApplicationExpression,
LambdaExpression,
LetExpression,
CaseExpression,
CaseArm,
TypeExpr,
Root,
Error,
Eof,
}Expand description
Haskell element types. Represents an element type in a Haskell source file.
Variants§
Whitespace
Whitespace characters.
Newline
A newline character.
Comment
A comment.
Case
‘case’ keyword.
Class
‘class’ keyword.
Data
‘data’ keyword.
Default
‘default’ keyword.
Deriving
‘deriving’ keyword.
Do
‘do’ keyword.
Else
‘else’ keyword.
Foreign
‘foreign’ keyword.
If
‘if’ keyword.
Import
‘import’ keyword.
In
‘in’ keyword.
Infix
‘infix’ keyword.
Infixl
‘infixl’ keyword.
Infixr
‘infixr’ keyword.
Instance
‘instance’ keyword.
Let
‘let’ keyword.
Module
‘module’ keyword.
Newtype
‘newtype’ keyword.
Of
‘of’ keyword.
Then
‘then’ keyword.
Type
‘type’ keyword.
Where
‘where’ keyword.
Underscore
Underscore character (_).
As
‘as’ keyword.
Qualified
‘qualified’ keyword.
Hiding
‘hiding’ keyword.
Identifier
An identifier.
Constructor
A constructor identifier.
Number
A numeric literal.
Integer
An integer literal.
Float
A floating-point literal.
String
A string literal.
StringLiteral
A string literal.
Char
A character literal.
CharLiteral
A character literal.
Plus
Plus operator (+).
Minus
Minus operator (-).
Star
Multiplication operator (*).
Slash
Division operator (/).
Percent
Modulo operator (%).
Assign
Assignment operator (=).
Equal
Equality operator (==).
NotEqual
Inequality operator (/=).
Less
Less than operator (<).
Greater
Greater than operator (>).
LessEqual
Less than or equal to operator (<=).
GreaterEqual
Greater than or equal to operator (>=).
And
Logical AND operator (&&).
Or
Logical OR operator (||).
Arrow
Function arrow operator (->).
LeftArrow
Left arrow operator (<-).
DoubleArrow
Double arrow operator (=>).
Pipe
Pipe character (|).
Ampersand
Ampersand character (&).
Bang
Bang operator (!).
Exclamation
Exclamation mark (!).
Question
Question mark (?).
Colon
Colon character (:).
DoubleColon
Double colon character (::).
Semicolon
Semicolon character (;).
Comma
Comma character (,).
Dot
Dot character (.).
DoubleDot
Double dot character (..).
DotDot
Range operator (..).
Dollar
Dollar sign ($).
At
At sign (@).
Tilde
Tilde character (~).
Backslash
Backslash character ().
Append
Append operator (++).
LeftParen
Left parenthesis (().
RightParen
Right parenthesis ()).
LeftBracket
Left bracket ([).
RightBracket
Right bracket (]).
LeftBrace
Left brace ({).
RightBrace
Right brace (}).
Quote
Single quote (’).
Backquote
Backquote (`).
Backtick
Backtick (`).
Function
A function definition.
DataDeclaration
A data declaration.
ModuleDeclaration
A module declaration.
ImportDeclaration
An import declaration.
TypeAliasDeclaration
A type alias declaration.
TypeSignature
A type signature.
Equation
A function equation.
Pattern
A pattern.
LiteralExpression
A literal expression.
IdentifierExpression
An identifier expression.
PrefixExpression
A prefix expression.
InfixExpression
An infix expression.
ApplicationExpression
A function application.
LambdaExpression
A lambda expression.
LetExpression
A let expression.
CaseExpression
A case expression.
CaseArm
A case arm.
TypeExpr
A type expression.
Root
Root node of the AST.
Error
Error node.
Eof
End of file marker.
Implementations§
Source§impl HaskellElementType
impl HaskellElementType
Sourcepub fn is_keyword(&self) -> bool
pub fn is_keyword(&self) -> bool
Returns true if the element type is a Haskell keyword.
Trait Implementations§
Source§impl Clone for HaskellElementType
impl Clone for HaskellElementType
Source§fn clone(&self) -> HaskellElementType
fn clone(&self) -> HaskellElementType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for HaskellElementType
Source§impl Debug for HaskellElementType
impl Debug for HaskellElementType
Source§impl<'de> Deserialize<'de> for HaskellElementType
impl<'de> Deserialize<'de> for HaskellElementType
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>,
Source§impl ElementType for HaskellElementType
impl ElementType for HaskellElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Source§fn is_universal(&self, role: UniversalElementRole) -> bool
fn is_universal(&self, role: UniversalElementRole) -> bool
impl Eq for HaskellElementType
Source§impl From<HaskellTokenType> for HaskellElementType
impl From<HaskellTokenType> for HaskellElementType
Source§fn from(token: HaskellTokenType) -> Self
fn from(token: HaskellTokenType) -> Self
Source§impl Hash for HaskellElementType
impl Hash for HaskellElementType
Source§impl PartialEq for HaskellElementType
impl PartialEq for HaskellElementType
Source§fn eq(&self, other: &HaskellElementType) -> bool
fn eq(&self, other: &HaskellElementType) -> bool
self and other values to be equal, and is used by ==.