Terms that are [Tag] have Kind = Has

wip/source-generators
copygirl 12 months ago
parent 58989e949f
commit 931a86fcea
  1. 6
      src/gaemstone.SourceGen/Structure/ParameterInfo.cs

@ -87,6 +87,12 @@ public class ParameterInfo : BaseInfo
{
TermTypes = ImmutableList.Create(Symbol.Type);
FieldType = Symbol.Type;
// If the type of the parameter has the [Tag] attribute,
// the only way to sensibly use it is to check for its (non-)existance.
// (This would also apply to [Relation, Tag] but should be no issue.)
if (Symbol.Type.HasAttribute("gaemstone.ECS.TagAttribute")) isHas = true;
// TODO: Make sure [Tag] is used appropriately.
}
Source = Get("Source")?.AttributeClass!.TypeArguments[0]

Loading…
Cancel
Save