aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs
blob: e4269cb9a4b9a7a5e4b088f0eb5a11ca423b5be3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System.Collections.Generic;

namespace Ryujinx.HLE.Generators
{
    internal class ServiceSyntaxReceiver : ISyntaxReceiver
    {
        public HashSet<ClassDeclarationSyntax> Types = new HashSet<ClassDeclarationSyntax>();

        public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
        {
            if (syntaxNode is ClassDeclarationSyntax classDeclaration)
            {
                if (classDeclaration.BaseList == null)
                {
                    return;
                }

                Types.Add(classDeclaration);
            }
        }
    }
}