pub enum AplElementType {
Root,
Statement,
Expression,
Assignment,
ArrayLiteral,
Function,
Operator,
Identifier,
NumberLiteral,
StringLiteral,
Error,
}Expand description
APL 语法树中所有可能的元素类型。
Variants§
Root
Root node
Statement
Statement
Expression
Expression
Assignment
Assignment (←)
ArrayLiteral
Vector/Array literal
Function
Function (primitive or dfn)
Operator
Operator (primitive or dop)
Identifier
Identifier (variable name)
NumberLiteral
Number literal
StringLiteral
String literal
Error
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. Read more
Source§fn is_error(&self) -> bool
fn is_error(&self) -> bool
Returns true if this element represents an error condition. Read more
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 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