예제 #1
0
        /// <summary>
        /// Insert a copy of the given argument into this expression
        /// </summary>
        /// <param name="index"></param>
        /// <param name="expr"></param>
        /// <returns>The argument that was added to this expression</returns>
        public SteExpression InsertCopy(int index, SteExpression expr)
        {
            if (ReferenceEquals(_argsList, null))
            {
                throw new InvalidOperationException("Cannot add an argument to an atomic expression");
            }

            var arg = expr.CreateCopy();

            _argsList.Insert(index, arg);

            return(arg);
        }