MiSawa / xq

Pure rust implementation of jq
MIT License
318 stars 18 forks source link

Label handling failure: first/1, isempty/1 cannot nest #65

Closed itchyny closed 2 years ago

itchyny commented 2 years ago
❯ jq -n 'isempty(isempty(empty))'
false

❯ jq -n 'first((0, 0) | first(0))'
0

❯ xq -n 'isempty(isempty(empty))'
false
true

❯ xq -n 'first((0, 0) | first(0))'
0
0

❯ xq --version
xq 0.2.3-a7d4cfbf962f3570b326dd97ecf288365d396ed4
MiSawa commented 2 years ago

So hmmmmm, we need to acquire a slot-like-thing in the frame that has label $foo, and store some id when we execute ForkLabel, and refer to that id in the frame when we execute Brak.