Fix for #6
This commit is contained in:
parent
c0a8608dd7
commit
ae2c1e2ae5
|
@ -5160,7 +5160,11 @@ static sxi32 PH7_CompileSwitch(ph7_gen_state *pGen) {
|
||||||
for(;;) {
|
for(;;) {
|
||||||
sxu32 nKwrd;
|
sxu32 nKwrd;
|
||||||
if(pGen->pIn >= pGen->pEnd) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
if((pGen->pIn->nType & PH7_TK_KEYWORD) == 0) {
|
if((pGen->pIn->nType & PH7_TK_KEYWORD) == 0) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user