public override AbstractFormulaNode Simplify()
        {
            var child = Child.Simplify();

            Child = child;
            if (!(Child is AbstractErrorNode))
            {
                return(new AbstractTypeNode(ParentFormula, new Types(VarType.Bool)));
            }

            return(this);
        }
        public override AbstractFormulaNode Simplify()
        {
            var child = Child.Simplify();

            Child = child;
            if (Child is AbstractTypeNode)
            {
                Types tp = ((AbstractTypeNode)Child).Type;
                if (tp.AllNumeric())
                {
                    return(new AbstractTypeNode(ParentFormula, tp));
                }
            }

            return(this);
        }
        public override AbstractFormulaNode Simplify()
        {
            var child = Child.Simplify();

            Child = child;
            if (Child is AbstractTypeNode)
            {
                Types tp = ((AbstractTypeNode)Child).Type;
                if (tp.OnlyHasType(VarType.Bool))
                {
                    return(new AbstractTypeNode(ParentFormula, tp));
                }
            }

            return(this);
        }
        public override AbstractFormulaNode Simplify()
        {
            var child = Child.Simplify();

            Child = child;
            if (Child is AbstractTypeNode)
            {
                AbstractTypeNode typeNode = (AbstractTypeNode)Child;
                if (typeNode.Type.OnlyHasType(VarType.TypeError) || typeNode.Type.AllNumeric())
                {
                    return(typeNode);
                }
                return(new AbstractTypeNode(ParentFormula, new Types(VarType.Int)));
            }

            return(this);
        }