Пример #1
0
        public void Visit(JNode node)
        {
            if (node == null)
            {
                return;
            }
            if (Visiting != null)
            {
                Visiting(node);
            }
            if (node.StartLocation.IsEmpty)
            {
                node.StartLocation = new TextLocation(CurrentLine, CurrentColumn);
            }
            var st = node as JStatement;

            if (st != null && st.Comments.IsNotNullOrEmpty() && !(st is JBlock))
            {
                WriteComments(st.Comments);
            }

            node.AcceptVisitor(this);
            if (node.EndLocation.IsEmpty)
            {
                node.EndLocation = new TextLocation(CurrentLine, InnerWriter.CurrentColumn);
            }
        }