pub enum ExpressionKind {
Identifier(String),
Constant(String),
StringLiteral(String),
Parenthesized(Box<Expression>),
ArrayAccess {
array: Box<Expression>,
index: Box<Expression>,
},
FunctionCall {
function: Box<Expression>,
arguments: Vec<Expression>,
},
MemberAccess {
object: Box<Expression>,
member: String,
is_pointer: bool,
},
Unary {
operator: UnaryOperator,
operand: Box<Expression>,
},
Binary {
left: Box<Expression>,
operator: BinaryOperator,
right: Box<Expression>,
},
Conditional {
condition: Box<Expression>,
then_branch: Box<Expression>,
else_branch: Box<Expression>,
},
Assignment {
left: Box<Expression>,
operator: AssignmentOperator,
right: Box<Expression>,
},
Comma(Vec<Expression>),
}Expand description
Expression kind
Variants§
Identifier(String)
Identifier
Constant(String)
Constant
StringLiteral(String)
String literal
Parenthesized(Box<Expression>)
Parenthesized expression
ArrayAccess
Array access
FunctionCall
Function call
MemberAccess
Member access
Unary
Unary operation
Binary
Binary operation
Conditional
Conditional expression
Assignment
Assignment
Comma(Vec<Expression>)
Comma expression
Trait Implementations§
Source§impl Clone for ExpressionKind
impl Clone for ExpressionKind
Source§fn clone(&self) -> ExpressionKind
fn clone(&self) -> ExpressionKind
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 ExpressionKind
impl Debug for ExpressionKind
Source§impl<'de> Deserialize<'de> for ExpressionKind
impl<'de> Deserialize<'de> for ExpressionKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ExpressionKind
impl PartialEq for ExpressionKind
Source§impl Serialize for ExpressionKind
impl Serialize for ExpressionKind
impl StructuralPartialEq for ExpressionKind
Auto Trait Implementations§
impl Freeze for ExpressionKind
impl RefUnwindSafe for ExpressionKind
impl Send for ExpressionKind
impl Sync for ExpressionKind
impl Unpin for ExpressionKind
impl UnwindSafe for ExpressionKind
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