Godep vendoring for external packages
This commit is contained in:
28
vendor/github.com/mattn/anko/ast/pos.go
generated
vendored
Normal file
28
vendor/github.com/mattn/anko/ast/pos.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package ast
|
||||
|
||||
// Position provides interface to store code locations.
|
||||
type Position struct {
|
||||
Line int
|
||||
Column int
|
||||
}
|
||||
|
||||
// Pos interface provies two functions to get/set the position for expression or statement.
|
||||
type Pos interface {
|
||||
Position() Position
|
||||
SetPosition(Position)
|
||||
}
|
||||
|
||||
// PosImpl provies commonly implementations for Pos.
|
||||
type PosImpl struct {
|
||||
pos Position
|
||||
}
|
||||
|
||||
// Position return the position of the expression or statement.
|
||||
func (x *PosImpl) Position() Position {
|
||||
return x.pos
|
||||
}
|
||||
|
||||
// SetPosition is a function to specify position of the expression or statement.
|
||||
func (x *PosImpl) SetPosition(pos Position) {
|
||||
x.pos = pos
|
||||
}
|
||||
Reference in New Issue
Block a user