mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 05:38:04 +00:00
17 lines
423 B
Go
17 lines
423 B
Go
package yqlib
|
|
|
|
type expressionOpPreferences struct {
|
|
expression string
|
|
}
|
|
|
|
func expressionOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
|
|
|
|
prefs := expressionNode.Operation.Preferences.(expressionOpPreferences)
|
|
expNode, err := ExpressionParser.ParseExpression(prefs.expression)
|
|
if err != nil {
|
|
return Context{}, err
|
|
}
|
|
|
|
return d.GetMatchingNodes(context, expNode)
|
|
}
|