pub enum BashElementType {
Token(BashTokenType),
Root,
CommandStatement,
IfStatement,
ForStatement,
WhileStatement,
FunctionDefinition,
Error,
}Expand description
Represents all possible element kinds in the Bash shell scripting language.
Variants§
Token(BashTokenType)
A wrapper for tokens
Root
Root node representing the entire source file
CommandStatement
A single command or a pipeline
IfStatement
An if statement
ForStatement
A for loop
WhileStatement
A while loop
FunctionDefinition
A function definition
Error
Error node for syntax errors
Trait Implementations§
Source§impl Clone for BashElementType
impl Clone for BashElementType
Source§fn clone(&self) -> BashElementType
fn clone(&self) -> BashElementType
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 BashElementType
impl Debug for BashElementType
Source§impl<'de> Deserialize<'de> for BashElementType
impl<'de> Deserialize<'de> for BashElementType
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 BashElementType
impl ElementType for BashElementType
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<BashTokenType> for BashElementType
impl From<BashTokenType> for BashElementType
Source§fn from(token: BashTokenType) -> Self
fn from(token: BashTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for BashElementType
impl Hash for BashElementType
Source§impl Ord for BashElementType
impl Ord for BashElementType
Source§fn cmp(&self, other: &BashElementType) -> Ordering
fn cmp(&self, other: &BashElementType) -> 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 BashElementType
impl PartialEq for BashElementType
Source§impl PartialOrd for BashElementType
impl PartialOrd for BashElementType
Source§impl Serialize for BashElementType
impl Serialize for BashElementType
impl Copy for BashElementType
impl Eq for BashElementType
impl StructuralPartialEq for BashElementType
Auto Trait Implementations§
impl Freeze for BashElementType
impl RefUnwindSafe for BashElementType
impl Send for BashElementType
impl Sync for BashElementType
impl Unpin for BashElementType
impl UnwindSafe for BashElementType
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