code: func (s *Scanner) Scan() (r rune) {
  	s.tokenIdx = 0
  	r, _, err := s.r.ReadRune()
  	prevRune := r
  
  	if s.Whitespace.Get(int(r)) {
  		s.token[s.tokenIdx] = r
  		s.tokenIdx++
  		return r
  	}
  
  	for ; !s.Whitespace.Get(int(r)); r, _, err = s.r.ReadRune() {
  		switch err {
  		case nil:
  			break
  		case io.EOF:
  			return EOF
  		default:
  			s.Error(err)
  			return EOF
  		}
  		s.token[s.tokenIdx] = r
  		s.tokenIdx++
  		prevRune = r
  	}
  
  	// We have to UnreadRune because we went too far of one rune
  	err = s.r.UnreadRune()
  	if err != nil {
  		s.Error(err)
  	}
  
  	return prevRune
  }
docs: // Scan scans until we reach a whitespace token