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