pub enum CElementType {
Token(CTokenType),
Root,
FunctionDefinition,
ParameterList,
CompoundStatement,
ExpressionStatement,
DeclarationStatement,
IfStatement,
WhileStatement,
ForStatement,
ReturnStatement,
Error,
}Expand description
Represents all possible element kinds in the C programming language.
Variants§
Token(CTokenType)
A wrapper for tokens
Root
Root node representing the entire source file
FunctionDefinition
Function definition
ParameterList
Parameter list
CompoundStatement
Compound statement (block)
ExpressionStatement
Expression statement
DeclarationStatement
Declaration statement
IfStatement
If statement
WhileStatement
While statement
ForStatement
For statement
ReturnStatement
Return statement
Error
Error element
Trait Implementations§
Source§impl Clone for CElementType
impl Clone for CElementType
Source§fn clone(&self) -> CElementType
fn clone(&self) -> CElementType
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 CElementType
impl Debug for CElementType
Source§impl<'de> Deserialize<'de> for CElementType
impl<'de> Deserialize<'de> for CElementType
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 CElementType
impl ElementType for CElementType
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<CTokenType> for CElementType
impl From<CTokenType> for CElementType
Source§fn from(token: CTokenType) -> Self
fn from(token: CTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for CElementType
impl Hash for CElementType
Source§impl Ord for CElementType
impl Ord for CElementType
Source§fn cmp(&self, other: &CElementType) -> Ordering
fn cmp(&self, other: &CElementType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CElementType
impl PartialEq for CElementType
Source§impl PartialOrd for CElementType
impl PartialOrd for CElementType
Source§impl Serialize for CElementType
impl Serialize for CElementType
impl Copy for CElementType
impl Eq for CElementType
impl StructuralPartialEq for CElementType
Auto Trait Implementations§
impl Freeze for CElementType
impl RefUnwindSafe for CElementType
impl Send for CElementType
impl Sync for CElementType
impl Unpin for CElementType
impl UnwindSafe for CElementType
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