Parse the OP_IS instruction.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-06-07 10:11:30 +02:00
parent dbd39be5ed
commit fa5c2e1f5e
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 9 additions and 0 deletions

View File

@ -1056,6 +1056,15 @@ static sxi32 ExprMakeTree(ph7_gen_state *pGen, ph7_expr_node **apNode, sxi32 nTo
iTmp = iRight; iTmp = iRight;
iRight = iLeft; iRight = iLeft;
iLeft = iTmp; iLeft = iTmp;
} else if(pNode->pOp->iOp == EXPR_OP_IS) {
sxu32 nKwrd = 0;
if(apNode[iRight]->pStart->nType == PH7_TK_KEYWORD) {
nKwrd = SX_PTR_TO_INT(apNode[iRight]->pStart->pUserData);
if(nKwrd && (nKwrd & PH7_KEYWORD_TYPEDEF) == 0) {
PH7_GenCompileError(pGen, E_ERROR, pNode->pStart->nLine,
"'%z': Unexpected keyword '%z'", &pNode->pOp->sOp, &apNode[iRight]->pStart->sData);
}
}
} }
/* Link the node to the tree */ /* Link the node to the tree */
pNode->pLeft = apNode[iLeft]; pNode->pLeft = apNode[iLeft];