Merge pull request #490 from ISSOtm/const

Implement `ISCONST`, reporting compile-time constness
This commit is contained in:
Eldred Habert
2020-03-21 23:20:01 +01:00
committed by GitHub
8 changed files with 64 additions and 1 deletions

View File

@@ -506,6 +506,14 @@ void rpn_LOW(struct Expression *expr, const struct Expression *src)
}
}
void rpn_ISCONST(struct Expression *expr, const struct Expression *src)
{
rpn_Init(expr);
expr->nVal = rpn_isKnown(src);
expr->isKnown = true;
expr->isSymbol = false;
}
void rpn_UNNEG(struct Expression *expr, const struct Expression *src)
{
*expr = *src;