aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/graphql-go/graphql/language/ast/location.go
blob: 266dc8477ae870be3fbe1de13b48fc36d4a44849 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package ast

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

type Location struct {
	Start  int
	End    int
	Source *source.Source
}

func NewLocation(loc *Location) *Location {
	if loc == nil {
		loc = &Location{}
	}
	return &Location{
		Start:  loc.Start,
		End:    loc.End,
		Source: loc.Source,
	}
}