lang: types: Add stringer information manually

This lets us get the more correct lowercase versions of type kinds in
error messages. (These match what the user would type.)
This commit is contained in:
James Shubin
2024-07-01 18:35:20 -04:00
parent 28253c4bd2
commit e10e92596f
22 changed files with 82 additions and 71 deletions

View File

@@ -59,13 +59,12 @@ var (
TypeVariant = NewType("variant")
)
//go:generate stringer -type=Kind -trimprefix=Kind -output=kind_stringer.go
// The Kind represents the base type of each value.
type Kind int // this used to be called Type
// Each Kind represents a type in the language type system.
const (
// NOTE: Make sure you add entries to stringer.go if you add something.
KindNil Kind = iota
KindBool
KindStr