C# assigning components to tag

Don’t know how to make that work :

using UnityEngine;
using System.Collections;

public class AsignScript : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	#if UNITY_EDITOR
	// Update is called once per frame
	void ExecuteInEditMode () {
		GameObject[] bloc = GameObject.FindGameObjectsWithTag ("Bloc");
		if (Application.isEditor) {
			foreach (GameObject blc in bloc) {
				if ( !blc.GetComponent<MouseControlScript>())
				blc.AddComponent<Rigidbody2D> ();
				blc.AddComponent<BoxCollider2D> ();
				blc.AddComponent<MouseControlScript> ();
			}
		}
	}
	#endif
}

Any clue ?

Not sure, but probably a syntax error? Instead of doing this

if ( !blc.GetComponent<MouseControlScript>())
                 blc.AddComponent<Rigidbody2D> ();
                 blc.AddComponent<BoxCollider2D> ();
                 blc.AddComponent<MouseControlScript> ();

Try this

if ( !blc.GetComponent<MouseControlScript>())
{
                 blc.AddComponent<Rigidbody2D> ();
                 blc.AddComponent<BoxCollider2D> ();
                 blc.AddComponent<MouseControlScript> ();
}