expr(); // constant();
if (token == TokenNameCOLON || token == TokenNameSEMICOLON) {
getNextToken();
+ if (token == TokenNameRBRACE) {
+ // empty case; assumes that the '}' token belongs to the wrapping switch statement
+ break;
+ }
if (token == TokenNamecase || token == TokenNamedefault) {
// empty case statement ?
continue;
if (token == TokenNameCOLON || token == TokenNameSEMICOLON) {
getNextToken();
if (token == TokenNameRBRACE) {
- // empty default case
+ // empty default case; ; assumes that the '}' token belongs to the wrapping switch statement
break;
}
if (token != TokenNamecase) {