2013-06-02 09:47:27 +02:00
|
|
|
/* The scully programming language.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) Peter Dahlberg, Markus Hauschild and Florian Sattler, 2013.
|
|
|
|
|
* Licensed under the GNU GPL v2.
|
|
|
|
|
*/
|
|
|
|
|
|
2013-06-01 03:18:46 +02:00
|
|
|
#include "AST/BinOpExpression.h"
|
|
|
|
|
#include "AST/ASTVisitor.h"
|
|
|
|
|
|
2013-06-01 16:13:23 +02:00
|
|
|
BinOpExpression::BinOpExpression(Expression *leftExp, BinOp op, Expression *rightExp) :
|
2013-06-01 03:18:46 +02:00
|
|
|
leftExp_(leftExp), op_(op), rightExp_(rightExp) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BinOpExpression::~BinOpExpression() {
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-01 16:13:23 +02:00
|
|
|
BinOp BinOpExpression::getOp() {
|
2013-06-01 03:18:46 +02:00
|
|
|
return op_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Expression* BinOpExpression::getLeftExp() {
|
|
|
|
|
return leftExp_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Expression* BinOpExpression::getRightExp() {
|
|
|
|
|
return rightExp_;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void BinOpExpression::accept(ASTVisitor* visitor) {
|
|
|
|
|
visitor->visit(this);
|
|
|
|
|
}
|