[][src]Enum lang_c::ast::Expression

pub enum Expression {
    Identifier(Box<Node<Identifier>>),
    Constant(Box<Node<Constant>>),
    StringLiteral(Box<Node<StringLiteral>>),
    GenericSelection(Box<Node<GenericSelection>>),
    Member(Box<Node<MemberExpression>>),
    Call(Box<Node<CallExpression>>),
    CompoundLiteral(Box<Node<CompoundLiteral>>),
    SizeOf(Box<Node<TypeName>>),
    AlignOf(Box<Node<TypeName>>),
    UnaryOperator(Box<Node<UnaryOperatorExpression>>),
    Cast(Box<Node<CastExpression>>),
    BinaryOperator(Box<Node<BinaryOperatorExpression>>),
    Conditional(Box<Node<ConditionalExpression>>),
    Comma(Box<Vec<Node<Expression>>>),
    OffsetOf(Box<Node<OffsetOfExpression>>),
    VaArg(Box<Node<VaArgExpression>>),
    Statement(Box<Node<Statement>>),
}

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)

Constant(Box<Node<Constant>>)

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)

Structure and union members

Both direct (.) and indirect (->) access.

(C11 6.5.2)

Function call expression

(C11 6.5.2)

CompoundLiteral(Box<Node<CompoundLiteral>>)

Compound literal

(C11 6.5.2)

SizeOf(Box<Node<TypeName>>)

Size of a type

Note: size of an expression is represented with UnaryOperator::SizeOf.

(C11 6.5.3)

AlignOf(Box<Node<TypeName>>)

Alignment of a type

(C11 6.5.3)

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 expression

(type) expr

(C11 6.5.4)

Binary operators

All of C binary operators that can be applied to two expressions.

(C11 6.5.5 -- 6.5.16)

Conditional operator

(C11 6.5.15)

Comma operator

(C11 6.5.17)

Member offset expression

Result of expansion of offsetof macro.

(C11 7.19 §3).

Variable argument list access

Result of expansion of va_arg macro.

(C11 7.16.1.1).

Statement(Box<Node<Statement>>)

Statement expression

GNU extension

Trait Implementations

impl Clone for Expression[src]

impl PartialEq<Expression> for Expression[src]

impl Debug for Expression[src]

impl StructuralPartialEq for Expression[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]