jqlang / jq

Command-line JSON processor
https://jqlang.github.io/jq/
Other
30.22k stars 1.57k forks source link

Provide abstract syntax tree for linting and code formatting #1889

Open nichtich opened 5 years ago

nichtich commented 5 years ago

I'd like to have an option to compile a jq script and - given there are no syntax errors - get its abstract syntax tree in some JSON format for static code analysis and code formatting. Especially the latter would be nice as jq script get unreadable very quickly.

nicowilliams commented 5 years ago

I have something like this in a branch that dumps a JSON representation of the internal block representation of programs. We could revive this.

leonid-s-usov commented 5 years ago

I’d make my best to find time and contribute to a feature like this.

nicowilliams commented 5 years ago

My dump_block branch has something like this.