- added handling for shift and bit operators.

- added the '>>>' (unsigned shift) operator. Although, with unsigned numbers available, this is technically not really needed, DECORATE supports this so ZScript should, too, if only for the benefit of making conversion tools easier to handle.
This commit is contained in:
Christoph Oelckers 2016-10-17 15:52:29 +02:00
commit 23a2a19a78
5 changed files with 19 additions and 4 deletions

View file

@ -2430,9 +2430,9 @@ FxExpression *FxBinaryInt::Resolve(FCompileContext& ctx)
CHECKRESOLVED();
if (!ResolveLR(ctx, false)) return NULL;
if (ValueType->GetRegType() == REGT_FLOAT /* lax */)
if (ValueType->GetRegType() == REGT_FLOAT && ctx.FromDecorate)
{
// For DECORATE which allows floats here.
// For DECORATE which allows floats here. ZScript does not.
if (left->ValueType->GetRegType() != REGT_INT)
{
left = new FxIntCast(left, ctx.FromDecorate);