예제 #1
0
 protected override void ConvertOperands()
 {
     LeftType = LeftOperand.GetSemanticType();
     if (RightOperand is OperandToken operand)
     {
         Name = operand.Name;
     }
 }
예제 #2
0
        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;
            }
        }