示例#1
0
        public static string PlotDotGraph(this ASTList list)
        {
            StringBuilder sb = new StringBuilder();

            foreach (var child in list)
            {
                sb.Append($"{list.GetHashCode()} -> {child.PlotDotGraph()}");
            }
            sb.Append(list.GetDotProperty());
            return(sb.ToString());
        }
示例#2
0
 public static string GetDotProperty(this ASTList tree)
 {
     return($"{tree.GetHashCode()} [label=\"{tree.GetType().Name}\", color=\"#92D7F4\", style=filled, shape=box]\n");
 }