/// <summary>
        /// Reads a primary increment expression.
        /// </summary>
        /// <param name="leftHandSide">
        /// The expression on the left hand side of the operator.
        /// </param>
        /// <param name="previousPrecedence">
        /// The precedence of the expression just before this one.
        /// </param>
        /// <returns>
        /// Returns the expression.
        /// </returns>
        private IncrementExpression GetPrimaryIncrementExpression(Expression leftHandSide, ExpressionPrecedence previousPrecedence)
        {
            Param.AssertNotNull(leftHandSide, "leftHandSide");
            Param.Ignore(previousPrecedence);

            IncrementExpression expression = null;

            // Check the previous precedence to see if we are allowed to gather up the as expression.
            if (CheckPrecedence(previousPrecedence, ExpressionPrecedence.Primary))
            {
                Reference<ICodePart> expressionReference = new Reference<ICodePart>();

                // Make sure the left hand side has at least one token.
                Debug.Assert(leftHandSide.Tokens.First != null, "The left hand side should not be empty.");

                // Get the increment symbol.
                this.tokens.Add(this.GetOperatorToken(OperatorType.Increment, expressionReference));

                // Create the partial token list for the expression.
                CsTokenList partialTokens = new CsTokenList(this.tokens, leftHandSide.Tokens.First, this.tokens.Last);

                // Create and return the expression.
                expression = new IncrementExpression(partialTokens, leftHandSide, IncrementExpression.IncrementType.Postfix);
                expressionReference.Target = expression;
            }

            return expression;
        }
        /// <summary>
        /// Reads a unary increment expression.
        /// </summary>
        /// <param name="unsafeCode">
        /// Indicates whether the code being parsed resides in an unsafe code block.
        /// </param>
        /// <returns>
        /// Returns the expression.
        /// </returns>
        private IncrementExpression GetUnaryIncrementExpression(bool unsafeCode)
        {
            Param.Ignore(unsafeCode);

            Reference<ICodePart> expressionReference = new Reference<ICodePart>();

            // Get the increment symbol.
            Node<CsToken> tokenNode = this.tokens.InsertLast(this.GetOperatorToken(OperatorType.Increment, expressionReference));

            // Get the expression being incremented.
            Expression valueExpression = this.GetNextExpression(ExpressionPrecedence.Unary, expressionReference, unsafeCode);
            if (valueExpression == null || valueExpression.Tokens.First == null)
            {
                throw this.CreateSyntaxException();
            }

            // Create the partial token list for the expression.
            CsTokenList partialTokens = new CsTokenList(this.tokens, tokenNode, this.tokens.Last);

            // Create and return the expression.
            IncrementExpression expression = new IncrementExpression(partialTokens, valueExpression, IncrementExpression.IncrementType.Prefix);
            expressionReference.Target = expression;

            return expression;
        }
 /// <summary>
 /// The save.
 /// </summary>
 /// <param name="incrementExpression">
 /// The increment expression.
 /// </param>
 private void Save(IncrementExpression incrementExpression)
 {
     if (incrementExpression.Type == IncrementExpression.IncrementType.Prefix)
     {
         this.cppWriter.Write("++");
         @switch(incrementExpression.Value);
     }
     else
     {
         @switch(incrementExpression.Value);
         this.cppWriter.Write("++");
     }
 }