code: func (p *Parser) parseGrantStatement() (Statement, error) {
  	// Parse the privilege to be granted.
  	priv, err := p.parsePrivilege()
  	if err != nil {
  		return nil, err
  	}
  
  	// Check for ON or TO clauses.
  	tok, pos, lit := p.ScanIgnoreWhitespace()
  	if tok == ON {
  		stmt, err := p.parseGrantOnStatement()
  		if err != nil {
  			return nil, err
  		}
  		stmt.Privilege = priv
  		return stmt, nil
  	} else if tok == TO {
  		// Admin privilege is only granted on ALL PRIVILEGES.
  		if priv != AllPrivileges {
  			return nil, newParseError(tokstr(tok, lit), []string{"ON"}, pos)
  		}
  		return p.parseGrantAdminStatement()
  	}
  
  	// Only ON or TO clauses are allowed after privilege.
  	if priv == AllPrivileges {
  		return nil, newParseError(tokstr(tok, lit), []string{"ON", "TO"}, pos)
  	}
  	return nil, newParseError(tokstr(tok, lit), []string{"ON"}, pos)
  }
docs: // parseGrantStatement parses a string and returns a grant statement.
  // This function assumes the GRANT token has already been consumed.