Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function scope in parenthesis #61

Open
itchyny opened this issue Mar 15, 2020 · 0 comments
Open

Function scope in parenthesis #61

itchyny opened this issue Mar 15, 2020 · 0 comments
Labels

Comments

@itchyny
Copy link
Contributor

itchyny commented Mar 15, 2020

jq has a function scope in parenthesis but jackson-jq does not handle this

 % jq -n 'def f: 1; . | (def f: 2; f) | f, .'
1
2
 % java -jar jackson-jq-cli-1.0.0-preview.20191208.jar -n 'def f: 1; . | (def f: 2; f) | f, .'
2
2

Edit: arrays and objects have function scope too

  • 'def f: 1; . | [def f: 2; f] | f, .'
  • 'def f: 1; . | {(def f: "foo"; f): f}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants