This commit is contained in:
Rafal Kupiec 2018-07-24 16:14:58 +02:00
parent c0a8608dd7
commit ae2c1e2ae5
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 5 additions and 1 deletions

View File

@ -5160,7 +5160,11 @@ static sxi32 PH7_CompileSwitch(ph7_gen_state *pGen) {
for(;;) {
sxu32 nKwrd;
if(pGen->pIn >= pGen->pEnd) {
/* No more input to process */
/* No more input to process and switch block not ended */
rc = PH7_GenCompileError(&(*pGen), E_ERROR, pGen->pIn->nLine, "Unexpected end of file, expecting 'case' or 'default' or '}'");
if(rc == SXERR_ABORT) {
return SXERR_ABORT;
}
break;
}
if((pGen->pIn->nType & PH7_TK_KEYWORD) == 0) {