ponylang / pony-language-server

Language server for Pony
MIT License
17 stars 4 forks source link

Implement `textDocument/references` for finding references to the symbol under the cursor #4

Open mfelsche opened 1 week ago

mfelsche commented 1 week ago

This feature resolves a list of references to the symbol under the cursor.

See the spec: textDocument/references.

One possible implementation could generate a mapping from all possible symbols that refer to something (tk_fletref, tk_varref etc.) to the AST node / symbol they refer to, and from that node to an Array[AST] which holds all the references to the definition symbol.