pub enum AnalyzedExpression<'src> {
Show 13 variants
Block(Box<AnalyzedBlock<'src>>),
If(Box<AnalyzedIfExpr<'src>>),
Int(i64),
Float(f64),
Bool(bool),
Char(u8),
Ident(AnalyzedIdentExpr<'src>),
Prefix(Box<AnalyzedPrefixExpr<'src>>),
Infix(Box<AnalyzedInfixExpr<'src>>),
Assign(Box<AnalyzedAssignExpr<'src>>),
Call(Box<AnalyzedCallExpr<'src>>),
Cast(Box<AnalyzedCastExpr<'src>>),
Grouped(Box<AnalyzedExpression<'src>>),
}
Variants§
Block(Box<AnalyzedBlock<'src>>)
If(Box<AnalyzedIfExpr<'src>>)
Int(i64)
Float(f64)
Bool(bool)
Char(u8)
Ident(AnalyzedIdentExpr<'src>)
Prefix(Box<AnalyzedPrefixExpr<'src>>)
Infix(Box<AnalyzedInfixExpr<'src>>)
Assign(Box<AnalyzedAssignExpr<'src>>)
Call(Box<AnalyzedCallExpr<'src>>)
Cast(Box<AnalyzedCastExpr<'src>>)
Grouped(Box<AnalyzedExpression<'src>>)
Implementations§
Source§impl AnalyzedExpression<'_>
impl AnalyzedExpression<'_>
pub fn result_type(&self) -> Type
pub fn constant(&self) -> bool
pub fn as_constant(&self) -> Option<Self>
Trait Implementations§
Source§impl<'src> Clone for AnalyzedExpression<'src>
impl<'src> Clone for AnalyzedExpression<'src>
Source§fn clone(&self) -> AnalyzedExpression<'src>
fn clone(&self) -> AnalyzedExpression<'src>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'src> Debug for AnalyzedExpression<'src>
impl<'src> Debug for AnalyzedExpression<'src>
Source§impl<'src> PartialEq for AnalyzedExpression<'src>
impl<'src> PartialEq for AnalyzedExpression<'src>
impl<'src> StructuralPartialEq for AnalyzedExpression<'src>
Auto Trait Implementations§
impl<'src> Freeze for AnalyzedExpression<'src>
impl<'src> RefUnwindSafe for AnalyzedExpression<'src>
impl<'src> Send for AnalyzedExpression<'src>
impl<'src> Sync for AnalyzedExpression<'src>
impl<'src> Unpin for AnalyzedExpression<'src>
impl<'src> UnwindSafe for AnalyzedExpression<'src>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more