Browse Source

Fix for #6

pull/21/head
Rafal Kupiec 3 years ago
parent
commit
ae2c1e2ae5
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      engine/compiler.c

+ 5
- 1
engine/compiler.c 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) {


Loading…
Cancel
Save