Exemplo n.º 1
0
 public override string ToString()
 {
     using (var wrt = new StringWriter())
     {
         NodePrinter.Print(this, wrt);
         return(wrt.ToString());
     }
 }
Exemplo n.º 2
0
        // Public entry point for prettyprinting TEXL parse trees
        public static void Print(Node node, TextWriter writer, bool showTypes = false, bool showValues = false)
        {
            Contracts.AssertValue(node);

            var         wrt     = new IndentedTextWriter(writer, "  ");
            NodePrinter printer = new NodePrinter(wrt, showTypes, showValues);

            node.Accept(printer);
        }