Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ast/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,13 @@ type BuiltinNode struct {
Map Node // Used by optimizer to fold filter() and map() builtins.
}

// ClosureNode represents a predicate.
// PredicateNode represents a predicate.
// Example:
//
// filter(foo, .bar == 1)
//
// The predicate is ".bar == 1".
type ClosureNode struct {
type PredicateNode struct {
base
Node Node // Node of the predicate body.
}
Expand Down
2 changes: 1 addition & 1 deletion ast/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (n *BuiltinNode) String() string {
return fmt.Sprintf("%s(%s)", n.Name, strings.Join(arguments, ", "))
}

func (n *ClosureNode) String() string {
func (n *PredicateNode) String() string {
return n.Node.String()
}

Expand Down
2 changes: 1 addition & 1 deletion ast/visitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func Walk(node *Node, v Visitor) {
for i := range n.Arguments {
Walk(&n.Arguments[i], v)
}
case *ClosureNode:
case *PredicateNode:
Walk(&n.Node, v)
case *PointerNode:
case *VariableDeclaratorNode:
Expand Down
Loading