Implements binding unary expressions
This commit is contained in:
@@ -133,13 +133,13 @@ public:
|
||||
class BoundBinaryExpression : public BoundExpression {
|
||||
BoundExpression* _left;
|
||||
BoundExpression* _right;
|
||||
BoundBinaryOperator _operator;
|
||||
BoundBinaryOperation _operation;
|
||||
public:
|
||||
BoundBinaryExpression(BoundExpression* left, BoundExpression* right, BoundBinaryOperator op, ScriptType* result)
|
||||
BoundBinaryExpression(BoundExpression* left, BoundExpression* right, BoundBinaryOperation op, ScriptType* result)
|
||||
: BoundExpression(left->GetStartPosition(), right->GetEndPosition() - left->GetStartPosition(), result){
|
||||
_left = left;
|
||||
_right = right;
|
||||
_operator = op;
|
||||
_operation = op;
|
||||
}
|
||||
~BoundBinaryExpression() final{
|
||||
delete _left;
|
||||
@@ -151,7 +151,24 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class BoundUnaryExpression : public BoundExpression {
|
||||
BoundExpression* _operand;
|
||||
BoundUnaryOperation _operation;
|
||||
public:
|
||||
BoundUnaryExpression(BoundExpression* operand, BoundUnaryOperation op, ScriptType* result, unsigned int start, unsigned int length)
|
||||
:BoundExpression(start, length, result){
|
||||
_operand = operand;
|
||||
_operation = op;
|
||||
}
|
||||
|
||||
~BoundUnaryExpression() final{
|
||||
delete _operand;
|
||||
}
|
||||
|
||||
BoundExpressionKind GetKind() final{
|
||||
return BoundExpressionKind ::Unary;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user