Documentation
¶
Overview ¶
Package parser converts query strings into key-values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// Tokens is the tokens returned from
// the scanner.Scanner for the string
// being parsed.
Tokens []Token
// Index is the index of the token
// where the parsing failed.
Index int
// Err is the error encountered
// at the failing token.
Err error
}
Error represents a problem encountered during parsing. Included with the error is the entire list of tokens returned by the scanner.Scanner and the index of the token which caused the parsing error.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser obtains tokens from the given scanner.Scanner and attempts to parse them into a keyval.Query.
func (*Parser) Parse ¶
Parse consumes all the tokens from the given scanner.Scanner and either returns a keyval.Query or the first error encountered during parsing.
Click to show internal directories.
Click to hide internal directories.