diff options
Diffstat (limited to 'vendor/github.com/graphql-go/graphql/language/ast/location.go')
-rw-r--r-- | vendor/github.com/graphql-go/graphql/language/ast/location.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/github.com/graphql-go/graphql/language/ast/location.go b/vendor/github.com/graphql-go/graphql/language/ast/location.go new file mode 100644 index 00000000..266dc847 --- /dev/null +++ b/vendor/github.com/graphql-go/graphql/language/ast/location.go @@ -0,0 +1,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, + } +} |