Prefix variable name by dollar '$' sign.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-06-07 16:16:56 +02:00
parent 543191c1b2
commit 46458d1e1b
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 2 additions and 2 deletions

View File

@ -2461,7 +2461,7 @@ static sxi32 PH7_CompileVar(ph7_gen_state *pGen) {
/* Compile the expression */ /* Compile the expression */
rc = PH7_CompileExpr(&(*pGen), EXPR_FLAG_COMMA_STATEMENT, 0); rc = PH7_CompileExpr(&(*pGen), EXPR_FLAG_COMMA_STATEMENT, 0);
if(rc == SXERR_EMPTY) { if(rc == SXERR_EMPTY) {
PH7_GenCompileError(&(*pGen), E_ERROR, pGen->pIn->nLine, "Static variable '%z' is missing default value", &pName); PH7_GenCompileError(&(*pGen), E_ERROR, pGen->pIn->nLine, "Static variable '$%z' is missing default value", &pName);
} }
/* Emit the done instruction */ /* Emit the done instruction */
PH7_VmEmitInstr(pGen->pVm, pGen->pIn->nLine, PH7_OP_DONE, (rc != SXERR_EMPTY ? 1 : 0), 1, 0, 0); PH7_VmEmitInstr(pGen->pVm, pGen->pIn->nLine, PH7_OP_DONE, (rc != SXERR_EMPTY ? 1 : 0), 1, 0, 0);
@ -2489,7 +2489,7 @@ static sxi32 PH7_CompileVar(ph7_gen_state *pGen) {
if(rc == SXERR_ABORT) { if(rc == SXERR_ABORT) {
return SXERR_ABORT; return SXERR_ABORT;
} else if(rc == SXERR_EMPTY) { } else if(rc == SXERR_EMPTY) {
PH7_GenCompileError(&(*pGen), E_ERROR, pGen->pIn->nLine, "Variable '%z' is missing default value", &pName); PH7_GenCompileError(&(*pGen), E_ERROR, pGen->pIn->nLine, "Variable '$%z' is missing default value", &pName);
} else { } else {
PH7_VmEmitInstr(pGen->pVm, nLine, PH7_OP_POP, 1, 0, 0, 0); PH7_VmEmitInstr(pGen->pVm, nLine, PH7_OP_POP, 1, 0, 0, 0);
} }