A class that pretty prints an Expression.
상속: ExpressionVisitor
예제 #1
0
        // public methods
        /// <summary>
        /// Pretty prints an Expression.
        /// </summary>
        /// <param name="node">The Expression to pretty print.</param>
        /// <returns>A string containing the pretty printed Expression.</returns>
        public static string PrettyPrint(Expression node)
        {
            var prettyPrinter = new ExpressionPrettyPrinter();

            prettyPrinter.Visit(node);
            return(prettyPrinter.ToString());
        }
 // constructors
 public Indentation(ExpressionPrettyPrinter prettyPrinter)
 {
     _prettyPrinter = prettyPrinter;
     prettyPrinter._indentation += "| ";
 }
 // public methods
 /// <summary>
 /// Pretty prints an Expression.
 /// </summary>
 /// <param name="node">The Expression to pretty print.</param>
 /// <returns>A string containing the pretty printed Expression.</returns>
 public static string PrettyPrint(Expression node)
 {
     var prettyPrinter = new ExpressionPrettyPrinter();
     prettyPrinter.Visit(node);
     return prettyPrinter.ToString();
 }
예제 #4
0
 // constructors
 public Indentation(ExpressionPrettyPrinter prettyPrinter)
 {
     _prettyPrinter              = prettyPrinter;
     prettyPrinter._indentation += "| ";
 }
예제 #5
0
 // constructors
 public Indentation(ExpressionPrettyPrinter prettyPrinter)
 {
     this.prettyPrinter         = prettyPrinter;
     prettyPrinter.indentation += "| ";
 }