Enum llvm_kaleidoscope_rs::parser::ExprAST
source · pub enum ExprAST {
Number(f64),
Variable(String),
Binary(char, Box<ExprAST>, Box<ExprAST>),
Call(String, Vec<ExprAST>),
If {
cond: Box<ExprAST>,
then: Box<ExprAST>,
else_: Box<ExprAST>,
},
For {
var: String,
start: Box<ExprAST>,
end: Box<ExprAST>,
step: Option<Box<ExprAST>>,
body: Box<ExprAST>,
},
}
Variants§
Number(f64)
Number - Expression class for numeric literals like “1.0”.
Variable(String)
Variable - Expression class for referencing a variable, like “a”.
Binary(char, Box<ExprAST>, Box<ExprAST>)
Binary - Expression class for a binary operator.
Call(String, Vec<ExprAST>)
Call - Expression class for function calls.
If
If - Expression class for if/then/else.
For
Fields
ForExprAST - Expression class for for/in.
Trait Implementations§
source§impl PartialEq<ExprAST> for ExprAST
impl PartialEq<ExprAST> for ExprAST
impl StructuralPartialEq for ExprAST
Auto Trait Implementations§
impl RefUnwindSafe for ExprAST
impl Send for ExprAST
impl Sync for ExprAST
impl Unpin for ExprAST
impl UnwindSafe for ExprAST
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