ir

package
v0.0.0-...-92f3e1a Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInvalidNodeStructureError

func NewInvalidNodeStructureError(name string, n *parser.Node) error

Types

type AbsSingularQuery

type AbsSingularQuery struct {
	Segments []SingularQuerySegment
}

func ParseAbsSingularQuery

func ParseAbsSingularQuery(n *parser.Node) (*AbsSingularQuery, error)

func (AbsSingularQuery) String

func (s AbsSingularQuery) String() string

func (AbsSingularQuery) Value

func (s AbsSingularQuery) Value(ref any) (any, error)

type BasicExpr

type BasicExpr interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

func ParseBasicExpr

func ParseBasicExpr(n *parser.Node) (BasicExpr, error)

type Boolean

type Boolean bool

Boolean = true / false true = %x74.72.75.65 false = %x66.61.6c.73.65

func (Boolean) String

func (s Boolean) String() string

func (Boolean) Value

func (s Boolean) Value(_ any) (any, error)

type BracketedSelection

type BracketedSelection struct {
	Selectors []Selector
}

func ParseBracketedSelection

func ParseBracketedSelection(n *parser.Node) (*BracketedSelection, error)

func (BracketedSelection) String

func (s BracketedSelection) String() string

type ChildSegment

type ChildSegment interface {
	Segment
	// contains filtered or unexported methods
}

func ParseChildSegment

func ParseChildSegment(n *parser.Node) (ChildSegment, error)

type Comparable

type Comparable interface {
	fmt.Stringer

	Value(ref any) (any, error)
	// contains filtered or unexported methods
}

func ParseComparable

func ParseComparable(n *parser.Node) (Comparable, error)

type ComparisonExpr

type ComparisonExpr struct {
	Left, Right Comparable
	Op          string
}

func ParseComparisonExpr

func ParseComparisonExpr(n *parser.Node) (*ComparisonExpr, error)

func (ComparisonExpr) String

func (s ComparisonExpr) String() string

type DescendantSegment

type DescendantSegment struct {
	Segment Segment
}

func ParseDescendantSegment

func ParseDescendantSegment(n *parser.Node) (*DescendantSegment, error)

func (DescendantSegment) String

func (s DescendantSegment) String() string

type FilterSelector

type FilterSelector struct {
	LogicalExpr *LogicalExpr
}

func ParseFilterSelector

func ParseFilterSelector(n *parser.Node) (*FilterSelector, error)

func (FilterSelector) String

func (s FilterSelector) String() string

type FunctionArgument

type FunctionArgument interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

func ParseFunctionArgument

func ParseFunctionArgument(n *parser.Node) (FunctionArgument, error)

type FunctionExpr

type FunctionExpr struct {
	Name      string
	Arguments []FunctionArgument
}

func ParseFunctionExpr

func ParseFunctionExpr(n *parser.Node) (*FunctionExpr, error)

func (FunctionExpr) String

func (s FunctionExpr) String() string

func (FunctionExpr) Value

func (s FunctionExpr) Value(ref any) (any, error)

type IndexSegment

type IndexSegment struct {
	Selector *IndexSelector
}

func ParseIndexSegment

func ParseIndexSegment(n *parser.Node) (*IndexSegment, error)

func (IndexSegment) String

func (s IndexSegment) String() string

func (IndexSegment) Value

func (s IndexSegment) Value(ref any) (any, error)

type IndexSelector

type IndexSelector struct {
	Index int
}

func ParseIndexSelector

func ParseIndexSelector(n *parser.Node) (*IndexSelector, error)

func (IndexSelector) String

func (s IndexSelector) String() string

type InvalidNodeStructure

type InvalidNodeStructure struct {
	Name string
	Node *parser.Node
}

func (InvalidNodeStructure) Error

func (e InvalidNodeStructure) Error() string

type JSONPathQuery

type JSONPathQuery struct {
	Segments []Segment
}

func ParseJSONPathQuery

func ParseJSONPathQuery(n *parser.Node) (*JSONPathQuery, error)

func (JSONPathQuery) String

func (q JSONPathQuery) String() string

type Literal

type Literal interface {

	// Comparable = literal / ...
	Comparable

	// FunctionArgument = literal / ...
	FunctionArgument
	// contains filtered or unexported methods
}

func ParseLiteral

func ParseLiteral(n *parser.Node) (Literal, error)

ParseLiteral parses a literal node, which is the result of parsing grammar.Literal.

type LogicalAndExpr

type LogicalAndExpr struct {
	Expressions []BasicExpr
}

func ParseLogicalAndExpr

func ParseLogicalAndExpr(n *parser.Node) (*LogicalAndExpr, error)

func (LogicalAndExpr) String

func (s LogicalAndExpr) String() string

type LogicalExpr

type LogicalExpr struct {
	Expressions []*LogicalAndExpr
}

func ParseLogicalExpr

func ParseLogicalExpr(n *parser.Node) (*LogicalExpr, error)

func (LogicalExpr) String

func (s LogicalExpr) String() string

type MemberNameShorthand

type MemberNameShorthand struct {
	Name string
}

func (MemberNameShorthand) String

func (s MemberNameShorthand) String() string

type NameSegment

type NameSegment struct {
	Name string
}

func ParseNameSegment

func ParseNameSegment(n *parser.Node) (*NameSegment, error)

func (NameSegment) String

func (s NameSegment) String() string

func (NameSegment) Value

func (s NameSegment) Value(ref any) (any, error)

type NameSelector

type NameSelector struct {
	Name string
}

func ParseNameSelector

func ParseNameSelector(n *parser.Node) (*NameSelector, error)

func (NameSelector) String

func (s NameSelector) String() string

type Null

type Null struct{}

Null = %x6e.75.6c.6c

func (Null) String

func (s Null) String() string

func (Null) Value

func (s Null) Value(_ any) (any, error)

type Number

type Number json.Number

Number = (int / "-0") [ frac ] [ exp ] ; decimal number int = "0" / (["-"] DIGIT1 *DIGIT) ; - optional DIGIT = %x30-39 ; 0-9 DIGIT1 = %x31-39 ; 1-9 non-zero digit frac = "." 1*DIGIT ; decimal fraction exp = "e" [ "-" / "+" ] 1*DIGIT ; decimal exponent

func (Number) String

func (s Number) String() string

func (Number) Value

func (s Number) Value(_ any) (any, error)

type ParenExpr

type ParenExpr struct {
	Negation    bool
	LogicalExpr *LogicalExpr
}

func ParseParenExpr

func ParseParenExpr(n *parser.Node) (*ParenExpr, error)

func (ParenExpr) String

func (s ParenExpr) String() string

type RelQuery

type RelQuery struct {
	Segments []Segment
}

func ParseRelQuery

func ParseRelQuery(n *parser.Node) (*RelQuery, error)

func (RelQuery) String

func (q RelQuery) String() string

type RelSingularQuery

type RelSingularQuery struct {
	Segments []SingularQuerySegment
}

func ParseRelSingularQuery

func ParseRelSingularQuery(n *parser.Node) (*RelSingularQuery, error)

func (RelSingularQuery) String

func (s RelSingularQuery) String() string

func (RelSingularQuery) Value

func (s RelSingularQuery) Value(ref any) (any, error)

type Segment

type Segment interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

func ParseSegment

func ParseSegment(n *parser.Node) (Segment, error)

func ParseSegments

func ParseSegments(n *parser.Node) ([]Segment, error)

type Selector

type Selector interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

func ParseSelector

func ParseSelector(n *parser.Node) (Selector, error)

type SingularQuerySegment

type SingularQuerySegment interface {
	fmt.Stringer

	Value(ref any) (any, error)
	// contains filtered or unexported methods
}

func ParseSingularQuerySegments

func ParseSingularQuerySegments(n *parser.Node) ([]SingularQuerySegment, error)

type SliceSelector

type SliceSelector struct {
	Start, End, Step int
}

func ParseSliceSelector

func ParseSliceSelector(n *parser.Node) (*SliceSelector, error)

func (SliceSelector) String

func (s SliceSelector) String() string

type String

type String string

String = %x22 *double-quoted %x22 / %x27 *single-quoted %x27 ; 'string' double-quoted = unescaped / %x27 / ESC %x22 / ESC escapable single-quoted = unescaped / %x22 / ESC %x27 / ESC escapable ESC = %x5C unescaped = %x20-21 / %x23-26 / %x28-5B / %x5D-D7FF / %xE000-10FFFF escapable = %x62 / %x66 / %x6E / %x72 / %x74 / "/" / "\" / (%x75 hexchar) hexchar = non-surrogate / (high-surrogate "\" %x75 low-surrogate) non-surrogate = ((DIGIT / "A"/"B"/"C" / "E"/"F") 3HEXDIG) / ("D" %x30-37 2HEXDIG ) high-surrogate = "D" ("8"/"9"/"A"/"B") 2HEXDIG low-surrogate = "D" ("C"/"D"/"E"/"F") 2HEXDIG HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"

func ParseStringLiteral

func ParseStringLiteral(n *parser.Node) (*String, error)

func (String) String

func (s String) String() string

func (String) Value

func (s String) Value(_ any) (any, error)

type TestExpr

type TestExpr struct {
	Negation bool
	TestExpr TestExpression
}

func ParseTestExpr

func ParseTestExpr(n *parser.Node) (*TestExpr, error)

func (TestExpr) String

func (s TestExpr) String() string

type TestExpression

type TestExpression interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

type WildcardSelector

type WildcardSelector struct{}

func (WildcardSelector) String

func (s WildcardSelector) String() string

Jump to

Keyboard shortcuts

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