summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/d5/tengo/compiler/source/pos.go
blob: 72128b1301b4bce0be39173d25c4909ba0b3a96f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
package source

// Pos represents a position in the file set.
type Pos int

// NoPos represents an invalid position.
const NoPos Pos = 0

// IsValid returns true if the position is valid.
func (p Pos) IsValid() bool {
	return p != NoPos
}