Пример #1
0
        public static bool IsEqualTo(this Destructors first, Destructors second)
        {
            if (first.Type != second.Type)
            {
                return(false);
            }

            switch (first.Type)
            {
            case TypeStructs.Quantified:
                var apply1 = (Destructors.Arrow)first;
                var apply2 = (Destructors.Arrow)second;

                return(apply1.Content.Operand.IsEqualTo(apply2.Content.Operand));

            case TypeStructs.Module:
                var access1 = (Destructors.Module)first;
                var access2 = (Destructors.Module)second;

                return(access1.Content.Member.Equals(access2.Content.Member));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Пример #2
0
 public Destructor(Classification <TypedTerm> @operator, Destructors content)
     : base(TypedProductions.Destructor)
 {
     Operator = @operator;
     Content  = content;
 }