This commit is contained in:
2013-06-01 17:00:39 +02:00
parent 6d2e40778c
commit c468356c57
7 changed files with 55 additions and 51 deletions

17
inc/AST/BinOp.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef BINOP_H
#define BINOP_H
#include <string>
enum class BinOp {
EQUALS,
LESS,
PLUS,
MINUS,
TIMES,
DIV
};
std::string binOpToString(BinOp op);
#endif // BINOP_H

View File

@@ -1,20 +1,12 @@
#ifndef BINOP_H
#define BINOP_H
#ifndef BINOPEXPRESSION_H
#define BINOPEXPRESSION_H
#include "AST/Expression.h"
enum BinOp {
OP_EQUALS,
OP_LESS,
OP_PLUS,
OP_MINUS,
OP_TIMES,
OP_DIV
};
#include "AST/BinOp.h"
class BinOpExpression : public Expression {
public:
BinOpExpression(Expression* leftExp ,BinOp op, Expression* rightExp);
BinOpExpression(Expression* leftExp, BinOp op, Expression* rightExp);
virtual ~BinOpExpression();
BinOp getOp();
@@ -31,4 +23,4 @@ private:
};
#endif // BINOP_H
#endif // BINOPEXPRESSION_H