#include <actstatement.h>
Inheritance diagram for ActStatement:
Public Member Functions | |
ActStatement (SrcPosition *position, Identifier *identifier, Expression *expression) | |
ActStatement (const ActStatement &actStatement) | |
virtual | ~ActStatement () |
Identifier * | getIdentifier () |
Expression * | getExpression () |
virtual Ast & | operator= (const Ast &ast) |
virtual bool | operator== (const Ast &ast) const |
virtual VisitorReturn * | visit (Visitor &visitor) |
virtual Ast & | clone () const |
Private Attributes | |
Identifier * | identifier |
Expression * | expression |
|
Definition at line 14 of file actstatement.h. Referenced by clone().
00015 : SimpleStatement(position), identifier(identifier), expression(expression) {} |
|
Definition at line 17 of file actstatement.h. References Ast::position.
00017 : SimpleStatement(actStatement.position) { 00018 *(this) = actStatement; 00019 } |
|
Definition at line 21 of file actstatement.h.
00021 { 00022 delete this->identifier; 00023 delete this->expression; 00024 } |
|
Implements Ast. Definition at line 41 of file actstatement.h. References ActStatement(), and Ast::clone().
00041 { 00042 return *(new ActStatement(new SrcPosition(*(this->position)), 00043 this->identifier ? dynamic_cast<Identifier*>(&(this->identifier->clone())) : 0, 00044 this->expression ? dynamic_cast<Expression*>(&(this->expression->clone())) : 0)); 00045 } |
|
Definition at line 30 of file actstatement.h. Referenced by TypeCheckerVisitor::visitActStatement().
00030 { 00031 return this->expression; 00032 } |
|
Definition at line 26 of file actstatement.h. Referenced by TypeCheckerVisitor::visitActStatement().
00026 { 00027 return this->identifier; 00028 } |
|
Reimplemented from SimpleStatement. Definition at line 5 of file actstatement.cpp. References Ast::clone(), Identifier::clone(), expression, identifier, and Ast::operator=().
00005 { 00006 const ActStatement& actStatement = dynamic_cast<const ActStatement&>(ast); 00007 00008 Ast::operator=(ast); 00009 this->identifier = actStatement.identifier ? dynamic_cast<Identifier*>(&(actStatement.identifier->clone())) : 0; 00010 this->expression = actStatement.expression ? dynamic_cast<Expression*>(&(actStatement.expression->clone())) : 0; 00011 00012 return *(this); 00013 } |
|
Reimplemented from SimpleStatement. Definition at line 15 of file actstatement.cpp. References expression, and identifier.
00015 { 00016 bool result = false; 00017 const ActStatement& actStatement = dynamic_cast<const ActStatement&>(ast); 00018 00019 if (typeid(ast) != typeid(ActStatement)) 00020 return false; 00021 00022 if (this->identifier && this->expression) 00023 result = (*(this->identifier) == *(actStatement.identifier) && 00024 *(this->expression) == *(actStatement.expression)); 00025 00026 return result; 00027 } |
|
Implements Ast. Definition at line 37 of file actstatement.h. References Visitor::visitActStatement().
00037 { 00038 return visitor.visitActStatement(this); 00039 } |
|
Definition at line 11 of file actstatement.h. Referenced by operator=(), and operator==(). |
|
Definition at line 10 of file actstatement.h. Referenced by operator=(), and operator==(). |