Conversation
look
left a comment
There was a problem hiding this comment.
Thank you for fixing the tree-sitter link and the contribution. The omission of @definition.method was an oversight.
I'll try to briefly answer your other questions below, but if you have further questions, please open issues for them so we can track that. Thanks!
- The documentation only mentions
@reference.call. Does that mean other references are not supported, or does the support for e.g.@definition.moduleimply that@reference.moduleis supported too? If that's the case, is@reference.functionsupported, or does it have to be@reference.call?
The system only supports @reference.call right now.
- The fully-qualified names example uses
@definition.classas container. Can all definitions (class/module/function/...) be used as containers?
Offhand, I don't know that we have any examples using this, but I reviewed the code and it should support containers of class, enum, implementation, interface, struct, type, trait, union, and module.
- In the fully-qualified Java example the separator is
::, in the Go example it's.. Should the separator be defined somewhere? Can it be different for different types of containers?
It's defined per-language when we wire up the language parser with its query. It can't vary by container at this time.
- How do references to fully-qualified names work? Should the
@namein the reference contain the fully-qualified name? Or can references use the non-qualified name?
You can use either (or, additionally, a regex). Using the fully-qualified name will give you more precise results.
There's some examples of using the symbol: qualifier in the documentation: https://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax#symbol-qualifier
Method seems to be missing from the supported definitions. Since it's used in the fully-qualified names example, I assume it's supported?
I have some other questions:
@reference.call. Does that mean other references are not supported, or does the support for e.g.@definition.moduleimply that@reference.moduleis supported too? If that's the case, is@reference.functionsupported, or does it have to be@reference.call?@definition.classas container. Can all definitions (class/module/function/...) be used as containers?::, in the Go example it's.. Should the separator be defined somewhere? Can it be different for different types of containers?@namein the reference contain the fully-qualified name? Or can references use the non-qualified name?