aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs')
-rw-r--r--src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs b/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs
new file mode 100644
index 000000000..e4269cb9a
--- /dev/null
+++ b/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs
@@ -0,0 +1,24 @@
1using Microsoft.CodeAnalysis;
2using Microsoft.CodeAnalysis.CSharp.Syntax;
3using System.Collections.Generic;
4
5namespace 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}