More work on binder, implements basic literal expressions

This commit is contained in:
2019-05-21 20:59:26 +02:00
parent 2fe6f570ec
commit 80998eab14
7 changed files with 251 additions and 3 deletions

View File

@@ -5,11 +5,14 @@
#define PORYGONLANG_BOUNDSTATEMENT_HPP
#include <vector>
#include "../BoundExpressions/BoundExpression.hpp"
using namespace std;
enum class BoundStatementKind{
Script,
Block,
Expression,
};
class BoundStatement{
@@ -46,4 +49,19 @@ public:
}
};
class BoundExpressionStatement : public BoundStatement{
BoundExpression* _expression;
public:
explicit BoundExpressionStatement(BoundExpression* expression){
_expression = expression;
}
~BoundExpressionStatement() final{
delete _expression;
}
BoundStatementKind GetKind() final{
return BoundStatementKind ::Expression;
}
};
#endif //PORYGONLANG_BOUNDSTATEMENT_HPP