func (locals *KnownLocalsSet) Add(local string) {
	name := locals.idFactory.CreateIdentifier(local, NotExported)
	locals.names[name] = struct{}{}
}
Add allows identifiers that have already been used to be registered, avoiding duplicates
package astmodel
import (
	"fmt"
	"strings"
)
type KnownLocalsSet struct {
	names     map[string]struct{}
	idFactory IdentifierFactory
}
func NewKnownLocalsSet(idFactory IdentifierFactory) *KnownLocalsSet {
	return &KnownLocalsSet{
		names:     make(map[string]struct{}),
		idFactory: idFactory,
	}
}
func (locals *KnownLocalsSet) CreateLocal(nameHint string, suffixes ...string) string {
	if len(suffixes) == 0 {
		suffixes = []string{""}
	}
	for _, s := range suffixes {
		if strings.HasSuffix(strings.ToLower(nameHint), strings.ToLower(s)) {
			s = ""
		}
		if id, ok := locals.tryCreateLocal(nameHint + " " + s); ok {
			return id
		}
	}
	index := 1
	for {
		for _, s := range suffixes {
			if strings.HasSuffix(strings.ToLower(nameHint), strings.ToLower(s)) {
				s = ""
			}
			if id, ok := locals.tryCreateLocal(fmt.Sprintf("%s %s%d", nameHint, s, index)); ok {
				return id
			}
		}
		index++
	}
}
func (locals *KnownLocalsSet) tryCreateLocal(name string) (string, bool) {
	id := locals.idFactory.CreateIdentifier(name, NotExported)
	if _, found := locals.names[id]; found {
		return "", false
	}
	locals.names[id] = struct{}{}
	return id, true
}