Abort on SXERR_ABORT, #47.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-03-19 10:42:53 +01:00
parent 23601fe9c5
commit b60c1de4cf
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 3 additions and 1 deletions

View File

@ -2638,7 +2638,9 @@ static sxi32 PH7_CompileVar(ph7_gen_state *pGen) {
if(pGen->pIn < pGen->pEnd && (pGen->pIn[2].nType & PH7_TK_EQUAL)) {
/* Compile the expression */
rc = PH7_CompileExpr(&(*pGen), EXPR_FLAG_COMMA_STATEMENT, 0);
if(rc == SXERR_EMPTY) {
if(rc == SXERR_ABORT) {
return SXERR_ABORT;
} else if(rc == SXERR_EMPTY) {
PH7_GenCompileError(&(*pGen), E_ERROR, pGen->pIn->nLine, "Variable '%z' is missing default value", &pName);
} else {
PH7_VmEmitInstr(pGen->pVm, nLine, PH7_OP_POP, 1, 0, 0, 0);