code: func (p *Parser) parseField() (*Field, error) {
  	f := &Field{}
  
  	// Attempt to parse a regex.
  	re, err := p.parseRegex()
  	if err != nil {
  		return nil, err
  	} else if re != nil {
  		f.Expr = re
  	} else {
  		_, pos, _ := p.ScanIgnoreWhitespace()
  		p.Unscan()
  		// Parse the expression first.
  		expr, err := p.ParseExpr()
  		if err != nil {
  			return nil, err
  		}
  		var c validateField
  		Walk(&c, expr)
  		if c.foundInvalid {
  			return nil, fmt.Errorf("invalid operator %s in SELECT clause at line %d, char %d; operator is intended for WHERE clause", c.badToken, pos.Line+1, pos.Char+1)
  		}
  		f.Expr = expr
  	}
  
  	// Parse the alias if the current and next tokens are "WS AS".
  	alias, err := p.parseAlias()
  	if err != nil {
  		return nil, err
  	}
  	f.Alias = alias
  
  	// Consume all trailing whitespace.
  	p.consumeWhitespace()
  
  	return f, nil
  }
docs: // parseField parses a single field.