add hle service generator

This commit is contained in:
Emmanuel Hansen 2023-06-25 12:17:21 +00:00
parent 4df22eb867
commit c3a3adbaeb
6 changed files with 214 additions and 5 deletions

View file

@ -0,0 +1,30 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
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;
}
var name = classDeclaration.Identifier.ToString();
Types.Add(classDeclaration);
}
}
}
}