pub enum AplElementType {
Root,
Statement,
Expression,
Assignment,
ArrayLiteral,
Function,
Operator,
Identifier,
NumberLiteral,
StringLiteral,
Error,
}Expand description
Element types for the APL language.
Variants§
Root
Root node.
Statement
A statement.
Expression
An expression.
Assignment
An assignment (←).
ArrayLiteral
A vector or array literal.
Function
A function (primitive or dfn).
Operator
An operator (primitive or dop).
Identifier
An identifier (variable name).
NumberLiteral
A number literal.
StringLiteral
A string literal.
Error
An error node.
Trait Implementations§
Source§impl Clone for AplElementType
impl Clone for AplElementType
Source§fn clone(&self) -> AplElementType
fn clone(&self) -> AplElementType
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 AplElementType
impl Debug for AplElementType
Source§impl<'de> Deserialize<'de> for AplElementType
impl<'de> Deserialize<'de> for AplElementType
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 AplElementType
impl ElementType for AplElementType
Source§type Role = UniversalElementRole
type Role = UniversalElementRole
The associated role type for this element kind.
Source§fn is_root(&self) -> bool
fn is_root(&self) -> bool
Returns true if this element represents the root of the parsed tree.
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<AplTokenType> for AplElementType
impl From<AplTokenType> for AplElementType
Source§fn from(token_type: AplTokenType) -> Self
fn from(token_type: AplTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for AplElementType
impl Hash for AplElementType
Source§impl PartialEq for AplElementType
impl PartialEq for AplElementType
Source§impl Serialize for AplElementType
impl Serialize for AplElementType
impl Copy for AplElementType
impl Eq for AplElementType
impl StructuralPartialEq for AplElementType
Auto Trait Implementations§
impl Freeze for AplElementType
impl RefUnwindSafe for AplElementType
impl Send for AplElementType
impl Sync for AplElementType
impl Unpin for AplElementType
impl UnsafeUnpin for AplElementType
impl UnwindSafe for AplElementType
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