diff options
| author | Emmanuel Hansen <emmausssss@gmail.com> | 2024-08-31 14:39:26 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-31 11:39:26 -0300 |
| commit | 2c5c0392f9ff80a3907bbf376a13f797ebbc12cc (patch) | |
| tree | 66eac1cb8ec09aae5196520cad19ab8ee6aba241 /src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs | |
| parent | e0acde04bb032fd056904b909b3fd00c1a6fb996 (diff) | |
Make HLE project AOT friendly (#7085)
* add hle service generator
remove usage of reflection in device state
* remove rd.xml generation
* make applet manager reflection free
* fix typos
* fix encoding
* fix style report
* remove rogue generator reference
* remove double assignment
Diffstat (limited to 'src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs')
| -rw-r--r-- | src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs | 24 |
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 00000000..e4269cb9 --- /dev/null +++ b/src/Ryujinx.HLE.Generators/ServiceSyntaxReceiver.cs @@ -0,0 +1,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); + } + } + } +} |
