pub enum PExpression {
Show 18 variants
Number(f64),
Boolean(bool),
Void,
None,
String(String),
Char(u8),
PathIdent(PathIdent),
Call {
name: FunctionAddress,
args: Vec<PExpression>,
type_args: Option<Vec<CortexType>>,
},
Construction {
name: PathIdent,
type_args: Vec<CortexType>,
assignments: Vec<(String, PExpression)>,
},
IfStatement {
first: Box<PConditionBody>,
conds: Vec<PConditionBody>,
last: Option<Box<BasicBody>>,
},
UnaryOperation {
op: UnaryOperator,
exp: Box<PExpression>,
},
ListLiteral(Vec<PExpression>),
Bang(Box<PExpression>),
MemberAccess(Box<PExpression>, String),
MemberCall {
callee: Box<PExpression>,
member: String,
args: Vec<PExpression>,
type_args: Option<Vec<CortexType>>,
},
BinaryOperation {
left: Box<PExpression>,
op: BinaryOperator,
right: Box<PExpression>,
},
Tuple(Vec<PExpression>),
Range {
start: Option<f64>,
end: Option<f64>,
step: Option<f64>,
},
}
Variants§
Number(f64)
Boolean(bool)
Void
None
String(String)
Char(u8)
PathIdent(PathIdent)
Call
Construction
IfStatement
UnaryOperation
ListLiteral(Vec<PExpression>)
Bang(Box<PExpression>)
MemberAccess(Box<PExpression>, String)
MemberCall
BinaryOperation
Tuple(Vec<PExpression>)
Range
Trait Implementations§
Source§impl Clone for PExpression
impl Clone for PExpression
Source§fn clone(&self) -> PExpression
fn clone(&self) -> PExpression
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl SimpleCodeGen for PExpression
impl SimpleCodeGen for PExpression
Auto Trait Implementations§
impl Freeze for PExpression
impl RefUnwindSafe for PExpression
impl Send for PExpression
impl Sync for PExpression
impl Unpin for PExpression
impl UnwindSafe for PExpression
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