コード例 #1
0
        public Expression ConvertToAssignment(ILocation location, Expression value)
        {
            IndexorExpression result = new IndexorExpression(this, parent);

            foreach (Expression parameter in parameters)
            {
                result.AddParameter(parameter);
            }
            result.AddParameter(value);
            return(result);
        }
コード例 #2
0
        public override Expression InstantiateTemplate(Dictionary <string, TypeName> parameters)
        {
            IndexorExpression result;

            if (setter)
            {
                result = new IndexorExpression(this, parent.InstantiateTemplate(parameters));
            }
            else
            {
                result = new IndexorExpression(this);
                result.SetParent(parent.InstantiateTemplate(parameters));
            }
            foreach (Expression param in this.parameters)
            {
                result.AddParameter(param.InstantiateTemplate(parameters));
            }
            return(result);
        }