Browse Source

Set NULL data type instead of throwing an error.

release/v0.1
Rafal Kupiec 1 year ago
parent
commit
a00d30afa2
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      engine/compiler.c

+ 3
- 4
engine/compiler.c View File

@ -2406,13 +2406,12 @@ static sxi32 PH7_CompileVar(ph7_gen_state *pGen) {
} else if(nKey & PH7_KEYWORD_VOID) {
nType = MEMOBJ_VOID;
} else {
PH7_GenCompileError(&(*pGen), E_ERROR, pGen->pIn->nLine,
"Unknown data type name '%z'",
&pGen->pIn->sData);
/* No data type at all */
nType = MEMOBJ_NULL;
}
/* Jump the data type keyword */
pGen->pIn++;
if((pGen->pIn->nType & PH7_TK_OSB) && &pGen->pIn[1] < pGen->pEnd && (pGen->pIn[1].nType & PH7_TK_CSB)) {
if(nType != MEMOBJ_NULL && (pGen->pIn->nType & PH7_TK_OSB) && &pGen->pIn[1] < pGen->pEnd && (pGen->pIn[1].nType & PH7_TK_CSB)) {
nType |= MEMOBJ_HASHMAP;
pGen->pIn += 2;
}

Loading…
Cancel
Save