Implements string evaluation and concat

This commit is contained in:
2019-05-25 16:15:20 +02:00
parent b536187593
commit 0205b92ae6
10 changed files with 123 additions and 6 deletions

View File

@@ -79,8 +79,10 @@ BoundExpression* Binder::BindBinaryOperator(BinaryExpression* expression){
return new BoundBinaryExpression(boundLeft, boundRight, BoundBinaryOperation::Addition, new NumericScriptType(false, false),
expression->GetStartPosition(), expression->GetLength());
}
} else if (boundLeftType->GetClass() == TypeClass::String){
return new BoundBinaryExpression(boundLeft, boundRight, BoundBinaryOperation::Concatenation, new ScriptType(TypeClass::String),
expression->GetStartPosition(), expression->GetLength());
}
//TODO: String Concatenation
break;
case BinaryOperatorKind ::Subtraction:
if (boundLeftType->GetClass() == TypeClass::Number && boundRightType->GetClass() == TypeClass::Number){