Skip to content

Commit a31b1fe

Browse files
authored
Refactor types table (#667)
1 parent efa006a commit a31b1fe

27 files changed

+544
-454
lines changed

ast/node.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ type BuiltinNode struct {
183183
Map Node // Used by optimizer to fold filter() and map() builtins.
184184
}
185185

186-
// ClosureNode represents a predicate.
186+
// PredicateNode represents a predicate.
187187
// Example:
188188
//
189189
// filter(foo, .bar == 1)
190190
//
191191
// The predicate is ".bar == 1".
192-
type ClosureNode struct {
192+
type PredicateNode struct {
193193
base
194194
Node Node // Node of the predicate body.
195195
}

ast/print.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (n *BuiltinNode) String() string {
162162
return fmt.Sprintf("%s(%s)", n.Name, strings.Join(arguments, ", "))
163163
}
164164

165-
func (n *ClosureNode) String() string {
165+
func (n *PredicateNode) String() string {
166166
return n.Node.String()
167167
}
168168

ast/visitor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func Walk(node *Node, v Visitor) {
4545
for i := range n.Arguments {
4646
Walk(&n.Arguments[i], v)
4747
}
48-
case *ClosureNode:
48+
case *PredicateNode:
4949
Walk(&n.Node, v)
5050
case *PointerNode:
5151
case *VariableDeclaratorNode:

0 commit comments

Comments
 (0)