#include <cppExpression.h>
Inheritance diagram for CPPExpression:
Public Types | |
enum | ResultType { RT_integer, RT_real, RT_pointer, RT_error } |
enum | Type { T_integer, T_real, T_string, T_variable, T_function, T_unknown_ident, T_typecast, T_construct, T_default_construct, T_new, T_default_new, T_sizeof, T_unary_operation, T_binary_operation, T_trinary_operation } |
Public Member Functions | |
CPPExpression (int value) | |
CPPExpression (const string &value) | |
CPPExpression (double value) | |
CPPExpression (CPPIdentifier *ident, CPPScope *current_scope, CPPScope *global_scope, CPPPreprocessor *error_sink=NULL) | |
CPPExpression (int unary_operator, CPPExpression *op1) | |
CPPExpression (int binary_operator, CPPExpression *op1, CPPExpression *op2) | |
CPPExpression (int trinary_operator, CPPExpression *op1, CPPExpression *op2, CPPExpression *op3) | |
~CPPExpression () | |
Result | evaluate () const |
CPPType * | determine_type () const |
bool | is_tbd () const |
virtual CPPDeclaration * | substitute_decl (SubstDecl &subst, CPPScope *current_scope, CPPScope *global_scope) |
virtual void | output (ostream &out, int indent_level, CPPScope *scope, bool complete) const |
virtual SubType | get_subtype () const |
virtual CPPExpression * | as_expression () |
Static Public Member Functions | |
CPPExpression | typecast_op (CPPType *type, CPPExpression *op1) |
CPPExpression | construct_op (CPPType *type, CPPExpression *op1) |
CPPExpression | new_op (CPPType *type, CPPExpression *op1=NULL) |
CPPExpression | sizeof_func (CPPType *type) |
Public Attributes | |
Type | _type |
string | _str |
union { | |
int _integer | |
double _real | |
CPPInstance * _variable | |
CPPFunctionGroup * _fgroup | |
CPPIdentifier * _ident | |
class { | |
CPPType * _to | |
CPPExpression * _op1 | |
} _typecast | |
class { | |
int _operator | |
CPPExpression * _op1 | |
CPPExpression * _op2 | |
CPPExpression * _op3 | |
} _op | |
} | _u |
Protected Member Functions | |
virtual bool | is_equal (const CPPDeclaration *other) const |
virtual bool | is_less (const CPPDeclaration *other) const |
Static Protected Member Functions | |
CPPType * | elevate_type (CPPType *t1, CPPType *t2) |
|
Definition at line 53 of file cppExpression.h. |
|
Definition at line 96 of file cppExpression.h. |
|
Definition at line 187 of file cppExpression.cxx. References _type, _u, and T_integer. Referenced by substitute_decl(). |
|
Definition at line 213 of file cppExpression.cxx. |
|
Definition at line 200 of file cppExpression.cxx. |
|
Definition at line 226 of file cppExpression.cxx. References _type, _u, CPPDeclaration::as_function_group(), CPPDeclaration::as_instance(), current_scope, CPPIdentifier::find_symbol(), global_scope, NULL, T_function, T_unknown_ident, and T_variable. |
|
Definition at line 258 of file cppExpression.cxx. References _type, _u, NULL, and T_unary_operation. |
|
Definition at line 274 of file cppExpression.cxx. References _type, _u, NULL, and T_binary_operation. |
|
Definition at line 290 of file cppExpression.cxx. References _type, _u, and T_trinary_operation. |
|
Definition at line 382 of file cppExpression.cxx. |
|
Reimplemented from CPPDeclaration. Definition at line 1223 of file cppExpression.cxx. |
|
Definition at line 323 of file cppExpression.cxx. References _type, _u, NULL, T_construct, T_default_construct, and type. |
|
|
Definition at line 1233 of file cppExpression.cxx. References CPPSimpleType::_flags, CPPSimpleType::_type, CPPDeclaration::as_simple_type(), CPPSimpleType::F_long, CPPSimpleType::F_longlong, CPPSimpleType::F_short, NULL, CPPSimpleType::T_bool, CPPSimpleType::T_double, CPPSimpleType::T_float, and CPPSimpleType::T_int. Referenced by determine_type(). |
|
|
Implements CPPDeclaration. Definition at line 1213 of file cppExpression.cxx. References CPPDeclaration::ST_expression. |
|
Reimplemented from CPPDeclaration. Definition at line 1287 of file cppExpression.cxx. References _str, _type, _u, assert, NULL, T_binary_operation, T_construct, T_default_construct, T_default_new, T_function, T_integer, T_new, T_real, T_sizeof, T_string, T_trinary_operation, T_typecast, T_unary_operation, T_unknown_ident, and T_variable. |
|
Reimplemented from CPPDeclaration. Definition at line 1351 of file cppExpression.cxx. References _str, _type, _u, assert, NULL, T_binary_operation, T_construct, T_default_construct, T_default_new, T_function, T_integer, T_new, T_real, T_sizeof, T_string, T_trinary_operation, T_typecast, T_unary_operation, T_unknown_ident, and T_variable. |
|
Definition at line 891 of file cppExpression.cxx. References _u, T_binary_operation, T_construct, T_default_construct, T_default_new, T_new, T_sizeof, T_trinary_operation, T_typecast, T_unary_operation, and T_variable. Referenced by CPPTemplateParameterList::is_tbd(). |
|
Definition at line 346 of file cppExpression.cxx. |
|
Implements CPPDeclaration. Definition at line 933 of file cppExpression.cxx. References _str, _type, _u, T_binary_operation, T_construct, T_default_construct, T_default_new, T_function, T_integer, T_new, T_real, T_sizeof, T_string, T_trinary_operation, T_typecast, T_unary_operation, T_unknown_ident, and T_variable. Referenced by CPPParameterList::output(). |
|
Definition at line 368 of file cppExpression.cxx. |
|
Definition at line 802 of file cppExpression.cxx. References _u, CPPDeclaration::as_expression(), CPPDeclaration::as_instance(), CPPExpression(), current_scope, global_scope, CPPDeclaration::substitute_decl(), T_binary_operation, T_construct, T_default_construct, T_default_new, T_new, T_sizeof, T_trinary_operation, T_typecast, T_unary_operation, and T_variable. Referenced by CPPTemplateParameterList::build_subst_decl(), CPPInstance::substitute_decl(), and CPPArrayType::substitute_decl(). |
|
Definition at line 308 of file cppExpression.cxx. References _type, _u, T_typecast, and type. |
|
Definition at line 120 of file cppExpression.h. |
|
Definition at line 121 of file cppExpression.h. |
|
Definition at line 117 of file cppExpression.h. |
|
|
|
Definition at line 132 of file cppExpression.h. |
|
Definition at line 125 of file cppExpression.h. |
|
Definition at line 133 of file cppExpression.h. |
|
Definition at line 134 of file cppExpression.h. |
|
Definition at line 131 of file cppExpression.h. |
|
Definition at line 118 of file cppExpression.h. |
|
Definition at line 115 of file cppExpression.h. Referenced by CPPExpression(), is_equal(), is_less(), and output(). |
|
Definition at line 124 of file cppExpression.h. |
|
Definition at line 114 of file cppExpression.h. Referenced by construct_op(), CPPExpression(), is_equal(), is_less(), new_op(), CPPParameterList::output(), output(), sizeof_func(), and typecast_op(). |
|
|
|
Referenced by construct_op(), CPPExpression(), determine_type(), evaluate(), is_equal(), is_less(), is_tbd(), new_op(), output(), sizeof_func(), substitute_decl(), and typecast_op(). |
|
Definition at line 119 of file cppExpression.h. |