static DigraphSyntax BuildAstGraph() { var types = typeof(SyntaxNode) .Assembly .GetTypes() .Where(type => type.IsClass && typeof(SyntaxNode).IsAssignableFrom(type)) .OrderBy(type => Depth(type)) .ThenBy(type => type.BaseType?.Name) .ThenBy(type => type.Name); return(new DigraphSyntax( new StatementSyntax[] { ("rankdir", "LR"), ("bgcolor", "transparent"), new AttributeStatementSyntax( AttributeKeyword.Node, ("fontname", "sans-serif"), ("color", "#102538"), ("fontcolor", "#337ab7"), ("shape", "record")), new AttributeStatementSyntax( AttributeKeyword.Edge, ("color", "#3B5266")), }.Concat(types
public virtual bool VisitAttributeStatementSyntax( AttributeStatementSyntax attributeStatement, VisitKind visitKind) => VisitStatementSyntax(attributeStatement, visitKind);