public override VisualBasicSyntaxNode VisitTypeParameter(CSS.TypeParameterSyntax node)
            {
                SyntaxToken variance = default(SyntaxToken);

                if (!node.VarianceKeyword.IsKind(CS.SyntaxKind.None))
                {
                    variance = SyntaxFactory.Token(node.VarianceKeyword.IsKind(CS.SyntaxKind.InKeyword) ? SyntaxKind.InKeyword : SyntaxKind.OutKeyword);
                }
                // copy generic constraints
                var clause = FindClauseForParameter(node);

                return(SyntaxFactory.TypeParameter(variance, ConvertIdentifier(node.Identifier), (TypeParameterConstraintClauseSyntax)clause?.Accept(this)));
            }
            private CSS.TypeParameterConstraintClauseSyntax FindClauseForParameter(CSS.TypeParameterSyntax node)
            {
                SyntaxList <CSS.TypeParameterConstraintClauseSyntax> clauses;
                var parentBlock = node.Parent.Parent;

                if (parentBlock is CSS.MethodDeclarationSyntax)
                {
                    clauses = ((CSS.MethodDeclarationSyntax)parentBlock).ConstraintClauses;
                }
                else if (parentBlock is CSS.ClassDeclarationSyntax)
                {
                    clauses = ((CSS.ClassDeclarationSyntax)parentBlock).ConstraintClauses;
                }
                else
                {
                    throw new NotImplementedException($"{parentBlock.GetType().FullName} not implemented!");
                }
                return(clauses.FirstOrDefault(c => c.Name.ToString() == node.ToString()));
            }
 public override void VisitTypeParameter(Microsoft.CodeAnalysis.CSharp.Syntax.TypeParameterSyntax node)
 {
     base.VisitTypeParameter(node);
     Colorize(node.Identifier, typeParameterTypeColor);
 }