func (p *parser) parseSelectClause(q *query.Query) error {
	var showAll = true
	if p.expect(tokenizer.Select) == nil {
		if p.current == nil || p.current.Type == tokenizer.Identifier {
			showAll = false
		} else if p.current.Type == tokenizer.From || p.current.Type == tokenizer.Where {
			showAll = true
		} else {
			return p.currentError()
		}
	} else if current := p.expect(tokenizer.Identifier); current != nil {
		p.current = current
		showAll = false
	}
	if showAll {
		q.Attributes = allAttributes
	} else if err := p.parseAttrs(&q.Attributes, &q.Modifiers); err != nil {
		return err
	}
	return nil
}
parseSelectClause parses the SELECT clause of the query.
package parser
import (
	"os/user"
	"path/filepath"
	"strings"
	"github.com/kashav/fsql/query"
	"github.com/kashav/fsql/tokenizer"
)
func Run(input string) (*query.Query, error) {
	return (&parser{}).parse(input)
}
type parser struct {
	tokenizer *tokenizer.Tokenizer
	current   *tokenizer.Token
	expected  tokenizer.TokenType
}
func (p *parser) parse(input string) (*query.Query, error) {
	q := query.NewQuery()
	p.tokenizer = tokenizer.NewTokenizer(input)
	if err := p.parseSelectClause(q); err != nil {
		return nil, err
	}
	if err := p.parseFromClause(q); err != nil {
		return nil, err
	}
	if err := p.parseWhereClause(q); err != nil {
		return nil, err
	}
	return q, nil
}