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>,
},
AnonymousComponent {
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>,
},
}Variants§
InfixOp
PrefixOp
InlineSwitchOp
ParallelOp
Variable
Number(Meta, BigInt)
Call
AnonymousComponent
ArrayInLine
Tuple
Implementations§
Source§impl Expression
impl Expression
pub fn meta(&self) -> &Meta
pub fn meta_mut(&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_switch(&self) -> bool
pub fn is_variable(&self) -> bool
pub fn is_number(&self) -> bool
pub fn is_call(&self) -> bool
pub fn is_parallel(&self) -> bool
pub fn is_tuple(&self) -> bool
pub fn is_anonymous_component(&self) -> bool
pub fn make_anonymous_parallel(self) -> Expression
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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Expression
impl Debug for Expression
Source§impl Display for Expression
impl Display for Expression
Auto 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