private void ValidateUnaryExpression(UnaryExpression expression) { DataType operandType = expression.Operand.GetType(_symbolTable); if (operandType != DataType.Undefined) { if (!expression.OperandTypeIsValid(operandType)) { Report.AddError(expression.Position, "Operator '{0}' can not be applied to operand of type '{1}'.", StringEnum.GetStringValue(expression.Operation), operandType); } } }