Exemplo n.º 1
0
        public override Type CheckTypes()
        {
            var leftType  = Left.CheckTypes();
            var rightType = Right.CheckTypes();

            Type = new ValueType
            {
                Value = "bool"
            };

            if (leftType.IsComparable())
            {
                leftType.IsEqual(rightType);
            }
            else
            {
                $"Values: \"{leftType.Value}\", \"{rightType.Value}\", cannot be compared".RaiseError(Operator.Line);
            }

            return(new ValueType
            {
                Value = "bool",
                Line = Operator.Line
            });
        }
Exemplo n.º 2
0
        public override Type CheckTypes()
        {
            var leftType  = Left.CheckTypes();
            var rightType = Right.CheckTypes();

            Type = new ValueType
            {
                Value = "bool",
                Line  = Operator.Line
            };

            leftType.IsEquatable(rightType);

            return(Type);
        }