Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ProjectObsidian.SourceGenerators/BindingGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public string Result

namespace {BindingPrefix}{_currentNameSpace};

{_nodeOverloadAttribute}
{_genericTypesAttribute}
{_oldTypeNameAttribute}
[Category(new string[] {{""ProtoFlux/Runtimes/Execution/Nodes/{_category}""}})]
Expand Down Expand Up @@ -194,6 +195,7 @@ public override N Instantiate<N>()
private string _constraints = "";
private string _genericTypesAttribute;
private string _oldTypeNameAttribute;
private string _nodeOverloadAttribute;

private bool TypedFieldDetection(string type, string name, string targetTypeName, string declarationFormat, OrderedCount counter)
{
Expand Down Expand Up @@ -344,6 +346,13 @@ public override void VisitClassDeclaration(ClassDeclarationSyntax node)
_nodeNameOverride =
$" public override string NodeName => {findName.ArgumentList.Arguments.First().ToString()};";

var findOverload = node.AttributeLists.SelectMany(i => i.Attributes)
.FirstOrDefault(i => i.Name.ToString() == "NodeOverload");


if (findOverload?.ArgumentList != null)
_nodeOverloadAttribute = $"[Grouping({findOverload.ArgumentList.Arguments.First().ToString()})]";

foreach (var u in _usingDeclarations)
{
var fullNameSpace = "";
Expand Down