Unexport pql.Parser

This commit is contained in:
Cody Soyland 2018-07-05 22:01:50 -05:00
parent aa7f6fca75
commit 75ea43c9da

View file

@ -25,16 +25,16 @@ import (
// TimeFormat is the go-style time format used to parse string dates.
const TimeFormat = "2006-01-02T15:04"
// Parser represents a parser for the PQL language.
type Parser struct {
// parser represents a parser for the PQL language.
type parser struct {
r io.Reader
//scanner *bufScanner
PQL
}
// NewParser returns a new instance of Parser.
func NewParser(r io.Reader) *Parser {
return &Parser{
func NewParser(r io.Reader) *parser {
return &parser{
r: r,
// scanner: newBufScanner(r),
}
@ -46,7 +46,7 @@ func ParseString(s string) (*Query, error) {
}
// Parse parses the next node in the query.
func (p *Parser) Parse() (*Query, error) {
func (p *parser) Parse() (*Query, error) {
buf, err := ioutil.ReadAll(p.r)
if err != nil {
return nil, errors.Wrap(err, "reading buffer to parse")