Added key operator

This commit is contained in:
Mike Farah
2021-11-24 09:57:35 +11:00
parent 7f629d5e36
commit b44fecdfa5
27 changed files with 149 additions and 48 deletions
+2 -2
View File
@@ -67,7 +67,7 @@ func multiply(preferences multiplyPreferences) func(d *dataTreeNavigator, contex
}
func multiplyFloats(lhs *CandidateNode, rhs *CandidateNode) (*CandidateNode, error) {
target := lhs.CreateChild(nil, &yaml.Node{})
target := lhs.CreateReplacement(&yaml.Node{})
target.Node.Kind = yaml.ScalarNode
target.Node.Style = lhs.Node.Style
target.Node.Tag = "!!float"
@@ -85,7 +85,7 @@ func multiplyFloats(lhs *CandidateNode, rhs *CandidateNode) (*CandidateNode, err
}
func multiplyIntegers(lhs *CandidateNode, rhs *CandidateNode) (*CandidateNode, error) {
target := lhs.CreateChild(nil, &yaml.Node{})
target := lhs.CreateReplacement(&yaml.Node{})
target.Node.Kind = yaml.ScalarNode
target.Node.Style = lhs.Node.Style
target.Node.Tag = "!!int"