infix reduce

This commit is contained in:
Mike Farah
2021-02-15 16:06:37 +11:00
parent 3e5f7b147f
commit b2317a14ef
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ var pathTests = []struct {
expectedPostFix []interface{}
}{
{
`.a as $item reduce (0; . + $item)`, // note - add code to shuffle reduce to this position for postfix
`.a as $item ireduce (0; . + $item)`, // note - add code to shuffle reduce to this position for postfix
append(make([]interface{}, 0), "a", "ASSIGN_VARIABLE", "GET_VARIABLE", "REDUCE", "(", "0 (int64)", "BLOCK", "SELF", "ADD", "GET_VARIABLE", ")"),
append(make([]interface{}, 0), "a", "GET_VARIABLE", "ASSIGN_VARIABLE", "0 (int64)", "SELF", "GET_VARIABLE", "ADD", "BLOCK", "REDUCE"),
},