예제 #1
0
        public override Object Visit(CompoundExpression node, Object obj)
        {
            Object aux = null;

            for (int i = 0; i < node.ExpressionCount; i++)
            {
                node.GetExpressionElement(i).LeftExpression = node.LeftExpression;
                if ((aux = node.GetExpressionElement(i).Accept(this, false)) is SingleIdentifierExpression)
                {
                    node.SetExpressionElement(i, (SingleIdentifierExpression)aux);
                }
            }
            return(null);
        }
        public TypeExpression[] compoundExpressionToArray(CompoundExpression args)
        {
            TypeExpression[] aux = new TypeExpression[args.ExpressionCount];
            TypeExpression   te;

            for (int i = 0; i < args.ExpressionCount; i++)
            {
                if ((te = args.GetExpressionElement(i).ILTypeExpression) != null)
                {
                    if (te is FieldType)
                    {
                        te = ((FieldType)te).FieldTypeExpression;
                    }
                    else if (te is UnionType)
                    {
                        te = ((UnionType)te).Simplify(false);
                    }
                    aux[i] = te;
                }
                else
                {
                    return(null);
                }
            }
            return(aux);
        }
예제 #3
0
        public override Object Visit(CompoundExpression node, Object obj)
        {
            for (int i = 0; i < node.ExpressionCount; i++)
            {
                node.GetExpressionElement(i).Accept(this, obj);
            }

            return(null);
        }
예제 #4
0
        public override Object Visit(CompoundExpression node, Object obj)
        {
            CompoundExpression clonedCompoundExpression = new CompoundExpression(node.Location);

            for (int i = 0; i < node.ExpressionCount; i++)
            {
                clonedCompoundExpression.AddExpression((Expression)node.GetExpressionElement(i).Accept(this, obj));
            }
            return(clonedCompoundExpression);
        }
예제 #5
0
        /// <summary>
        /// Gets the type expression of the arguments.
        /// </summary>
        /// <param name="args">Arguments information.</param>
        /// <returns>Returns the argument type expressions </returns>
        private TypeExpression[] compoundExpressionToArray(CompoundExpression args)
        {
            TypeExpression[] aux = new TypeExpression[args.ExpressionCount];
            TypeExpression   te;

            for (int i = 0; i < args.ExpressionCount; i++)
            {
                if ((te = args.GetExpressionElement(i).ExpressionType) != null)
                {
                    aux[i] = te;
                }
                else
                {
                    return(null);
                }
            }
            return(aux);
        }