parser

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package parser implements a parser for a query string.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error represents a parse error.

func (*Error) Error

func (e *Error) Error() string

Error returns error string.

type Errors

type Errors []*Error

Errors represents parse errors.

func (*Errors) Append

func (errs *Errors) Append(pos int, msg string)

Append appends a parse error to errs.

func (Errors) Err

func (errs Errors) Err() error

Err returns an error equivalent to this errors. If the list is empty, Err returns nil.

func (Errors) Error

func (errs Errors) Error() string

Error returns error string.

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser represents a parser.

func NewParser

func NewParser(r io.Reader) *Parser

NewParser returns a new parser.

func (*Parser) Parse

func (p *Parser) Parse() (ast.Node, error)

Parse parses the query string and returns the corresponding ast.Node.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL