Example #1
0
		/// <summary>Sets the wrapped expression, and sets its parent to this node.</summary>
		/// <remarks>Sets the wrapped expression, and sets its parent to this node.</remarks>
		/// <exception cref="System.ArgumentException">
		/// } if expression is
		/// <code>null</code>
		/// </exception>
		public virtual void SetExpression(AstNode expression)
		{
			AssertNotNull(expression);
			expr = expression;
			expression.SetParent(this);
			SetLineno(expression.GetLineno());
		}
Example #2
0
		/// <summary>
		/// Sets the left-hand side of the expression, and sets its
		/// parent to this node.
		/// </summary>
		/// <remarks>
		/// Sets the left-hand side of the expression, and sets its
		/// parent to this node.
		/// </remarks>
		/// <param name="left">the left-hand side of the expression</param>
		/// <exception cref="System.ArgumentException">
		/// } if left is
		/// <code>null</code>
		/// </exception>
		public virtual void SetLeft(AstNode left)
		{
			AssertNotNull(left);
			this.left = left;
			// line number should agree with source position
			SetLineno(left.GetLineno());
			left.SetParent(this);
		}