Qulaly
Qulaly copied to clipboard
How about querying semantics as well?
I love these query tools for JavaScript and typescript. And this is awesome!! But since you are using Roslyn which is much better than esprima. Would you consider adding support to query the semantic model as well? This would be an even more amazing tool. I already have it running using dotnet script.
I could lend a hand. If you like.
Thanks for the feedback. I would like to be able to write a query using SemanticModel too. So, I'm slightly stuck on what kind of selector to provide.
I had the same question. This may be useful.
Often we would like to know type information. So there could be a :type modifier which would take many syntax elements and provide the type instead of a node.
From a type we may want to find the declaration. This is more complex than usual CSS selectors since I am not aware of any selector that travels outside of the tree that has been partially matched.
If this traveling quality of selectors could be justified. Other lookups could be done as well. Like reads or writes. Interestingly you could have :reads-nth. It would be very interesting to say the least.