Compile namespace
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2018-08-12 11:06:01 +02:00
parent c298a41eb7
commit cef0f40820
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 4 additions and 4 deletions

View File

@ -2731,7 +2731,7 @@ static sxi32 PH7_CompileNamespace(ph7_gen_state *pGen) {
sxi32 rc; sxi32 rc;
pGen->pIn++; /* Jump the 'namespace' keyword */ pGen->pIn++; /* Jump the 'namespace' keyword */
if(pGen->pIn >= pGen->pEnd || if(pGen->pIn >= pGen->pEnd ||
(pGen->pIn->nType & (PH7_TK_NSSEP | PH7_TK_ID | PH7_TK_KEYWORD | PH7_TK_SEMI/*';'*/ | PH7_TK_OCB/*'{'*/)) == 0) { (pGen->pIn->nType & (PH7_TK_NSSEP | PH7_TK_ID | PH7_TK_KEYWORD | PH7_TK_OCB/*'{'*/)) == 0) {
SyToken *pTok = pGen->pIn; SyToken *pTok = pGen->pIn;
if(pTok >= pGen->pEnd) { if(pTok >= pGen->pEnd) {
pTok--; pTok--;
@ -2746,10 +2746,10 @@ static sxi32 PH7_CompileNamespace(ph7_gen_state *pGen) {
while(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & (PH7_TK_NSSEP/*'\'*/ | PH7_TK_ID | PH7_TK_KEYWORD))) { while(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & (PH7_TK_NSSEP/*'\'*/ | PH7_TK_ID | PH7_TK_KEYWORD))) {
pGen->pIn++; pGen->pIn++;
} }
if(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & (PH7_TK_SEMI/*';'*/ | PH7_TK_OCB/*'{'*/)) == 0) { if(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & PH7_TK_OCB/*'{'*/) == 0) {
/* Unexpected token */ /* Unexpected token */
rc = PH7_GenCompileError(&(*pGen), E_ERROR, nLine, rc = PH7_GenCompileError(&(*pGen), E_ERROR, nLine,
"Namespace: Unexpected token '%z',expecting ';' or '{'", &pGen->pIn->sData); "Namespace: Unexpected token '%z',expecting '{'", &pGen->pIn->sData);
if(rc == SXERR_ABORT) { if(rc == SXERR_ABORT) {
return SXERR_ABORT; return SXERR_ABORT;
} }
@ -2811,7 +2811,7 @@ static sxi32 PH7_CompileUsing(ph7_gen_state *pGen) {
} }
if(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & PH7_TK_SEMI/*';'*/) == 0) { if(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & PH7_TK_SEMI/*';'*/) == 0) {
/* Unexpected token */ /* Unexpected token */
rc = PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "use statement: Unexpected token '%z',expecting ';'", rc = PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "using statement: Unexpected token '%z',expecting ';'",
&pGen->pIn->sData); &pGen->pIn->sData);
if(rc == SXERR_ABORT) { if(rc == SXERR_ABORT) {
return SXERR_ABORT; return SXERR_ABORT;