#include <simpleexpressionlist.h>
Inheritance diagram for SimpleExpressionList:
Public Member Functions | |
SimpleExpressionList (SrcPosition *position, Expression *expression) | |
SimpleExpressionList (const SimpleExpressionList &simpleExpressionList) | |
virtual | ~SimpleExpressionList () |
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 | |
Expression * | expression |
|
Definition at line 12 of file simpleexpressionlist.h. Referenced by clone().
00013 : ExpressionList(position), expression(expression) {} |
|
Definition at line 15 of file simpleexpressionlist.h. References Ast::position.
00015 : ExpressionList(simpleExpressionList.position) { 00016 *(this) = simpleExpressionList; 00017 } |
|
Definition at line 19 of file simpleexpressionlist.h.
00019 { 00020 delete this->expression; 00021 } |
|
Implements Ast. Definition at line 34 of file simpleexpressionlist.h. References SimpleExpressionList(). Referenced by SequentialExpressionList::clone(), and SequentialExpressionList::operator=().
00034 { 00035 return *(new SimpleExpressionList(new SrcPosition(*(this->position)), 00036 this->expression ? dynamic_cast<Expression*>(&(this->expression->clone())) : 0)); 00037 } |
|
Definition at line 23 of file simpleexpressionlist.h. Referenced by TypeCheckerVisitor::visitSimpleExpressionList().
00023 { 00024 return this->expression; 00025 } |
|
Reimplemented from ExpressionList. Definition at line 5 of file simpleexpressionlist.cpp. References Ast::clone(), expression, and ExpressionList::operator=().
00005 { 00006 const SimpleExpressionList& simpleExpressionList = dynamic_cast<const SimpleExpressionList&>(ast); 00007 00008 ExpressionList::operator=(ast); 00009 this->expression = simpleExpressionList.expression ? dynamic_cast<Expression*>(&(simpleExpressionList.expression->clone())) : 0; 00010 00011 return *(this); 00012 } |
|
Reimplemented from ExpressionList. Definition at line 14 of file simpleexpressionlist.cpp. References expression, and ExpressionList::operator==().
00014 { 00015 bool result = false; 00016 const SimpleExpressionList& simpleExpressionList = dynamic_cast<const SimpleExpressionList&>(ast); 00017 00018 if (typeid(ast) != typeid(SimpleExpressionList)) 00019 return false; 00020 00021 if (this->expression) 00022 result = (*(this->expression) == *(simpleExpressionList.expression)); 00023 00024 return result && ExpressionList::operator==(ast); 00025 } |
|
Implements Ast. Definition at line 30 of file simpleexpressionlist.h. References Visitor::visitSimpleExpressionList(). Referenced by TypeCheckerVisitor::visitSequentialExpressionList().
00030 { 00031 return visitor.visitSimpleExpressionList(this); 00032 } |
|
Definition at line 9 of file simpleexpressionlist.h. Referenced by operator=(), and operator==(). |