pub enum OCamlElementType {
Show 13 variants
Root,
ModuleDef,
LetBinding,
MatchExpr,
FunctionDef,
TypeDefinition,
Expression,
BinaryExpr,
UnaryExpr,
CallExpr,
LiteralExpr,
IdentifierExpr,
Error,
}Expand description
Element types for the OCaml parser.
Variants§
Root
Root node of the OCaml AST.
ModuleDef
A module definition.
LetBinding
A let binding.
MatchExpr
A match expression.
FunctionDef
A function definition.
TypeDefinition
A type definition.
Expression
An expression.
BinaryExpr
A binary expression.
UnaryExpr
A unary expression.
CallExpr
A function call.
LiteralExpr
A literal expression.
IdentifierExpr
An identifier expression.
Error
An error element.
Trait Implementations§
Source§impl Clone for OCamlElementType
impl Clone for OCamlElementType
Source§fn clone(&self) -> OCamlElementType
fn clone(&self) -> OCamlElementType
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 OCamlElementType
impl Debug for OCamlElementType
Source§impl<'de> Deserialize<'de> for OCamlElementType
impl<'de> Deserialize<'de> for OCamlElementType
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 OCamlElementType
impl ElementType for OCamlElementType
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<OCamlTokenType> for OCamlElementType
impl From<OCamlTokenType> for OCamlElementType
Source§fn from(token: OCamlTokenType) -> Self
fn from(token: OCamlTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for OCamlElementType
impl Hash for OCamlElementType
Source§impl PartialEq for OCamlElementType
impl PartialEq for OCamlElementType
Source§impl Serialize for OCamlElementType
impl Serialize for OCamlElementType
impl Copy for OCamlElementType
impl Eq for OCamlElementType
impl StructuralPartialEq for OCamlElementType
Auto Trait Implementations§
impl Freeze for OCamlElementType
impl RefUnwindSafe for OCamlElementType
impl Send for OCamlElementType
impl Sync for OCamlElementType
impl Unpin for OCamlElementType
impl UnsafeUnpin for OCamlElementType
impl UnwindSafe for OCamlElementType
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