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