#include <integerliteral.h>
Inheritance diagram for IntegerLiteral:
Public Member Functions | |
IntegerLiteral (SrcPosition *position, int value) | |
IntegerLiteral (const IntegerLiteral &integerLiteral) | |
virtual | ~IntegerLiteral () |
int | getValue () const |
virtual Ast & | operator= (const Ast &ast) |
virtual bool | operator== (const Ast &ast) const |
virtual VisitorReturn * | visit (Visitor &visitor) |
virtual Ast & | clone () const |
Private Attributes | |
int | value |
|
Definition at line 10 of file integerliteral.h. Referenced by clone().
00010 : Expression(position), Ast(position), value(value) {} |
|
Definition at line 11 of file integerliteral.h. References Ast::position.
00011 : Expression(position), Ast(position), value(integerLiteral.value) {} |
|
Definition at line 12 of file integerliteral.h.
00012 {} |
|
Implements Ast. Definition at line 26 of file integerliteral.h. References IntegerLiteral().
00026 { 00027 return *(new IntegerLiteral(new SrcPosition(*this->position), this->value)); 00028 } |
|
Definition at line 14 of file integerliteral.h. Referenced by TypeCheckerVisitor::visitFieldType().
00014 { 00015 return this->value; 00016 } |
|
Reimplemented from Expression. Definition at line 3 of file integerliteral.cpp. References Expression::operator=(), and value.
00003 { 00004 const IntegerLiteral& integerLiteral = dynamic_cast<const IntegerLiteral&>(ast); 00005 00006 Expression::operator=(ast); 00007 this->value = integerLiteral.value; 00008 00009 return (*this); 00010 } |
|
Reimplemented from Expression. Definition at line 13 of file integerliteral.cpp. References Expression::operator==(), and value.
00013 { 00014 const IntegerLiteral& integerLiteral = dynamic_cast<const IntegerLiteral&>(ast); 00015 return this->value == integerLiteral.value && Expression::operator==(ast); 00016 } |
|
Implements Ast. Definition at line 22 of file integerliteral.h. References Visitor::visitIntegerLiteral().
00022 { 00023 return visitor.visitIntegerLiteral(this); 00024 } |
|
Definition at line 8 of file integerliteral.h. Referenced by operator=(), and operator==(). |