Exemplo n.º 1
0
        //
        // For named arguments when the order of execution is different
        // to order of invocation
        //
        public Arguments MarkOrderedArgument(NamedArgument a)
        {
            //
            // An expression has no effect on left-to-right execution
            //
            if (a.Expr.IsSideEffectFree)
            {
                return(this);
            }

            ArgumentsOrdered ra = this as ArgumentsOrdered;

            if (ra == null)
            {
                ra = new ArgumentsOrdered(this);

                for (int i = 0; i < args.Count; ++i)
                {
                    var la = args [i];
                    if (la == a)
                    {
                        break;
                    }

                    //
                    // When the argument is filled later by default expression
                    //
                    if (la == null)
                    {
                        continue;
                    }

                    var ma = la as MovableArgument;
                    if (ma == null)
                    {
                        ma         = new MovableArgument(la);
                        ra.args[i] = ma;
                    }

                    ra.AddOrdered(ma);
                }
            }

            ra.AddOrdered(a);
            return(ra);
        }
Exemplo n.º 2
0
        //
        // For named arguments when the order of execution is different
        // to order of invocation
        //
        public Arguments MarkOrderedArgument(NamedArgument a)
        {
            //
            // Constant expression have no effect on left-to-right execution
            //
            if (a.Expr is Constant)
            {
                return(this);
            }

            ArgumentsOrdered ra = this as ArgumentsOrdered;

            if (ra == null)
            {
                ra = new ArgumentsOrdered(this);
            }

            ra.AddOrdered(a);
            return(ra);
        }
Exemplo n.º 3
0
        //
        // For named arguments when the order of execution is different
        // to order of invocation
        //
        public Arguments MarkOrderedArgument(NamedArgument a)
        {
            //
            // Constant expression have no effect on left-to-right execution
            //
            if (a.Expr is Constant)
            {
                return(this);
            }

            ArgumentsOrdered ra = this as ArgumentsOrdered;

            if (ra == null)
            {
                ra = new ArgumentsOrdered(this);

                for (int i = 0; i < args.Count; ++i)
                {
                    var la = args [i];
                    if (la == a)
                    {
                        break;
                    }

                    var ma = la as MovableArgument;
                    if (ma == null)
                    {
                        ma         = new MovableArgument(la);
                        ra.args[i] = ma;
                    }

                    ra.AddOrdered(ma);
                }
            }

            ra.AddOrdered(a);
            return(ra);
        }
Exemplo n.º 4
0
		//
		// For named arguments when the order of execution is different
		// to order of invocation
		//
		public Arguments MarkOrderedArgument (NamedArgument a)
		{
			//
			// An expression has no effect on left-to-right execution
			//
			if (a.Expr.IsSideEffectFree)
				return this;

			ArgumentsOrdered ra = this as ArgumentsOrdered;
			if (ra == null) {
				ra = new ArgumentsOrdered (this);

				for (int i = 0; i < args.Count; ++i) {
					var la = args [i];
					if (la == a)
						break;

					//
					// When the argument is filled later by default expression
					//
					if (la == null)
						continue;

					var ma = la as MovableArgument;
					if (ma == null) {
						ma = new MovableArgument (la);
						ra.args[i] = ma;
					}

					ra.AddOrdered (ma);
				}
			}

			ra.AddOrdered (a);
			return ra;
		}
Exemplo n.º 5
0
		//
		// For named arguments when the order of execution is different
		// to order of invocation
		//
		public Arguments MarkOrderedArgument (NamedArgument a)
		{
			//
			// Constant expression have no effect on left-to-right execution
			//
			if (a.Expr is Constant)
				return this;

			ArgumentsOrdered ra = this as ArgumentsOrdered;
			if (ra == null)
				ra = new ArgumentsOrdered (this);

			ra.AddOrdered (a);
			return ra;
		}
Exemplo n.º 6
0
		//
		// For named arguments when the order of execution is different
		// to order of invocation
		//
		public Arguments MarkOrderedArgument (NamedArgument a)
		{
			//
			// Constant expression have no effect on left-to-right execution
			//
			if (a.Expr is Constant)
				return this;

			ArgumentsOrdered ra = this as ArgumentsOrdered;
			if (ra == null) {
				ra = new ArgumentsOrdered (this);

				for (int i = 0; i < args.Count; ++i) {
					var la = args [i];
					if (la == a)
						break;

					var ma = la as MovableArgument;
					if (ma == null) {
						ma = new MovableArgument (la);
						ra.args[i] = ma;
					}

					ra.AddOrdered (ma);
				}
			}

			ra.AddOrdered (a);
			return ra;
		}