Expected primary expression before this token

I'm new into C++ language and also have a little knowledge on it. When I try to compile the code I was getting this error:

sketch_jan14b:48: error: expected primary-expression before '}' token

}

^

exit status 1
expected primary-expression before '}' token

Here's my code:

#define PIN_BUTTON_1    2
#define PIN_LED_RED     5

int lastButtonState1 = LOW;
int functionNumber = 0;
int currentLedValue = 0;

void setup() {
    pinMode(PIN_BUTTON_1, INPUT);
    pinMode(PIN_LED_RED, OUTPUT);

}

void loop() {
    const int currentButtonState1 = digitalRead(PIN_BUTTON_1);
    if (lastButtonState1 != currentButtonState1)
    {   // If the button's state has changed
        if (currentButtonState1 == HIGH)
        {
            ++functionNumber;
        }
        lastButtonState1 = currentButtonState1;
    }
    DoFunction(functionNumber);
    delay(200);
}

void DoFunction(const int& function)
{
    switch (function)
    {
    case 1:
        if (currentLedValue > 0)
        {
            currentLedValue = LOW;
        }
        else
        {
            currentLedValue = HIGH;
        }
        digitalWrite(PIN_LED_RED, currentLedValue);
        break;
    case 2:
        currentLedValue = 128;
        analogWrite(PIN_LED_RED, currentLedValue);
        break;
    default:
    }   
}

It appears that within your loop you have too many closing brackets too early. After void loop() you should not have every bracket closed until the end of the code. In this case, you have three opening brackets followed by three closing brackets, so everything after delay(200) is not in the loop. You need to look through the loop and change your brackets to how you want it. (tip: when you click on one bracket it shows which bracket it is paired with)

After void loop() you should not have every bracket closed until the end of the code

I am not sure what this is supposed to mean.

You have no code to execute for the default case. Either add some code, even if it only a semicolon, or remove the default case.

UKHeliBob:
I am not sure what this is supposed to mean.

Allow me to rephrase that. The bracket that opens the loop should not be closed until the end of the loop.

The brackets on loop in this code are fine.

    default:
    }

A label must be followed by a statement. An empty statement (just a semicolon) is enough.

    default: break;

or 

    default:;