private static List<Operator> GetOperatorsFromSplittedCode(string[] splittedCode) { List<Operator> operators = new List<Operator>(); int lastOperatorInd = splittedCode.Length - 2; for (int operatorInd = 0; operatorInd <= lastOperatorInd; operatorInd += 2) { Operator newOperator = new Operator(splittedCode[operatorInd]); operators.Add(newOperator); } return operators; }
private static void InsertNewOperatorInSplittedCode(int place, string codePart, ref List<Operator> splittedCode) { CodePartsDeleter.TrimWhiteSpaceChars(ref codePart); Operator newOperator = new Operator(codePart); splittedCode.Insert(place, newOperator); }