@@ -25,7 +25,7 @@ bool IsNullableReferenceType
25
25
internal static string BSATN_FIELD_SUFFIX = "RW" ;
26
26
27
27
/// <summary>
28
- /// The name of the static field containing an IReadWrite in the struct BSATN associated with this type.
28
+ /// The name of the static field containing an IReadWrite in the struct BSATN associated with this type.
29
29
/// </summary>
30
30
public string BsatnFieldName
31
31
{
@@ -65,7 +65,9 @@ IEnumerable<MemberDeclaration> members
65
65
var visStr = SyntaxFacts . GetText ( visibility ) ;
66
66
return string . Join (
67
67
"\n " ,
68
- members . Select ( m => $ "{ visStr } static readonly { m . TypeInfo } { m . BsatnFieldName } = new();")
68
+ members . Select ( m =>
69
+ $ "{ visStr } static readonly { m . TypeInfo } { m . BsatnFieldName } = new();"
70
+ )
69
71
) ;
70
72
}
71
73
@@ -74,7 +76,9 @@ public static string GenerateDefs(IEnumerable<MemberDeclaration> members) =>
74
76
",\n " ,
75
77
// we can't use nameof(m.BsatnFieldName) because the bsatn field name differs from the logical name
76
78
// assigned in the type.
77
- members . Select ( m => $ "new(\" { m . Name } \" , { m . BsatnFieldName } .GetAlgebraicType(registrar))")
79
+ members . Select ( m =>
80
+ $ "new(\" { m . Name } \" , { m . BsatnFieldName } .GetAlgebraicType(registrar))"
81
+ )
78
82
) ;
79
83
}
80
84
@@ -192,7 +196,12 @@ public Scope.Extensions ToExtensions()
192
196
193
197
if ( Kind is TypeKind . Sum )
194
198
{
195
- var enumTag = new MemberDeclaration ( "__enumTag" , "@enum" , "SpacetimeDB.BSATN.Enum<@enum>" , false ) ;
199
+ var enumTag = new MemberDeclaration (
200
+ "__enumTag" ,
201
+ "@enum" ,
202
+ "SpacetimeDB.BSATN.Enum<@enum>" ,
203
+ false
204
+ ) ;
196
205
197
206
extensions . Contents . Append (
198
207
$$ """
@@ -279,9 +288,7 @@ public override string ToString() =>
279
288
280
289
// It's important that this happen here; only the stuff later in this method
281
290
// needs to see the enum tag as one of the bsatn declarations.
282
- bsatnDecls = bsatnDecls . Prepend (
283
- enumTag
284
- ) ;
291
+ bsatnDecls = bsatnDecls . Prepend ( enumTag ) ;
285
292
}
286
293
else
287
294
{
0 commit comments