pub enum MojoElementType {
Show 75 variants
Fn,
Struct,
Var,
Let,
If,
Else,
While,
For,
In,
Return,
Break,
Continue,
Import,
From,
True,
False,
None,
Identifier,
Integer,
Float,
String,
Plus,
Minus,
Star,
Slash,
Percent,
Equal,
EqualEqual,
NotEqual,
Less,
LessEqual,
Greater,
GreaterEqual,
And,
Or,
Not,
LeftParen,
RightParen,
LeftBracket,
RightBracket,
LeftBrace,
RightBrace,
Comma,
Dot,
Colon,
Semicolon,
Arrow,
Whitespace,
Newline,
Comment,
Indent,
Dedent,
EndOfStream,
FunctionDef,
StructDef,
VariableDecl,
Assignment,
IfStatement,
WhileStatement,
ForStatement,
ReturnStatement,
ExpressionStatement,
BinaryExpr,
UnaryExpr,
CallExpr,
LiteralExpr,
IdentifierExpr,
MemberExpr,
ListExpr,
ParamList,
ArgList,
Block,
Root,
Grouping,
Error,
}Variants§
Fn
Struct
Var
Let
If
Else
While
For
In
Return
Break
Continue
Import
From
True
False
None
Identifier
Integer
Float
String
Plus
Minus
Star
Slash
Percent
Equal
EqualEqual
NotEqual
Less
LessEqual
Greater
GreaterEqual
And
Or
Not
LeftParen
RightParen
LeftBracket
RightBracket
LeftBrace
RightBrace
Comma
Dot
Colon
Semicolon
Arrow
Whitespace
Newline
Comment
Indent
Dedent
EndOfStream
FunctionDef
StructDef
VariableDecl
Assignment
IfStatement
WhileStatement
ForStatement
ReturnStatement
ExpressionStatement
BinaryExpr
UnaryExpr
CallExpr
LiteralExpr
IdentifierExpr
MemberExpr
ListExpr
ParamList
ArgList
Block
Root
Grouping
Error
Implementations§
Trait Implementations§
Source§impl Clone for MojoElementType
impl Clone for MojoElementType
Source§fn clone(&self) -> MojoElementType
fn clone(&self) -> MojoElementType
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 MojoElementType
impl Debug for MojoElementType
Source§impl<'de> Deserialize<'de> for MojoElementType
impl<'de> Deserialize<'de> for MojoElementType
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 ElementType for MojoElementType
impl ElementType for MojoElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this element matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalElementRole) -> bool
fn is_universal(&self, role: UniversalElementRole) -> bool
Returns true if this element matches the specified universal role.
Source§impl From<MojoTokenType> for MojoElementType
impl From<MojoTokenType> for MojoElementType
Source§fn from(token: MojoTokenType) -> Self
fn from(token: MojoTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for MojoElementType
impl Hash for MojoElementType
Source§impl PartialEq for MojoElementType
impl PartialEq for MojoElementType
Source§impl Serialize for MojoElementType
impl Serialize for MojoElementType
impl Copy for MojoElementType
impl Eq for MojoElementType
impl StructuralPartialEq for MojoElementType
Auto Trait Implementations§
impl Freeze for MojoElementType
impl RefUnwindSafe for MojoElementType
impl Send for MojoElementType
impl Sync for MojoElementType
impl Unpin for MojoElementType
impl UnwindSafe for MojoElementType
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