name.go

 1package ast
 2
 3import (
 4	"github.com/graphql-go/graphql/language/kinds"
 5)
 6
 7// Name implements Node
 8type Name struct {
 9	Kind  string
10	Loc   *Location
11	Value string
12}
13
14func NewName(node *Name) *Name {
15	if node == nil {
16		node = &Name{}
17	}
18	return &Name{
19		Kind:  kinds.Name,
20		Value: node.Value,
21		Loc:   node.Loc,
22	}
23}
24
25func (node *Name) GetKind() string {
26	return node.Kind
27}
28
29func (node *Name) GetLoc() *Location {
30	return node.Loc
31}