Error: expected unqualified-id before 'while'

I was working on a small program today and I got two errors when I tried to compile it, " expected unqualified-id before '{' token " and " expected unqualified-id before 'while' ". I can't seem to figure out what this means or how to fix it. Does anyone know how to? Here is the code...

int green = 9;
int red = 8;
int greentwo = 10;
int yellow = 11;
int redtwo = 12;
int button = 2;

void setup(){
  pinMode(green, OUTPUT);
  pinMode(red, OUTPUT);
  pinMode(greentwo, OUTPUT);
  pinMode(yellow, OUTPUT);
  pinMode(redtwo, OUTPUT);
  pinMode(button, INPUT);
}
{ 
do
  digitalWrite(green, HIGH);
  delay(50);
  digitalWrite(red, HIGH);
  delay(50);
  digitalWrite(green, LOW);
  digitalWrite(greentwo, HIGH);
  delay(50);
  digitalWrite(red, LOW);
  digitalWrite(yellow, HIGH);
  delay(50);
  digitalWrite(greentwo, LOW);
  digitalWrite(redtwo, HIGH);
  delay(50);
  digitalWrite(yellow, LOW);
  digitalWrite(redtwo, LOW);
  delay(50);
} while (button == LOW);

void loop(){
  int state = digitalRead(button);
  if (state == HIGH){
  changeDirection();
  }
}

void changeDirection(){
  digitalWrite(greentwo, HIGH);
}

Thanks!

Your { }s are not following the format:

do
{ <<< you have this in the wrong place
// your code
} while (condition test);

I think the main problem is that the "do..while" isn't inside a function.

Yeah, that in void loop ().