What's wrong with my script?

Hi! Can someone explain me why is it telling me ‘‘UCE0001: ‘;’ expected. Insert a semicolon at the end’’ ??? I don’t find anything wrong…

    #pragma strict

var ToucheSol:boolean=false;

function Start () {

}

function Update () {

    transform.rotation.x = 0;
    transform.rotation.y = 0;
    transform.rotation.z = 0;


if (Input.GetKeyDown ("space") && ToucheSol == true){

       GetComponent.<Rigidbody2D>().AddForce(Vector2(0,2000));
    }

    function (OnCollisionEnter2D){

        ToucheSol=true;
    }
    function (OnCollisionExit2D){

        ToucheSol=false;
    }

        if (Input.GetKey ("right")){

            transform.localScale.x = 1.380835;

            transform.Translate(Vector2(0.13,0));
        }

        if (Input.GetKey ("left")){

            transform.localScale.x = -1.380835;

            transform.Translate(Vector2(-0.13,0));
        }



        
    }

You are missing an } to close the update function. Just insert one, after the if statements }.

Thanks!! ^^