Change order of evaluation for certain indexing operations.
'.foo[.bar]' used to parse like '.foo | .bar as $b | .[$b]', now it parses like '.bar as $b | .foo | .[$b]'.
This commit is contained in:
1 parent
c0a2f1ab47
commit
84026f0513
2 files changed
+5
-1
No files matched your search
@@ -133,7 +133,7 @@ static block gen_dictpair(block k, block v) {
|
||||
}
|
||||
|
||||
static block gen_index(block obj, block key) {
|
||||
return BLOCK(obj, gen_subexp(key), gen_op_simple(INDEX));
|
||||
return BLOCK(gen_subexp(key), obj, gen_op_simple(INDEX));
|
||||
}
|
||||
|
||||
static block gen_binop(block a, block b, int op) {
|
||||
|
||||
Reference in new issue
Block a user