mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-06 23:36:26 +02:00
add hle service generator
This commit is contained in:
parent
4df22eb867
commit
c3a3adbaeb
6 changed files with 214 additions and 5 deletions
30
src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs
Normal file
30
src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue