Add sources

This commit is contained in:
2018-06-05 22:30:22 +02:00
parent e28912dc5e
commit 9b56ec979d
143 changed files with 8636 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
#pragma once
#include "../Expression.h"
namespace AST
{
class Binary : public Expression
{
public:
enum EBinaryType
{
// Arithmetic
ADDITION,
SUBTRACTION,
MULTIPLICATON,
DIVISION,
MODULO,
// Relational
EQ,
NEQ,
GT,
GEQ,
LT,
LEQ,
// Assignment
BASIC_ASSIGNMENT,
ADDITION_ASSIGNMENT,
SUBTRACTION_ASSIGNMENT,
MULTIPLICATION_ASSIGNMENT,
DIVISION_ASSIGNMENT,
MODULO_ASSIGNMENT,
};
explicit Binary (const Expression * pLeftExpr, const Expression * pRightExpr);
virtual ~Binary (void);
virtual EExpressionType getExpressionType (void) const { return(BINARY); }
const Expression * getLeftExpression() const { return(m_pLeftExpr); }
const Expression * getRightExpression() const { return(m_pRightExpr); }
virtual EBinaryType getBinaryType (void) const = 0;
private:
const Expression * m_pLeftExpr;
const Expression * m_pRightExpr;
};
}