searchtypes

package
v0.0.0-...-a690eb5 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeaturesSearchQueryParser

type FeaturesSearchQueryParser struct{}

func (FeaturesSearchQueryParser) Parse

type FeaturesSearchVisitor

type FeaturesSearchVisitor struct {
	parser.BaseFeatureSearchVisitor
	// contains filtered or unexported fields
}

https://github.com/antlr/antlr4/pull/1841#issuecomment-576791512 https://github.com/antlr/antlr4/issues/2504#issuecomment-1299123230

func (*FeaturesSearchVisitor) ReportAmbiguity

func (v *FeaturesSearchVisitor) ReportAmbiguity(_ antlr.Parser,
	_ *antlr.DFA, _, _ int, _ bool, _ *antlr.BitSet,
	_ *antlr.ATNConfigSet)

ReportAmbiguity implements error listener interface.

func (*FeaturesSearchVisitor) ReportAttemptingFullContext

func (v *FeaturesSearchVisitor) ReportAttemptingFullContext(
	_ antlr.Parser, _ *antlr.DFA, _, _ int,
	_ *antlr.BitSet, _ *antlr.ATNConfigSet)

ReportAttemptingFullContext implements error listener interface.

func (*FeaturesSearchVisitor) ReportContextSensitivity

func (v *FeaturesSearchVisitor) ReportContextSensitivity(
	_ antlr.Parser, _ *antlr.DFA, _, _, _ int,
	_ *antlr.ATNConfigSet)

ReportContextSensitivity implements error listener interface.

func (*FeaturesSearchVisitor) SyntaxError

func (v *FeaturesSearchVisitor) SyntaxError(_ antlr.Recognizer,
	_ any, line, column int, msg string, _ antlr.RecognitionException)

SyntaxError is called by ANTLR generated code when a syntax error is encountered.

func (*FeaturesSearchVisitor) Visit

func (v *FeaturesSearchVisitor) Visit(tree antlr.ParseTree) any

func (*FeaturesSearchVisitor) VisitAvailableBrowserDateTerm

func (v *FeaturesSearchVisitor) VisitAvailableBrowserDateTerm(
	ctx parser.IDate_range_queryContext, browserName string) interface{}

func (*FeaturesSearchVisitor) VisitAvailable_date_term

func (v *FeaturesSearchVisitor) VisitAvailable_date_term(ctx *parser.Available_date_termContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitAvailable_on_term

func (v *FeaturesSearchVisitor) VisitAvailable_on_term(ctx *parser.Available_on_termContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitBaseline_date_term

func (v *FeaturesSearchVisitor) VisitBaseline_date_term(ctx *parser.Baseline_date_termContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitBaseline_status_term

func (v *FeaturesSearchVisitor) VisitBaseline_status_term(ctx *parser.Baseline_status_termContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitChildren

func (v *FeaturesSearchVisitor) VisitChildren(node antlr.RuleNode) interface{}

func (*FeaturesSearchVisitor) VisitCombined_search_criteria

func (v *FeaturesSearchVisitor) VisitCombined_search_criteria(ctx *parser.Combined_search_criteriaContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitDateRangeQuery

func (v *FeaturesSearchVisitor) VisitDateRangeQuery(ctx parser.IDate_range_queryContext,
	identifier SearchIdentifier) *SearchNode

VisitDateRangeQuery is not part of the generated methods. It is specialized to handle queries that have a date range context. The generated VisitDate_range_query is no longer needed.

func (*FeaturesSearchVisitor) VisitGeneric_search_term

func (v *FeaturesSearchVisitor) VisitGeneric_search_term(ctx *parser.Generic_search_termContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitGroup_term

func (v *FeaturesSearchVisitor) VisitGroup_term(ctx *parser.Group_termContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitId_term

func (v *FeaturesSearchVisitor) VisitId_term(ctx *parser.Id_termContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitName_term

func (v *FeaturesSearchVisitor) VisitName_term(ctx *parser.Name_termContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitOperator

func (v *FeaturesSearchVisitor) VisitOperator(ctx *parser.OperatorContext) interface{}

func (*FeaturesSearchVisitor) VisitQuery

func (v *FeaturesSearchVisitor) VisitQuery(ctx *parser.QueryContext) interface{}

func (*FeaturesSearchVisitor) VisitSearch_criteria

func (v *FeaturesSearchVisitor) VisitSearch_criteria(ctx *parser.Search_criteriaContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitSnapshot_term

func (v *FeaturesSearchVisitor) VisitSnapshot_term(ctx *parser.Snapshot_termContext) interface{}

nolint: revive // Method signature is generated.

func (*FeaturesSearchVisitor) VisitTerm

func (v *FeaturesSearchVisitor) VisitTerm(ctx *parser.TermContext) interface{}

type SearchIdentifier

type SearchIdentifier string
const (
	IdentifierAvailableBrowserDate SearchIdentifier = "available_browser_date"
	IdentifierAvailableDate        SearchIdentifier = "available_date"
	IdentifierAvailableOn          SearchIdentifier = "available_on"
	IdentifierBaselineDate         SearchIdentifier = "baseline_date"
	IdentifierBaselineStatus       SearchIdentifier = "baseline_status"
	IdentifierName                 SearchIdentifier = "name"
	IdentifierGroup                SearchIdentifier = "group"
	IdentifierSnapshot             SearchIdentifier = "snapshot"
	IdentifierID                   SearchIdentifier = "id"
)

type SearchKeyword

type SearchKeyword string
const (
	KeywordAND  SearchKeyword = "AND"
	KeywordOR   SearchKeyword = "OR"
	KeywordRoot SearchKeyword = "ROOT"
	// Placeholder for nil.
	KeywordNone SearchKeyword = "NONE"
)

func (*SearchKeyword) Invert

func (k *SearchKeyword) Invert()

type SearchNode

type SearchNode struct {
	Keyword  SearchKeyword
	Term     *SearchTerm
	Children []*SearchNode
}

func (SearchNode) IsKeyword

func (n SearchNode) IsKeyword() bool

type SearchOperator

type SearchOperator string
const (
	OperatorGtEq SearchOperator = "GT_EQ"
	OperatorGt   SearchOperator = "GT"
	OperatorLtEq SearchOperator = "LT_EQ"
	OperatorLt   SearchOperator = "LT"
	OperatorEq   SearchOperator = "EQ"
	OperatorNeq  SearchOperator = "NEQ"
	OperatorNone SearchOperator = "NONE"
)

func (*SearchOperator) Invert

func (o *SearchOperator) Invert()

type SearchTerm

type SearchTerm struct {
	Identifier SearchIdentifier
	Operator   SearchOperator
	Value      string
}

Jump to

Keyboard shortcuts

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