Enum cpp_demangle::ast::Expression[][src]

pub enum Expression {
Show variants Unary(OperatorNameBox<Expression>), Binary(OperatorNameBox<Expression>, Box<Expression>), Ternary(OperatorNameBox<Expression>, Box<Expression>, Box<Expression>), PrefixInc(Box<Expression>), PrefixDec(Box<Expression>), Call(Box<Expression>, Vec<Expression>), ConversionOne(TypeHandleBox<Expression>), ConversionMany(TypeHandleVec<Expression>), ConversionBraced(TypeHandleVec<Expression>), BracedInitList(Box<Expression>), New(Vec<Expression>, TypeHandleOption<Initializer>), GlobalNew(Vec<Expression>, TypeHandleOption<Initializer>), NewArray(Vec<Expression>, TypeHandleOption<Initializer>), GlobalNewArray(Vec<Expression>, TypeHandleOption<Initializer>), Delete(Box<Expression>), GlobalDelete(Box<Expression>), DeleteArray(Box<Expression>), GlobalDeleteArray(Box<Expression>), DynamicCast(TypeHandleBox<Expression>), StaticCast(TypeHandleBox<Expression>), ConstCast(TypeHandleBox<Expression>), ReinterpretCast(TypeHandleBox<Expression>), TypeidType(TypeHandle), TypeidExpr(Box<Expression>), SizeofType(TypeHandle), SizeofExpr(Box<Expression>), AlignofType(TypeHandle), AlignofExpr(Box<Expression>), Noexcept(Box<Expression>), TemplateParam(TemplateParam), FunctionParam(FunctionParam), Member(Box<Expression>, MemberName), DerefMember(Box<Expression>, MemberName), PointerToMember(Box<Expression>, Box<Expression>), SizeofTemplatePack(TemplateParam), SizeofFunctionPack(FunctionParam), SizeofCapturedTemplatePack(Vec<TemplateArg>), PackExpansion(Box<Expression>), Throw(Box<Expression>), Rethrow, UnresolvedName(UnresolvedName), Primary(ExprPrimary),
}

The <expression> production.

 <expression> ::= <unary operator-name> <expression>
              ::= <binary operator-name> <expression> <expression>
              ::= <ternary operator-name> <expression> <expression> <expression>
              ::= pp_ <expression>                             # prefix ++
              ::= mm_ <expression>                             # prefix --
              ::= cl <expression>+ E                           # expression (expr-list), call
              ::= cv <type> <expression>                       # type (expression), conversion with one argument
              ::= cv <type> _ <expression>* E                  # type (expr-list), conversion with other than one argument
              ::= tl <type> <expression>* E                    # type {expr-list}, conversion with braced-init-list argument
              ::= il <expression> E                            # {expr-list}, braced-init-list in any other context
              ::= [gs] nw <expression>* _ <type> E             # new (expr-list) type
              ::= [gs] nw <expression>* _ <type> <initializer> # new (expr-list) type (init)
              ::= [gs] na <expression>* _ <type> E             # new[] (expr-list) type
              ::= [gs] na <expression>* _ <type> <initializer> # new[] (expr-list) type (init)
              ::= [gs] dl <expression>                         # delete expression
              ::= [gs] da <expression>                         # delete[] expression
              ::= dc <type> <expression>                       # dynamic_cast<type> (expression)
              ::= sc <type> <expression>                       # static_cast<type> (expression)
              ::= cc <type> <expression>                       # const_cast<type> (expression)
              ::= rc <type> <expression>                       # reinterpret_cast<type> (expression)
              ::= ti <type>                                    # typeid (type)
              ::= te <expression>                              # typeid (expression)
              ::= st <type>                                    # sizeof (type)
              ::= sz <expression>                              # sizeof (expression)
              ::= at <type>                                    # alignof (type)
              ::= az <expression>                              # alignof (expression)
              ::= nx <expression>                              # noexcept (expression)
              ::= <template-param>
              ::= <function-param>
              ::= dt <expression> <unresolved-name>            # expr.name
              ::= pt <expression> <unresolved-name>            # expr->name
              ::= ds <expression> <expression>                 # expr.*expr
              ::= sZ <template-param>                          # sizeof...(T), size of a template parameter pack
              ::= sZ <function-param>                          # sizeof...(parameter), size of a function parameter pack
              ::= sP <template-arg>* E                         # sizeof...(T), size of a captured template parameter pack from an alias template
              ::= sp <expression>                              # expression..., pack expansion
              ::= tw <expression>                              # throw expression
              ::= tr                                           # throw with no operand (rethrow)
              ::= <unresolved-name>                            # f(p), N::f(p), ::f(p),
                                                               # freestanding dependent name (e.g., T::x),
                                                               # objectless nonstatic member reference
              ::= <expr-primary>

Variants

Unary(OperatorNameBox<Expression>)

A unary operator expression.

Binary(OperatorNameBox<Expression>, Box<Expression>)

A binary operator expression.

Ternary(OperatorNameBox<Expression>, Box<Expression>, Box<Expression>)

A ternary operator expression.

PrefixInc(Box<Expression>)

A prefix ++.

PrefixDec(Box<Expression>)

A prefix --.

Call(Box<Expression>, Vec<Expression>)

A call with functor and arguments.

ConversionOne(TypeHandleBox<Expression>)

A type conversion with one argument.

ConversionMany(TypeHandleVec<Expression>)

A type conversion with many arguments.

ConversionBraced(TypeHandleVec<Expression>)

A type conversion with many arguments.

BracedInitList(Box<Expression>)

A braced init list expression.

New(Vec<Expression>, TypeHandleOption<Initializer>)

The new operator.

GlobalNew(Vec<Expression>, TypeHandleOption<Initializer>)

The global ::new operator.

NewArray(Vec<Expression>, TypeHandleOption<Initializer>)

The new[] operator.

GlobalNewArray(Vec<Expression>, TypeHandleOption<Initializer>)

The global ::new[] operator.

Delete(Box<Expression>)

The delete operator.

GlobalDelete(Box<Expression>)

The global ::delete operator.

DeleteArray(Box<Expression>)

The delete[] operator.

GlobalDeleteArray(Box<Expression>)

The global ::delete[] operator.

DynamicCast(TypeHandleBox<Expression>)

dynamic_cast<type> (expression)

StaticCast(TypeHandleBox<Expression>)

static_cast<type> (expression)

ConstCast(TypeHandleBox<Expression>)

const_cast<type> (expression)

ReinterpretCast(TypeHandleBox<Expression>)

reinterpret_cast<type> (expression)

TypeidType(TypeHandle)

typeid (type)

TypeidExpr(Box<Expression>)

typeid (expression)

SizeofType(TypeHandle)

sizeof (type)

SizeofExpr(Box<Expression>)

sizeof (expression)

AlignofType(TypeHandle)

alignof (type)

AlignofExpr(Box<Expression>)

alignof (expression)

Noexcept(Box<Expression>)

noexcept (expression)

TemplateParam(TemplateParam)

A named template parameter.

FunctionParam(FunctionParam)

A function parameter.

Member(Box<Expression>, MemberName)

expr.name

DerefMember(Box<Expression>, MemberName)

expr->name

PointerToMember(Box<Expression>, Box<Expression>)

expr.*expr

SizeofTemplatePack(TemplateParam)

sizeof...(T), size of a template parameter pack.

SizeofFunctionPack(FunctionParam)

sizeof...(parameter), size of a function parameter pack.

SizeofCapturedTemplatePack(Vec<TemplateArg>)

sizeof...(T), size of a captured template parameter pack from an alias template.

PackExpansion(Box<Expression>)

expression..., pack expansion.

Throw(Box<Expression>)

throw expression

Rethrow

throw with no operand

UnresolvedName(UnresolvedName)

f(p), N::f(p), ::f(p), freestanding dependent name (e.g., T::x), objectless nonstatic member reference.

Primary(ExprPrimary)

An <expr-primary> production.

Trait Implementations

impl Clone for Expression[src]

impl Debug for Expression[src]

impl PartialEq<Expression> for Expression[src]

impl Eq for Expression[src]

impl StructuralEq for Expression[src]

impl StructuralPartialEq for Expression[src]

Auto Trait Implementations

impl RefUnwindSafe for Expression

impl Send for Expression

impl Sync for Expression

impl Unpin for Expression

impl UnwindSafe for Expression

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.