aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/graphql-go/graphql/language/ast/name.go
blob: 00fddbcdd648972f42367b074cfe9eab96a5f6d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package ast

import (
	"github.com/graphql-go/graphql/language/kinds"
)

// Name implements Node
type Name struct {
	Kind  string
	Loc   *Location
	Value string
}

func NewName(node *Name) *Name {
	if node == nil {
		node = &Name{}
	}
	return &Name{
		Kind:  kinds.Name,
		Value: node.Value,
		Loc:   node.Loc,
	}
}

func (node *Name) GetKind() string {
	return node.Kind
}

func (node *Name) GetLoc() *Location {
	return node.Loc
}