Enum udl::ast::ParsedExpression
source · pub enum ParsedExpression {
Empty(Position, Position),
Text(ParsedText),
Sequence(ParsedSequence),
Dictionary(ParsedDictionary),
Command(ParsedDirective),
Compound(ParsedCompound),
}
Variants§
Empty(Position, Position)
Text(ParsedText)
Sequence(ParsedSequence)
Dictionary(ParsedDictionary)
Command(ParsedDirective)
Compound(ParsedCompound)
Implementations§
source§impl ParsedExpression
impl ParsedExpression
pub fn empty(from: Position, to: Position) -> Self
pub fn length(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_argument(&self) -> bool
pub fn into_compound(self) -> Result<ParsedCompound, ()>
pub fn is_compound(&self) -> bool
pub fn iter(&self) -> ExpressionIter<'_> ⓘ
source§impl ParsedExpression
impl ParsedExpression
pub fn from(&self) -> Position
pub fn to(&self) -> Position
pub fn into_text(self) -> Result<ParsedText, ()>
pub fn is_text(&self) -> bool
pub fn into_sequence(self) -> Result<ParsedSequence, ()>
pub fn is_sequence(&self) -> bool
pub fn into_dictionary(self) -> Result<ParsedDictionary, ()>
pub fn is_dictionary(&self) -> bool
pub fn into_directive(self) -> Result<ParsedDirective, ()>
pub fn is_directive(&self) -> bool
Trait Implementations§
source§impl Clone for ParsedExpression
impl Clone for ParsedExpression
source§fn clone(&self) -> ParsedExpression
fn clone(&self) -> ParsedExpression
Returns a copy 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 Display for ParsedExpression
impl Display for ParsedExpression
source§impl PartialEq<ParsedExpression> for ParsedExpression
impl PartialEq<ParsedExpression> for ParsedExpression
source§fn eq(&self, other: &ParsedExpression) -> bool
fn eq(&self, other: &ParsedExpression) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ParsedExpression
impl StructuralEq for ParsedExpression
impl StructuralPartialEq for ParsedExpression
Auto Trait Implementations§
impl RefUnwindSafe for ParsedExpression
impl Send for ParsedExpression
impl Sync for ParsedExpression
impl Unpin for ParsedExpression
impl UnwindSafe for ParsedExpression
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