Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExprNode ¶
type ExprNode struct { // The cue.Value corresponding to this node in the expression tree. V cue.Value // contains filtered or unexported fields }
ExprNode is the node element from which an ExprTree is constructed.
Each ExprNode which corresponds to exactly one cue.Value, stored in ExprNode.Self. ExprNodes contain connections to each other through one of three types of links:
- Expr link: the child is one element of a larger CUE expression represented by the parent (returns from cue.Value.Expr on parent).
- Default link: the child is a default value of the parent (returns from cue.Value.Default)
- Dereference link: the parent is a reference to the child (returns from cue.Dereference)
func ExprTree ¶
ExprTree constructs a tree-ish of nodes representing the expression structure contained within the provided cue.Value.
ExprTree is represented as a set of interlinked pointers to ExprNode, each of which corresponds to exactly one cue.Value, ExprNode.Self. ExprNodes are connected through one of three types of links:
- Expr links, where calling cue.Value.Expr on the
- Dereference links, where the parentl
Structural CUE elements - like the fields of structs - are NOT represented in this tree.
An ExprNode structure is NOT currently safe for use from multiple goroutines.
Returns nil if the provided value contains structural cycles.