pub enum ExpressionKind {
Show 14 variants
Identifier(String, Range<usize>),
Constant(Constant, Range<usize>),
StringLiteral(String, Range<usize>),
ArraySubscript {
array: Box<Expression>,
index: Box<Expression>,
span: Range<usize>,
},
FunctionCall {
function: Box<Expression>,
arguments: Vec<Expression>,
span: Range<usize>,
},
MemberAccess {
object: Box<Expression>,
member: String,
is_pointer: bool,
span: Range<usize>,
},
PostfixIncDec {
operand: Box<Expression>,
is_increment: bool,
span: Range<usize>,
},
PrefixIncDec {
operand: Box<Expression>,
is_increment: bool,
span: Range<usize>,
},
Unary {
operator: UnaryOperator,
operand: Box<Expression>,
span: Range<usize>,
},
Cast {
type_name: Box<TypeName>,
expression: Box<Expression>,
span: Range<usize>,
},
Binary {
left: Box<Expression>,
operator: BinaryOperator,
right: Box<Expression>,
span: Range<usize>,
},
Conditional {
condition: Box<Expression>,
then_expr: Box<Expression>,
else_expr: Box<Expression>,
span: Range<usize>,
},
Assignment {
left: Box<Expression>,
operator: AssignmentOperator,
right: Box<Expression>,
span: Range<usize>,
},
Comma {
expressions: Vec<Expression>,
span: Range<usize>,
},
}Expand description
表达式种
Variants§
Identifier(String, Range<usize>)
标识
Constant(Constant, Range<usize>)
常量
StringLiteral(String, Range<usize>)
字符串字面量
ArraySubscript
数组下标
FunctionCall
函数调用
MemberAccess
成员访问
PostfixIncDec
后缀递增/递减
PrefixIncDec
前缀递增/递减
Unary
一元操作符
Cast
类型转换
Binary
二元操作
Conditional
条件表达
Assignment
赋值表达式
Comma
逗号表达
Implementations§
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