parser

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

package parser allows extract elements from a query string and create Input object required for GNames faceted search.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pretty

func Pretty(pretty bool) func(*engine) error

func Size

func Size(size int) func(*engine) error

Types

type Parser

type Parser interface {
	// ParseQuery takes a query string, parses it, registers warnings if
	// query is not well-formed, and packs received data into a search.Input
	// object.
	ParseQuery(q string) search.Input

	// Debug takes a query string, parses it, and prints aot an abstract
	// syntax tree of the parsed result. This method is used for developing
	// and debuging the parser behavior.
	Debug(string)
}

Parser contains methods for parsing a faceted search query for GNames.

func New

func New() Parser

New creates a new Parser object for converting a query string into search.Input object.

Jump to

Keyboard shortcuts

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