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 17:00:39 +02:00
|
|
|
#ifndef BINOPEXPRESSION_H
|
|
|
|
|
#define BINOPEXPRESSION_H
|
2013-06-01 01:22:04 +02:00
|
|
|
|
|
|
|
|
#include "AST/Expression.h"
|
2013-06-01 17:00:39 +02:00
|
|
|
#include "AST/BinOp.h"
|
2013-06-01 16:13:23 +02:00
|
|
|
|
2013-06-01 03:18:46 +02:00
|
|
|
class BinOpExpression : public Expression {
|
2013-06-01 01:22:04 +02:00
|
|
|
public:
|
2013-06-01 17:00:39 +02:00
|
|
|
BinOpExpression(Expression* leftExp, BinOp op, Expression* rightExp);
|
2013-06-01 03:18:46 +02:00
|
|
|
virtual ~BinOpExpression();
|
2013-06-01 01:22:04 +02:00
|
|
|
|
2013-06-01 16:13:23 +02:00
|
|
|
BinOp getOp();
|
2013-06-01 01:22:04 +02:00
|
|
|
Expression* getLeftExp();
|
|
|
|
|
Expression* getRightExp();
|
|
|
|
|
virtual void accept(ASTVisitor* visitor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
2013-06-01 16:13:23 +02:00
|
|
|
BinOp op_;
|
2013-06-01 01:22:04 +02:00
|
|
|
Expression* leftExp_;
|
|
|
|
|
Expression* rightExp_;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
2013-06-01 17:00:39 +02:00
|
|
|
#endif // BINOPEXPRESSION_H
|