pub enum Exp {
Typed(Type, UntypedExp),
Untyped(UntypedExp),
}Variants§
Typed(Type, UntypedExp)
Untyped(UntypedExp)
Implementations§
Source§impl Exp
impl Exp
pub fn get_type(&self) -> Option<Type>
pub fn set_type(self, t: Type) -> Self
pub fn conditional(c: ConditionalExp) -> Self
pub fn cast(t: Type, e: Box<Exp>) -> Self
pub fn binary(op: AstBinaryOp, src: Box<Exp>, dst: Box<Exp>) -> Self
pub fn unary(op: AstUnaryOp, e: Box<Exp>) -> Self
pub fn assignment(dst: Box<Exp>, src: Box<Exp>) -> Self
pub fn call(name: Identifier, args: Vec<Exp>) -> Self
pub fn var(name: Identifier) -> Self
pub fn constant(cs: AstConst) -> Self
pub fn constant_from_unsigned(u: u64) -> Self
pub fn constant_from_signed(i: i64) -> Self
Trait Implementations§
Source§impl From<Exp> for UntypedExp
impl From<Exp> for UntypedExp
Source§impl From<UntypedExp> for Exp
impl From<UntypedExp> for Exp
Source§fn from(value: UntypedExp) -> Self
fn from(value: UntypedExp) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Exp
impl RefUnwindSafe for Exp
impl Send for Exp
impl Sync for Exp
impl Unpin for Exp
impl UnwindSafe for Exp
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