Enum solang_parser::pt::Expression
source · [−]pub enum Expression {
Show 61 variants
PostIncrement(Loc, Box<Expression>),
PostDecrement(Loc, Box<Expression>),
New(Loc, Box<Expression>),
ArraySubscript(Loc, Box<Expression>, Option<Box<Expression>>),
ArraySlice(Loc, Box<Expression>, Option<Box<Expression>>, Option<Box<Expression>>),
Parenthesis(Loc, Box<Expression>),
MemberAccess(Loc, Box<Expression>, Identifier),
FunctionCall(Loc, Box<Expression>, Vec<Expression>),
FunctionCallBlock(Loc, Box<Expression>, Box<Statement>),
NamedFunctionCall(Loc, Box<Expression>, Vec<NamedArgument>),
Not(Loc, Box<Expression>),
Complement(Loc, Box<Expression>),
Delete(Loc, Box<Expression>),
PreIncrement(Loc, Box<Expression>),
PreDecrement(Loc, Box<Expression>),
UnaryPlus(Loc, Box<Expression>),
UnaryMinus(Loc, Box<Expression>),
Power(Loc, Box<Expression>, Box<Expression>),
Multiply(Loc, Box<Expression>, Box<Expression>),
Divide(Loc, Box<Expression>, Box<Expression>),
Modulo(Loc, Box<Expression>, Box<Expression>),
Add(Loc, Box<Expression>, Box<Expression>),
Subtract(Loc, Box<Expression>, Box<Expression>),
ShiftLeft(Loc, Box<Expression>, Box<Expression>),
ShiftRight(Loc, Box<Expression>, Box<Expression>),
BitwiseAnd(Loc, Box<Expression>, Box<Expression>),
BitwiseXor(Loc, Box<Expression>, Box<Expression>),
BitwiseOr(Loc, Box<Expression>, Box<Expression>),
Less(Loc, Box<Expression>, Box<Expression>),
More(Loc, Box<Expression>, Box<Expression>),
LessEqual(Loc, Box<Expression>, Box<Expression>),
MoreEqual(Loc, Box<Expression>, Box<Expression>),
Equal(Loc, Box<Expression>, Box<Expression>),
NotEqual(Loc, Box<Expression>, Box<Expression>),
And(Loc, Box<Expression>, Box<Expression>),
Or(Loc, Box<Expression>, Box<Expression>),
Ternary(Loc, Box<Expression>, Box<Expression>, Box<Expression>),
Assign(Loc, Box<Expression>, Box<Expression>),
AssignOr(Loc, Box<Expression>, Box<Expression>),
AssignAnd(Loc, Box<Expression>, Box<Expression>),
AssignXor(Loc, Box<Expression>, Box<Expression>),
AssignShiftLeft(Loc, Box<Expression>, Box<Expression>),
AssignShiftRight(Loc, Box<Expression>, Box<Expression>),
AssignAdd(Loc, Box<Expression>, Box<Expression>),
AssignSubtract(Loc, Box<Expression>, Box<Expression>),
AssignMultiply(Loc, Box<Expression>, Box<Expression>),
AssignDivide(Loc, Box<Expression>, Box<Expression>),
AssignModulo(Loc, Box<Expression>, Box<Expression>),
BoolLiteral(Loc, bool),
NumberLiteral(Loc, String, String),
RationalNumberLiteral(Loc, String, String, String),
HexNumberLiteral(Loc, String),
StringLiteral(Vec<StringLiteral>),
Type(Loc, Type),
HexLiteral(Vec<HexLiteral>),
AddressLiteral(Loc, String),
Variable(Identifier),
List(Loc, ParameterList),
ArrayLiteral(Loc, Vec<Expression>),
Unit(Loc, Box<Expression>, Unit),
This(Loc),
}
Variants
PostIncrement(Loc, Box<Expression>)
PostDecrement(Loc, Box<Expression>)
New(Loc, Box<Expression>)
ArraySubscript(Loc, Box<Expression>, Option<Box<Expression>>)
ArraySlice(Loc, Box<Expression>, Option<Box<Expression>>, Option<Box<Expression>>)
Parenthesis(Loc, Box<Expression>)
MemberAccess(Loc, Box<Expression>, Identifier)
FunctionCall(Loc, Box<Expression>, Vec<Expression>)
FunctionCallBlock(Loc, Box<Expression>, Box<Statement>)
NamedFunctionCall(Loc, Box<Expression>, Vec<NamedArgument>)
Not(Loc, Box<Expression>)
Complement(Loc, Box<Expression>)
Delete(Loc, Box<Expression>)
PreIncrement(Loc, Box<Expression>)
PreDecrement(Loc, Box<Expression>)
UnaryPlus(Loc, Box<Expression>)
UnaryMinus(Loc, Box<Expression>)
Power(Loc, Box<Expression>, Box<Expression>)
Multiply(Loc, Box<Expression>, Box<Expression>)
Divide(Loc, Box<Expression>, Box<Expression>)
Modulo(Loc, Box<Expression>, Box<Expression>)
Add(Loc, Box<Expression>, Box<Expression>)
Subtract(Loc, Box<Expression>, Box<Expression>)
ShiftLeft(Loc, Box<Expression>, Box<Expression>)
ShiftRight(Loc, Box<Expression>, Box<Expression>)
BitwiseAnd(Loc, Box<Expression>, Box<Expression>)
BitwiseXor(Loc, Box<Expression>, Box<Expression>)
BitwiseOr(Loc, Box<Expression>, Box<Expression>)
Less(Loc, Box<Expression>, Box<Expression>)
More(Loc, Box<Expression>, Box<Expression>)
LessEqual(Loc, Box<Expression>, Box<Expression>)
MoreEqual(Loc, Box<Expression>, Box<Expression>)
Equal(Loc, Box<Expression>, Box<Expression>)
NotEqual(Loc, Box<Expression>, Box<Expression>)
And(Loc, Box<Expression>, Box<Expression>)
Or(Loc, Box<Expression>, Box<Expression>)
Ternary(Loc, Box<Expression>, Box<Expression>, Box<Expression>)
Assign(Loc, Box<Expression>, Box<Expression>)
AssignOr(Loc, Box<Expression>, Box<Expression>)
AssignAnd(Loc, Box<Expression>, Box<Expression>)
AssignXor(Loc, Box<Expression>, Box<Expression>)
AssignShiftLeft(Loc, Box<Expression>, Box<Expression>)
AssignShiftRight(Loc, Box<Expression>, Box<Expression>)
AssignAdd(Loc, Box<Expression>, Box<Expression>)
AssignSubtract(Loc, Box<Expression>, Box<Expression>)
AssignMultiply(Loc, Box<Expression>, Box<Expression>)
AssignDivide(Loc, Box<Expression>, Box<Expression>)
AssignModulo(Loc, Box<Expression>, Box<Expression>)
BoolLiteral(Loc, bool)
NumberLiteral(Loc, String, String)
RationalNumberLiteral(Loc, String, String, String)
HexNumberLiteral(Loc, String)
StringLiteral(Vec<StringLiteral>)
Type(Loc, Type)
HexLiteral(Vec<HexLiteral>)
AddressLiteral(Loc, String)
Variable(Identifier)
List(Loc, ParameterList)
ArrayLiteral(Loc, Vec<Expression>)
Unit(Loc, Box<Expression>, Unit)
This(Loc)
Implementations
sourceimpl Expression
impl Expression
pub fn remove_parenthesis(&self) -> &Expression
Trait Implementations
sourceimpl Clone for Expression
impl Clone for Expression
sourcefn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl CodeLocation for Expression
impl CodeLocation for Expression
sourceimpl Debug for Expression
impl Debug for Expression
sourceimpl Display for Expression
impl Display for Expression
sourceimpl PartialEq<Expression> for Expression
impl PartialEq<Expression> for Expression
sourcefn eq(&self, other: &Expression) -> bool
fn eq(&self, other: &Expression) -> bool
impl Eq for Expression
impl StructuralEq for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more