diff --git a/Arch.System.SourceGenerator/Query.cs b/Arch.System.SourceGenerator/Query.cs index 6db41ad..8aea46a 100644 --- a/Arch.System.SourceGenerator/Query.cs +++ b/Arch.System.SourceGenerator/Query.cs @@ -20,7 +20,7 @@ public static StringBuilder GetFirstElements(this StringBuilder sb, IEnumerable< foreach (var symbol in parameterSymbols) if(symbol.Type.Name is not "Entity" || !symbol.GetAttributes().Any(data => data.AttributeClass.Name.Contains("Data"))) // Prevent entity being added to the type array - sb.AppendLine($"ref var {symbol.Type.Name.ToLower()}FirstElement = ref chunk.GetFirst<{symbol.Type.ToDisplayString(NullableFlowState.None, SymbolDisplayFormat.FullyQualifiedFormat)}>();"); + sb.AppendLine($"ref var @{symbol.Type.Name.ToLower()}FirstElement = ref chunk.GetFirst<{symbol.Type.ToDisplayString(NullableFlowState.None, SymbolDisplayFormat.FullyQualifiedFormat)}>();"); return sb; } @@ -35,7 +35,7 @@ public static StringBuilder GetComponents(this StringBuilder sb, IEnumerable parameterSymbols) { foreach (var symbol in parameterSymbols) - sb.Append($"{CommonUtils.RefKindToString(symbol.RefKind)} {symbol.Name.ToLower()},"); + sb.Append($"{CommonUtils.RefKindToString(symbol.RefKind)} @{symbol.Name.ToLower()},"); if(sb.Length > 0) sb.Length--; return sb; @@ -96,7 +96,7 @@ public static StringBuilder DataParameters(this StringBuilder sb, IEnumerable attributeData.AttributeClass.Name.Contains("Data"))) - sb.Append($"{CommonUtils.RefKindToString(parameter.RefKind)} {parameter.Type} {parameter.Name.ToLower()},"); + sb.Append($"{CommonUtils.RefKindToString(parameter.RefKind)} {parameter.Type} @{parameter.Name.ToLower()},"); } sb.Length--; return sb;