bracket correction

Please consider modifying the compiler to make sure the number of right brackets and left brackets match before even compiling. I am a beginner and when I goof and they are off the error messages that are generated are way too obscure to help find the problem.

adlmail:
Please consider modifying the compiler to make sure the number of right brackets and left brackets match before even compiling. I am a beginner and when I goof and they are off the error messages that are generated are way too obscure to help find the problem.

Please consider modifying your code so that left and right brackets match before submitting them to the compiler.
How the Hell is the compiler supposed to know how your brackets should match?

Just to illustrate AWOL's question, here's a lovely little sketch that I've just concocted. It has carefully matched brackets and parentheses.

void setup(void)
{
  {Serial.begin(9600);
  while(!Serial);
  Serial.}println("Oh, oh.");
  Serial.println("Something's burning");
  ({);
  }
}

void loop(void)
{

}

but it produces these error messages:

sketch_feb18b:5: error: expected unqualified-id before '}' token
   Serial.}println("Oh, oh.");

          ^

sketch_feb18b:5: error: 'println' was not declared in this scope
   Serial.}println("Oh, oh.");

                            ^

sketch_feb18b:7: error: expected primary-expression before ')' token
   ({);

     ^

sketch_feb18b:9: error: expected ')' before '}' token
 }

 ^

sketch_feb18b:9: error: expected ';' before '}' token
expected unqualified-id before '}' token

FYI: the Arduino IDE uses the GCC compiler but the compiler is not written by the Arduino crew so it's very unlikely anyone is going to take any notice of your request.

Pete

Judging by @adlmail's email address, I'm guessing this is a troll, but that was some awesome work by @el_supremo

My advice is to always do a Tools > Auto Format on your code. The automatic indentation will make it much easier to spot mismatched bracket issues.