protected void CheckRealEquation() { if (LeftType.Equals(SimpleType.Real) && RightType.Equals(SimpleType.Real)) { GenerateFind(new RealEqualWarning(Token.Operator, Words, this is EqualToken)); } }
protected virtual void ConvertOperands() { LeftType = LeftOperand.GetSemanticType(); RightType = RightOperand.GetSemanticType(); if (LeftType.Equals(SimpleType.Integer) && RightType.Equals(SimpleType.Real)) { LeftType = SimpleType.Real; } if (LeftType.Equals(SimpleType.Real) && RightType.Equals(SimpleType.Integer)) { RightType = SimpleType.Real; } }
protected override bool OperationIsCorrect() => LeftType.Equals(RightType) && (LeftType.Equals(SimpleType.Integer) || LeftType.Equals(SimpleType.Real));
protected override bool OperationIsCorrect() => LeftType.Equals(RightType) && LeftType.Equals(SimpleType.Real);
protected override bool OperationIsCorrect() => LeftType.Equals(RightType) || LeftType.Equals(SimpleType.NullPointer) && RightType is PointerType || RightType.Equals(SimpleType.NullPointer) && LeftType is PointerType;
protected override bool OperationIsCorrect() => LeftType.Equals(SimpleType.Boolean) && RightType.Equals(SimpleType.Boolean);