generate: Fix spacing and comment issues

This commit is contained in:
Sasha Koshka 2025-10-16 21:59:53 -04:00
parent e6266e500c
commit 207627c428

View File

@ -20,7 +20,6 @@ const preamble = `
// The source file is located at <path>
// Please edit that file instead, and re-compile it to this location.
// HOPP, TAPE, METADAPT, PDL/0 (c) 2025 holanet.xyz
`
const static = `
@ -58,6 +57,7 @@ func boolInt(input bool) int {
}
}
// ensure ucontainer is always imported
var _ hopp.Option[int]
`
@ -1140,8 +1140,10 @@ func (this *Generator) generateTypeTableDefined(typ TypeTableDefined) (n int, er
for _, key := range slices.Sorted(maps.Keys(typ.Fields)) {
field := typ.Fields[key]
if field.Doc != "" {
nn, err := this.iprintf("%s\n", this.formatComment(field.Doc))
n += nn; if err != nil { return n, err }
}
nn, err = this.iprintf("%s ", field.Name)
n += nn; if err != nil { return n, err }
if field.Option {