Enum AstExpressionKind
pub enum AstExpressionKind {
Show 17 variants
Unary {
op: AstUnaryOp,
operand: Box<AstExpression>,
},
Binary {
op: AstBinaryOp,
lhs: Box<AstExpression>,
rhs: Box<AstExpression>,
},
Assignment {
computation_node_id: AstNodeId,
op: AstAssignmentOp,
lhs: Box<AstExpression>,
rhs: Box<AstExpression>,
},
Conditional {
condition: Box<AstExpression>,
consequent: Box<AstExpression>,
alternative: Box<AstExpression>,
},
FunctionCall {
designator: Box<AstExpression>,
args_node_id: AstNodeId,
args: Vec<AstExpression>,
},
Deref {
pointer: Box<AstExpression>,
},
AddressOf {
target: Box<AstExpression>,
},
Subscript {
expr1: Box<AstExpression>,
expr2: Box<AstExpression>,
},
Cast {
target_type: AstDeclaredType,
inner: Box<AstExpression>,
is_implicit: bool,
},
Ident {
name: String,
unique_name: AstUniqueName,
},
SizeOfExpr {
operand: Box<AstExpression>,
},
SizeOfType {
declared_type: AstDeclaredType,
},
AlignOfType {
declared_type: AstDeclaredType,
},
CharLiteral {
literal: String,
is_multichar: bool,
value: i32,
},
StringLiteral {
literals: Vec<String>,
ascii: Vec<String>,
},
IntegerLiteral {
literal: String,
literal_base: usize,
value: u64,
kind: AstIntegerLiteralKind,
},
FloatLiteral {
literal: String,
literal_base: usize,
value: f64,
kind: AstFloatLiteralKind,
},
}Expand description
The kind of expression, which may in fact be a subexpression inside a tree of a larger expression.
Variants§
Unary
Binary
Assignment
Conditional
FunctionCall
Deref
Fields
§
pointer: Box<AstExpression>AddressOf
Fields
§
target: Box<AstExpression>Subscript
Cast
Ident
SizeOfExpr
Fields
§
operand: Box<AstExpression>SizeOfType
Fields
§
declared_type: AstDeclaredTypeAlignOfType
Fields
§
declared_type: AstDeclaredTypeCharLiteral
StringLiteral
IntegerLiteral
FloatLiteral
Trait Implementations§
§impl Clone for AstExpressionKind
impl Clone for AstExpressionKind
§fn clone(&self) -> AstExpressionKind
fn clone(&self) -> AstExpressionKind
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 more§impl Debug for AstExpressionKind
impl Debug for AstExpressionKind
§impl PartialEq for AstExpressionKind
impl PartialEq for AstExpressionKind
impl StructuralPartialEq for AstExpressionKind
Auto Trait Implementations§
impl Freeze for AstExpressionKind
impl RefUnwindSafe for AstExpressionKind
impl Send for AstExpressionKind
impl Sync for AstExpressionKind
impl Unpin for AstExpressionKind
impl UnwindSafe for AstExpressionKind
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