Documentation
¶
Index ¶
- type Annotation
- type AnnotationKey
- type Kind
- type Node
- func (n *Node) Annotate(a Annotation)
- func (n *Node) CountNodes() int
- func (n *Node) GetAnnotation(lens, name string) (any, bool)
- func (n *Node) GetAnnotations(lens string) []Annotation
- func (n *Node) MarshalJSON() ([]byte, error)
- func (n *Node) Path() string
- func (n *Node) ToAny() any
- func (n *Node) Walk(fn func(*Node) bool)
- func (n *Node) WalkPost(fn func(*Node))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct {
Key AnnotationKey
Value any
}
type AnnotationKey ¶
type Node ¶
type Node struct {
Kind Kind
Key string
Index int
Raw string
Children []*Node
Parent *Node
// contains filtered or unexported fields
}
func (*Node) Annotate ¶
func (n *Node) Annotate(a Annotation)
func (*Node) CountNodes ¶
func (*Node) GetAnnotations ¶
func (n *Node) GetAnnotations(lens string) []Annotation
func (*Node) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.