[−][src]Enum lang_c::ast::Expression
Expressions
(C11 6.5)
Variants
Identifier(Box<Node<Identifier>>)
Identifier
May be a variable, function name or enumerator. The latter is different from the standard, where enumerators are classified as constants.
(C11 6.5.1)
Numeric and character constants
Enumerator constants, being valid identifiers, are reprented
as Identifier
in this enum.
(C11 6.5.1)
StringLiteral(Box<Node<StringLiteral>>)
String literal
(C11 6.5.1)
GenericSelection(Box<Node<GenericSelection>>)
Generic selection
(C11 6.5.1.1)
Member(Box<Node<MemberExpression>>)
Structure and union members
Both direct (.
) and indirect (->
) access.
(C11 6.5.2)
Call(Box<Node<CallExpression>>)
Function call expression
(C11 6.5.2)
CompoundLiteral(Box<Node<CompoundLiteral>>)
Compound literal
(C11 6.5.2)
Size of a type
Note: size of an expression is represented with UnaryOperator::SizeOf
.
(C11 6.5.3)
Alignment of a type
(C11 6.5.3)
UnaryOperator(Box<Node<UnaryOperatorExpression>>)
Unary operators
This represents both postfix and prefix unary oprators. Postfix expressions that take additional operands are represented by a separate entry in this enum.
(C11 6.5.2, c11 6.5.3)
Cast(Box<Node<CastExpression>>)
Cast expression
(type) expr
(C11 6.5.4)
BinaryOperator(Box<Node<BinaryOperatorExpression>>)
Binary operators
All of C binary operators that can be applied to two expressions.
(C11 6.5.5 -- 6.5.16)
Conditional(Box<Node<ConditionalExpression>>)
Conditional operator
(C11 6.5.15)
Comma(Box<Vec<Node<Expression>>>)
Comma operator
(C11 6.5.17)
OffsetOf(Box<Node<OffsetOfExpression>>)
Member offset expression
Result of expansion of offsetof
macro.
(C11 7.19 §3).
VaArg(Box<Node<VaArgExpression>>)
Variable argument list access
Result of expansion of va_arg
macro.
(C11 7.16.1.1).
Statement expression
Trait Implementations
impl Clone for Expression
[src]
fn clone(&self) -> Expression
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl PartialEq<Expression> for Expression
[src]
fn eq(&self, other: &Expression) -> bool
[src]
fn ne(&self, other: &Expression) -> bool
[src]
impl Debug for Expression
[src]
impl StructuralPartialEq for Expression
[src]
Auto Trait Implementations
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
impl RefUnwindSafe for Expression
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,