code: func Collect(input string) []Token {
  	var result []Token
  
  	l := Scan(input)
  	for {
  		token := l.NextToken()
  		result = append(result, token)
  
  		if token.Kind == TokenEOF || token.Kind == TokenError {
  			break
  		}
  	}
  
  	return result
  }
docs: // Collect scans and collect all tokens.
  //
  // This should be used for debugging purpose only. You should use Scan() and lexer.NextToken() functions instead.