pub enum Expression {
InfixOp {
meta: Meta,
lhe: Box<Expression>,
infix_op: ExpressionInfixOpcode,
rhe: Box<Expression>,
},
PrefixOp {
meta: Meta,
prefix_op: ExpressionPrefixOpcode,
rhe: Box<Expression>,
},
InlineSwitchOp {
meta: Meta,
cond: Box<Expression>,
if_true: Box<Expression>,
if_false: Box<Expression>,
},
ParallelOp {
meta: Meta,
rhe: Box<Expression>,
},
Variable {
meta: Meta,
name: String,
access: Vec<Access>,
},
Number(Meta, BigInt),
Call {
meta: Meta,
id: String,
args: Vec<Expression>,
},
AnonymousComp {
meta: Meta,
id: String,
is_parallel: bool,
params: Vec<Expression>,
signals: Vec<Expression>,
names: Option<Vec<(AssignOp, String)>>,
},
ArrayInLine {
meta: Meta,
values: Vec<Expression>,
},
Tuple {
meta: Meta,
values: Vec<Expression>,
},
UniformArray {
meta: Meta,
value: Box<Expression>,
dimension: Box<Expression>,
},
}
Variants§
InfixOp
PrefixOp
InlineSwitchOp
ParallelOp
Variable
Number(Meta, BigInt)
Call
AnonymousComp
ArrayInLine
Tuple
UniformArray
Implementations§
Source§impl Expression
impl Expression
pub fn get_meta(&self) -> &Meta
pub fn get_mut_meta(&mut self) -> &mut Meta
pub fn is_array(&self) -> bool
pub fn is_infix(&self) -> bool
pub fn is_prefix(&self) -> bool
pub fn is_tuple(&self) -> bool
pub fn is_switch(&self) -> bool
pub fn is_parallel(&self) -> bool
pub fn is_variable(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_call(&self) -> bool
pub fn is_anonymous_comp(&self) -> bool
pub fn make_anonymous_parallel(self) -> Expression
pub fn contains_anonymous_comp(&self) -> bool
pub fn contains_tuple(&self) -> bool
Trait Implementations§
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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