pub enum Expr {
Show 17 variants
Ident(String),
Int(String),
Float(String),
String(String),
Bool(bool),
Nil,
Unary {
op: String,
value: Box<Expr>,
},
Binary {
left: Box<Expr>,
op: String,
right: Box<Expr>,
},
Call {
function: String,
args: Vec<Expr>,
},
Index {
value: Box<Expr>,
index: Box<Expr>,
},
Array {
items: Vec<Expr>,
element_type: Option<Box<Type>>,
},
Map {
key_type: Box<Type>,
value_type: Box<Type>,
entries: Vec<(Expr, Expr)>,
},
MapIndex {
value: Box<Expr>,
index: Box<Expr>,
value_type: Box<Type>,
},
MapLookupOk {
value: Box<Expr>,
index: Box<Expr>,
value_type: Box<Type>,
},
Tuple(Vec<Expr>),
StructLiteral {
ty: String,
fields: Vec<(String, Expr)>,
positional: Vec<Expr>,
},
Raw(String),
}Variants§
Ident(String)
Int(String)
Float(String)
String(String)
Bool(bool)
Nil
Unary
Binary
Call
Index
Array
Map
MapIndex
MapLookupOk
Tuple(Vec<Expr>)
StructLiteral
Raw(String)
Trait Implementations§
impl StructuralPartialEq for Expr
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