コード例 #1
0
ファイル: Summand.cs プロジェクト: kamel2700/CompilerProject
        public List <object> Reduce()
        {
            var reduced = new List <object>();

            reduced.AddRange(Factor.Reduce());
            if (FactorRec != null)
            {
                reduced.AddRange(FactorRec.Reduce());
            }

            return(reduced);
        }
コード例 #2
0
        public List <object> Reduce()
        {
            var reduced = new List <object>();

            reduced.AddRange(Factor.Reduce());
            reduced.Add(Operation);

            if (Rec == null)
            {
                return(reduced);
            }
            reduced.AddRange(Rec.Reduce());

            return(reduced);
        }