xgo/parser/pos.go

13 lines
239 B
Go
Raw Normal View History

package parser
2019-01-09 10:17:42 +03:00
// Pos represents a position in the file set.
2019-01-09 10:17:42 +03:00
type Pos int
// NoPos represents an invalid position.
2019-01-09 10:17:42 +03:00
const NoPos Pos = 0
// IsValid returns true if the position is valid.
2019-01-09 10:17:42 +03:00
func (p Pos) IsValid() bool {
return p != NoPos
}