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()); }
public static string GetDotProperty(this ASTList tree) { return($"{tree.GetHashCode()} [label=\"{tree.GetType().Name}\", color=\"#92D7F4\", style=filled, shape=box]\n"); }