18 lines
467 B
C#
18 lines
467 B
C#
using System.Collections.Generic;
|
|
using Microsoft.CodeAnalysis;
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
|
|
namespace Polonium.Generators;
|
|
|
|
public class ClassSyntaxReceiver : ISyntaxReceiver
|
|
{
|
|
public List<ClassDeclarationSyntax> Classes { get; set; } = new ();
|
|
|
|
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
|
|
{
|
|
if (syntaxNode is ClassDeclarationSyntax classDeclaration)
|
|
{
|
|
Classes.Add(classDeclaration);
|
|
}
|
|
}
|
|
} |