pub enum Expr {
Show 15 variants
Name {
span: Span,
id: String,
},
Number {
span: Span,
value: f64,
},
String {
span: Span,
value: String,
},
Bool {
span: Span,
value: bool,
},
None {
span: Span,
},
List {
span: Span,
elts: Vec<Expr>,
},
Dict {
span: Span,
items: Vec<(Expr, Expr)>,
},
BinOp {
span: Span,
op: String,
left: Box<Expr>,
right: Box<Expr>,
},
UnaryOp {
span: Span,
op: String,
operand: Box<Expr>,
},
BoolOp {
span: Span,
op: String,
values: Vec<Expr>,
},
Compare {
span: Span,
op: String,
left: Box<Expr>,
right: Box<Expr>,
},
Attribute {
span: Span,
value: Box<Expr>,
attr: String,
},
Call {
span: Span,
func: Box<Expr>,
args: Vec<Expr>,
},
Subscript {
span: Span,
value: Box<Expr>,
index: Box<Expr>,
},
Unsupported {
span: Span,
reason: String,
},
}Variants§
Name
Number
String
Bool
None
List
Dict
BinOp
UnaryOp
BoolOp
Compare
Attribute
Call
Subscript
Unsupported
Implementations§
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 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