More work on binder, implements basic literal expressions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user