pub enum Expr {
Bool(Box<ExprBool>),
Identifier(Box<ExprIdentifier>),
Call(Box<ExprCall>),
String(Box<ExprString>),
Number(Box<ExprNumber>),
Error,
}Variants§
Bool(Box<ExprBool>)
Identifier(Box<ExprIdentifier>)
Call(Box<ExprCall>)
String(Box<ExprString>)
Number(Box<ExprNumber>)
Error
Implementations§
Source§impl Expr
impl Expr
pub fn identifier(identifier: &str) -> Self
pub fn identifier_with_type(identifier: &str, ty: Type) -> Self
pub fn string(string: &str) -> Self
pub fn number(value: f64) -> Self
pub fn call(callee: ExprS, args: Vec<ExprS>) -> Self
pub fn bool(value: bool) -> Self
pub fn get_type(&self) -> Type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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