ast

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AndExpr

type AndExpr struct {
	Arguments []LogicalExpr
}

type Comparable

type Comparable interface{}

type ComparisonExpr

type ComparisonExpr struct {
	Left  Comparable
	Op    ComparisonOp
	Right Comparable
}

type ComparisonOp

type ComparisonOp uint8
const (
	EqualOp ComparisonOp = iota
	NotEqualOp
	LessThanOrEqualOp
	GreaterThanOrEqualOp
	LessThanOp
	GreaterThanOp
)

type FilterSelector

type FilterSelector struct {
	Condition LogicalExpr
}

type FunctionArgument

type FunctionArgument interface{}

type FunctionExpr

type FunctionExpr struct {
	FunctionName string
	Arguments    []FunctionArgument
}

type IndexSegment

type IndexSegment struct {
	Index int64
}

type IndexSelector

type IndexSelector struct {
	Index int64
}

type Literal

type Literal struct {
	Value any // string, float64, bool, nil
}

type LogicalExpr

type LogicalExpr interface{}

type LogicalExprArgument

type LogicalExprArgument struct {
	LogicalExpr
}

type NameSegment

type NameSegment struct {
	Name string
}

type NameSelector

type NameSelector struct {
	Name string
}

type NodeIdentifier

type NodeIdentifier uint8
const (
	RootNodeIdentifier NodeIdentifier = iota
	CurrentNodeIdentifier
)

type NotExpr

type NotExpr struct {
	Argument LogicalExpr
}

type OrExpr

type OrExpr struct {
	Arguments []LogicalExpr
}

type Query

type Query struct {
	RootNode NodeIdentifier
	Segments []Segment
}

func (Query) AsSingularQuery

func (q Query) AsSingularQuery() (sq SingularQuery, ok bool)

type Segment

type Segment struct {
	Type      SegmentType
	Selectors []Selector
}

type SegmentType

type SegmentType uint8
const (
	ChildSegmentType SegmentType = iota
	DescendantSegmentType
)

type Selector

type Selector interface{}

type SingularQuery

type SingularQuery struct {
	RootNode NodeIdentifier
	Segments []SingularQuerySegment
}

type SingularQuerySegment

type SingularQuerySegment interface{}

type SliceSelector

type SliceSelector struct {
	Start, End *int64
	Step       int64
}

type WildcardSelector

type WildcardSelector struct{}

Jump to

Keyboard shortcuts

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