Work on evaluation
This commit is contained in:
@@ -20,7 +20,6 @@ enum class BoundExpressionKind{
|
||||
|
||||
Unary,
|
||||
Binary,
|
||||
Parenthesized,
|
||||
};
|
||||
|
||||
class BoundExpression{
|
||||
@@ -150,6 +149,18 @@ public:
|
||||
BoundExpressionKind GetKind() final{
|
||||
return BoundExpressionKind ::Binary;
|
||||
}
|
||||
|
||||
BoundExpression* GetLeft(){
|
||||
return _left;
|
||||
}
|
||||
|
||||
BoundExpression* GetRight(){
|
||||
return _right;
|
||||
}
|
||||
|
||||
BoundBinaryOperation GetOperation(){
|
||||
return _operation;
|
||||
}
|
||||
};
|
||||
|
||||
class BoundUnaryExpression : public BoundExpression {
|
||||
|
||||
@@ -37,6 +37,10 @@ public:
|
||||
BoundStatementKind GetKind() override{
|
||||
return BoundStatementKind ::Block;
|
||||
}
|
||||
|
||||
vector<BoundStatement*> GetStatements(){
|
||||
return _statements;
|
||||
}
|
||||
};
|
||||
|
||||
class BoundScriptStatement : public BoundBlockStatement{
|
||||
@@ -62,6 +66,10 @@ public:
|
||||
BoundStatementKind GetKind() final{
|
||||
return BoundStatementKind ::Expression;
|
||||
}
|
||||
|
||||
BoundExpression* GetExpression(){
|
||||
return _expression;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //PORYGONLANG_BOUNDSTATEMENT_HPP
|
||||
|
||||
Reference in New Issue
Block a user