// Copyright 2020-2026 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by github.com/bufbuild/protocompile/internal/enum kind.yaml. DO NOT EDIT.

package expr

import (
	"fmt"
	"iter"
)

// Kind is a kind of expression. There is one value of Kind for each
// expression type in this package.
type Kind int8

const (
	KindInvalid Kind = iota
	KindError
	KindToken
	KindRecord
	KindOp
	KindCall
	KindBlock
	KindIf
	KindFor
	KindSwitch
	KindControl
	KindFunc
)

// String implements [fmt.Stringer].
func (v Kind) String() string {
	if int(v) < 0 || int(v) > len(_table_Kind_String) {
		return fmt.Sprintf("Kind(%v)", int(v))
	}
	return _table_Kind_String[v]
}

// GoString implements [fmt.GoStringer].
func (v Kind) GoString() string {
	if int(v) < 0 || int(v) > len(_table_Kind_GoString) {
		return fmt.Sprintf("expr.Kind(%v)", int(v))
	}
	return _table_Kind_GoString[v]
}

var _table_Kind_String = [...]string{
	KindInvalid: "KindInvalid",
	KindError:   "KindError",
	KindToken:   "KindToken",
	KindRecord:  "KindRecord",
	KindOp:      "KindOp",
	KindCall:    "KindCall",
	KindBlock:   "KindBlock",
	KindIf:      "KindIf",
	KindFor:     "KindFor",
	KindSwitch:  "KindSwitch",
	KindControl: "KindControl",
	KindFunc:    "KindFunc",
}

var _table_Kind_GoString = [...]string{
	KindInvalid: "expr.KindInvalid",
	KindError:   "expr.KindError",
	KindToken:   "expr.KindToken",
	KindRecord:  "expr.KindRecord",
	KindOp:      "expr.KindOp",
	KindCall:    "expr.KindCall",
	KindBlock:   "expr.KindBlock",
	KindIf:      "expr.KindIf",
	KindFor:     "expr.KindFor",
	KindSwitch:  "expr.KindSwitch",
	KindControl: "expr.KindControl",
	KindFunc:    "expr.KindFunc",
}
var _ iter.Seq[int] // Mark iter as used.
