DerekStride / tree-sitter-sql

SQL grammar for tree-sitter
http://derek.stride.host/tree-sitter-sql/
MIT License
155 stars 52 forks source link

feat: json traversal #170

Closed dmfay closed 1 year ago

dmfay commented 1 year ago

this needs more time than I have for it at the moment but I don't think it'll be too hard to get basic support for #166! element indexing (possibly some common ground with the array[1,2,3] syntax?) and jsonpath are bigger considerations though.

matthias-Q commented 1 year ago

I added the other json operators and updated the test. Actually it looks like this is it. All other json operations are probably handled by invocation

Gelio commented 1 year ago

Drive-by appreciation comment:

I am honestly amazed by your aptitude and the promptness at fixing the issues I've reported. Stellar project maintenance! I certainly wasn't expecting to see all 3 issues addressed the same day I reported them

dmfay commented 1 year ago

Drive-by appreciation comment:

I am honestly amazed by your aptitude and the promptness at fixing the issues I've reported. Stellar project maintenance! I certainly wasn't expecting to see all 3 issues addressed the same day I reported them

the JSON issue has secretly been bugging me for a while (along with array literals and subscripting, but that's for later) and I've always been too busy with other things & other projects to take a look, and it turns out it just fits right into the expression node now

matthias-Q commented 1 year ago

We should add the new operators to the highlights.scm (i forgot that with filter yesterday as well ...)

matthias-Q commented 1 year ago

This looks good to me. I am merging it. I am so surprised that this went so smoothly.

(I was hoping that after the recent refactor we could also tackle array and not in, but it seems like they are still difficult to solve)

dmfay commented 1 year ago

This looks good to me. I am merging it. I am so surprised that this went so smoothly.

(I was hoping that after the recent refactor we could also tackle array and not in, but it seems like they are still difficult to solve)

I went looking and we actually got arrays at some point!

matthias-Q commented 1 year ago

@dmfay yes, but not as a function. See #115 Besides, I think #128 is more important :-/