mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
* dog what am i doing * finish gen source part from class symbol * we are dangerously close to things happening * generation fixes * oh? on god? * stop autogenerating the attribute for no reason + diagnostics * testing diagnostics * proper type name handling + clonedata bool * thank you material storage for making me realize this * forgot to commit * p * fixes for afterautohandlestate * make it work with access
20 lines
658 B
C#
20 lines
658 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Microsoft.CodeAnalysis;
|
|
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
|
|
namespace Robust.Shared.CompNetworkGenerator
|
|
{
|
|
public sealed class NameReferenceSyntaxReceiver : ISyntaxReceiver
|
|
{
|
|
public List<ClassDeclarationSyntax> CandidateClasses { get; } = new List<ClassDeclarationSyntax>();
|
|
|
|
public void OnVisitSyntaxNode(SyntaxNode syntaxNode)
|
|
{
|
|
if (syntaxNode is ClassDeclarationSyntax classDeclarationSyntax &&
|
|
classDeclarationSyntax.AttributeLists.Count > 0)
|
|
CandidateClasses.Add(classDeclarationSyntax);
|
|
}
|
|
}
|
|
}
|