Exemple #1
0
        /// <summary>
        /// The entrypoint for this rewriter.
        /// </summary>
        /// <param name="node">The root of the bound subtree to be rewritten.</param>
        /// <param name="containingSymbol">The symbol whose declaration encloses the node.</param>
        /// <param name="compilation">For looking up TypeSymbols from SpecialTypes.</param>
        /// <returns>The rewritten bound subtree, which contains no increment or decrement operators.</returns>
        public static BoundStatement Rewrite(BoundStatement node, MethodSymbol containingSymbol, Compilation compilation)
        {
            Debug.Assert(node != null);
            var rewriter = new IncrementRewriter(containingSymbol, compilation);

            return((BoundStatement)rewriter.Visit(node));
        }
 /// <summary>
 /// The entrypoint for this rewriter.
 /// </summary>
 /// <param name="node">The root of the bound subtree to be rewritten.</param>
 /// <param name="containingSymbol">The symbol whose declaration encloses the node.</param>
 /// <param name="compilation">For looking up TypeSymbols from SpecialTypes.</param>
 /// <returns>The rewritten bound subtree, which contains no increment or decrement operators.</returns>
 public static BoundStatement Rewrite(BoundStatement node, MethodSymbol containingSymbol, Compilation compilation)
 {
     Debug.Assert(node != null);
     var rewriter = new IncrementRewriter(containingSymbol, compilation);
     return (BoundStatement)rewriter.Visit(node);
 }