mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19:04 +00:00
21 lines
513 B
Go
21 lines
513 B
Go
package treeops
|
|
|
|
import "github.com/elliotchance/orderedmap"
|
|
|
|
func MultiplyOperator(d *dataTreeNavigator, matchingNodes *orderedmap.OrderedMap, pathNode *PathTreeNode) (*orderedmap.OrderedMap, error) {
|
|
lhs, err := d.getMatchingNodes(matchingNodes, pathNode.Lhs)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
for el := lhs.Front(); el != nil; el = el.Next() {
|
|
candidate := el.Value.(*CandidateNode)
|
|
|
|
// TODO handle scalar mulitplication
|
|
switch candidate.Node.Kind {
|
|
case
|
|
}
|
|
|
|
}
|
|
return matchingNodes, nil
|
|
}
|