Add token position and query json marshal support #123
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
I've been writing a lot of jq for another project lately so I started looking into making it more comfortable. The result is jq-lsp and vscode-jq. They are both very rough and early in development but i've used them daily for the last weeks without much problems.
This PR is more of a proof-of-concept for the features needed by jq-lsp to implemented the language server. There are probably nicer or better ways for adding token position support or how to allow marshalling of queries.
An issue i stumbled upon when writing a server loop in jq is the issue talked about in #86. For what i can understand it seems like TCO work as it should (it uses
def loop(f): def _loop: f | _loop; _loop
as loop) but i suspect that function variables or arguments somehow are not poped or reclaimed.Hope you like it and let me know what you think.