/ src / Ryujinx.HLE.Generators / ServiceSyntaxReceiver.cs
ServiceSyntaxReceiver.cs
 1  using Microsoft.CodeAnalysis;
 2  using Microsoft.CodeAnalysis.CSharp.Syntax;
 3  using System.Collections.Generic;
 4  
 5  namespace Ryujinx.HLE.Generators
 6  {
 7      internal class ServiceSyntaxReceiver : ISyntaxReceiver
 8      {
 9          public HashSet<ClassDeclarationSyntax> Types = new HashSet<ClassDeclarationSyntax>();
10  
11          public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
12          {
13              if (syntaxNode is ClassDeclarationSyntax classDeclaration)
14              {
15                  if (classDeclaration.BaseList == null)
16                  {
17                      return;
18                  }
19  
20                  Types.Add(classDeclaration);
21              }
22          }
23      }
24  }