From f07fc0178831432b68f1b9bd6c96b257aa2e9abe Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 4 Dec 2025 13:28:22 +0100 Subject: chore: move symbol types and functions in its own package. --- symbol/kind_string.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 symbol/kind_string.go (limited to 'symbol/kind_string.go') diff --git a/symbol/kind_string.go b/symbol/kind_string.go new file mode 100644 index 0000000..07dbd6a --- /dev/null +++ b/symbol/kind_string.go @@ -0,0 +1,30 @@ +// Code generated by "stringer -type=Kind"; DO NOT EDIT. + +package symbol + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[Value-0] + _ = x[Type-1] + _ = x[Label-2] + _ = x[Const-3] + _ = x[Var-4] + _ = x[Func-5] + _ = x[Pkg-6] +} + +const _Kind_name = "ValueTypeLabelConstVarFuncPkg" + +var _Kind_index = [...]uint8{0, 5, 9, 14, 19, 22, 26, 29} + +func (i Kind) String() string { + idx := int(i) - 0 + if i < 0 || idx >= len(_Kind_index)-1 { + return "Kind(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _Kind_name[_Kind_index[idx]:_Kind_index[idx+1]] +} -- cgit v1.2.3