pub enum Expression<'ast> {
Value(Value<'ast>),
Identifier(Identifier<'ast>),
Unary(Box<UnaryExpression<'ast>>),
Binary(Box<BinaryExpression<'ast>>),
Ternary(Box<TernaryExpression<'ast>>),
ArrayInline(ArrayInlineExpression<'ast>),
ArrayInitializer(Box<ArrayInitializerExpression<'ast>>),
CircuitInline(CircuitInlineExpression<'ast>),
Postfix(PostfixExpression<'ast>),
Tuple(TupleExpression<'ast>),
}Variants§
Value(Value<'ast>)
Identifier(Identifier<'ast>)
Unary(Box<UnaryExpression<'ast>>)
Binary(Box<BinaryExpression<'ast>>)
Ternary(Box<TernaryExpression<'ast>>)
ArrayInline(ArrayInlineExpression<'ast>)
ArrayInitializer(Box<ArrayInitializerExpression<'ast>>)
CircuitInline(CircuitInlineExpression<'ast>)
Postfix(PostfixExpression<'ast>)
Tuple(TupleExpression<'ast>)
Implementations§
Source§impl<'ast> Expression<'ast>
impl<'ast> Expression<'ast>
pub fn binary( operation: BinaryOperation, left: Expression<'ast>, right: Expression<'ast>, span: Span<'ast>, ) -> Self
pub fn ternary( first: Expression<'ast>, second: Expression<'ast>, third: Expression<'ast>, span: Span<'ast>, ) -> Self
pub fn span(&self) -> &Span<'ast>
Trait Implementations§
Source§impl<'ast> Clone for Expression<'ast>
impl<'ast> Clone for Expression<'ast>
Source§fn clone(&self) -> Expression<'ast>
fn clone(&self) -> Expression<'ast>
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<'ast> Debug for Expression<'ast>
impl<'ast> Debug for Expression<'ast>
Source§impl<'ast> Display for Expression<'ast>
impl<'ast> Display for Expression<'ast>
Source§impl<'ast> FromPest<'ast> for Expression<'ast>
impl<'ast> FromPest<'ast> for Expression<'ast>
Source§impl<'ast> PartialEq for Expression<'ast>
impl<'ast> PartialEq for Expression<'ast>
Source§impl<'ast> Serialize for Expression<'ast>
impl<'ast> Serialize for Expression<'ast>
impl<'ast> StructuralPartialEq for Expression<'ast>
Auto Trait Implementations§
impl<'ast> Freeze for Expression<'ast>
impl<'ast> RefUnwindSafe for Expression<'ast>
impl<'ast> Send for Expression<'ast>
impl<'ast> Sync for Expression<'ast>
impl<'ast> Unpin for Expression<'ast>
impl<'ast> UnwindSafe for Expression<'ast>
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