language

package
v0.0.0-...-d29d0de Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AST

type AST struct {
	Profiles Collection `parser:"( \"in\" @@)?"`
	Query    Query      `parser:"@@"`
}

func ParseString

func ParseString(input string) (*AST, error)

type AttrModifier

type AttrModifier struct {
	Value Collection `parser:"\":\" @@"`
}

type Boolean

type Boolean bool

func (*Boolean) Capture

func (b *Boolean) Capture(values []string) error

type Collection

type Collection struct {
	All      bool     `parser:"  @\"*\""`
	Elements []string `parser:"| @Ident ( \",\" @Ident )*"`
}

type Item

type Item struct {
	Type      []string   `parser:"@Ident ( \".\" @Ident )?"`
	Modifiers []Modifier `parser:"@@*"`
}
type Link struct {
	FullOutput  bool `parser:"( @\"=\""`
	ShortOutput bool `parser:"| @\"-\" )"`
}

type LinkedItem

type LinkedItem struct {
	Link Link `parser:"@@"`
	Item Item `parser:"@@"`
}

type Modifier

type Modifier interface {
	// contains filtered or unexported methods
}

type Parser

type Parser interface {
	ParseString(string) (*AST, error)
}

type Query

type Query struct {
	Root     Item         `parser:"@@*"`
	Sequence []LinkedItem `parser:"@@*"`
}

type SearchExpression

type SearchExpression struct {
	Attr  string          `parser:"@Ident"`
	Op    common.Operator `parser:"@Ident"`
	Value string          `parser:"@String"`
}

type SearchModifier

type SearchModifier struct {
	Value SearchExpression `parser:"\"?\" @@"`
}

Jump to

Keyboard shortcuts

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