pub enum BatElementType {
Token(BatTokenType),
Root,
CommandStatement,
IfStatement,
ForStatement,
SetStatement,
LabelDefinition,
Error,
}Expand description
Represents all possible element kinds in the Windows Batch (BAT) scripting language.
Variants§
Token(BatTokenType)
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
SetStatement
A set statement
LabelDefinition
A label definition
Error
Error node for syntax errors
Trait Implementations§
Source§impl Clone for BatElementType
impl Clone for BatElementType
Source§fn clone(&self) -> BatElementType
fn clone(&self) -> BatElementType
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 BatElementType
impl Debug for BatElementType
Source§impl<'de> Deserialize<'de> for BatElementType
impl<'de> Deserialize<'de> for BatElementType
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 BatElementType
impl ElementType for BatElementType
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<BatTokenType> for BatElementType
impl From<BatTokenType> for BatElementType
Source§fn from(token: BatTokenType) -> Self
fn from(token: BatTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for BatElementType
impl Hash for BatElementType
Source§impl Ord for BatElementType
impl Ord for BatElementType
Source§fn cmp(&self, other: &BatElementType) -> Ordering
fn cmp(&self, other: &BatElementType) -> 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 BatElementType
impl PartialEq for BatElementType
Source§impl PartialOrd for BatElementType
impl PartialOrd for BatElementType
Source§impl Serialize for BatElementType
impl Serialize for BatElementType
impl Copy for BatElementType
impl Eq for BatElementType
impl StructuralPartialEq for BatElementType
Auto Trait Implementations§
impl Freeze for BatElementType
impl RefUnwindSafe for BatElementType
impl Send for BatElementType
impl Sync for BatElementType
impl Unpin for BatElementType
impl UnwindSafe for BatElementType
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