This commit is contained in:
agra
2026-02-14 14:03:16 +02:00
parent 025b790411
commit fe7efeadb0
10 changed files with 320 additions and 10 deletions

View File

@@ -786,6 +786,7 @@ pub const Server = struct {
.percent,
.percent_equal,
.ampersand,
.pipe,
.arrow,
.fat_arrow,
.colon_colon,
@@ -1632,7 +1633,11 @@ pub const Server = struct {
},
.enum_decl => |ed| {
try buf.appendSlice(allocator, ed.name);
try buf.appendSlice(allocator, " :: enum { ");
if (ed.is_flags) {
try buf.appendSlice(allocator, " :: enum flags { ");
} else {
try buf.appendSlice(allocator, " :: enum { ");
}
for (ed.variant_names, 0..) |v, i| {
if (i > 0) try buf.appendSlice(allocator, ", ");
try buf.append(allocator, '.');