pos.go 239 B

123456789101112
  1. package parser
  2. // Pos represents a position in the file set.
  3. type Pos int
  4. // NoPos represents an invalid position.
  5. const NoPos Pos = 0
  6. // IsValid returns true if the position is valid.
  7. func (p Pos) IsValid() bool {
  8. return p != NoPos
  9. }