Ejemplo n.º 1
0
        public string CollectTree(ParserNode node)
        {
            _w = new IndentedWriter();

            this.Push(_finishIndent);
            node.Visit(this);

            var result = _w.GetContentAsString();

            _w = null;

            return(result);
        }
Ejemplo n.º 2
0
        string CollectImpl(IParserStep node)
        {
            var stack = new Stack <IParserStep>();

            for (var step = node; step != null; step = step.Prev)
            {
                stack.Push(step);
            }

            _w = new IndentedWriter("  ");
            _w.Push().Push();

            while (stack.Count > 0)
            {
                stack.Pop().Visit(this);
            }

            var result = _w.GetContentAsString();

            _w = null;

            return(result);
        }
Ejemplo n.º 3
0
 public string GetDebugInfo()
 {
     return(_log == null ? null : _log.GetContentAsString());
 }
Ejemplo n.º 4
0
 public string GetLogSnapshot()
 {
     return(_log == null ? null : _log.GetContentAsString());
 }