pub enum ExpressionKind {
Show 14 variants
Identifier(String),
Constant(Constant),
StringLiteral(String),
ArraySubscript {
array: Box<Expression>,
index: Box<Expression>,
},
FunctionCall {
function: Box<Expression>,
arguments: Vec<Expression>,
},
MemberAccess {
object: Box<Expression>,
member: String,
is_pointer: bool,
},
PostfixIncDec {
operand: Box<Expression>,
is_increment: bool,
},
PrefixIncDec {
operand: Box<Expression>,
is_increment: bool,
},
Unary {
operator: UnaryOperator,
operand: Box<Expression>,
},
Cast {
type_name: Box<TypeName>,
expression: Box<Expression>,
},
Binary {
left: Box<Expression>,
operator: BinaryOperator,
right: Box<Expression>,
},
Conditional {
condition: Box<Expression>,
then_expr: Box<Expression>,
else_expr: Box<Expression>,
},
Assignment {
left: Box<Expression>,
operator: AssignmentOperator,
right: Box<Expression>,
},
Comma {
expressions: Vec<Expression>,
},
}Expand description
表达式类型
Variants§
Identifier(String)
Constant(Constant)
StringLiteral(String)
ArraySubscript
FunctionCall
MemberAccess
PostfixIncDec
PrefixIncDec
Unary
Cast
Binary
Conditional
Assignment
Comma
Fields
§
expressions: Vec<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 PartialEq for ExpressionKind
impl PartialEq 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