You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For rename refactoring (and possibly other applications), we need to find the exact location of names to rename. In the case of definitions, we only have the location of the whole definition (e.g. function annotations+signature+body). The name is contained in the signature and analysis of the parse tree is required to find its exact location.
It would be very helpful if a TModel maps definition locations to locations of their names. This should be done in a backwards-compatible manner, so existing type checkers or code consuming TModels do not break.
The text was updated successfully, but these errors were encountered:
Currently, the define functions take a string for the definition name. One solution is to accept a value here, match on str or Tree, and extract the location of the name in case it is a Tree. A map[loc, loc] or rel[loc, loc] mapping definition locations to names could be added to the TModel.
For rename refactoring (and possibly other applications), we need to find the exact location of names to rename. In the case of definitions, we only have the location of the whole definition (e.g. function annotations+signature+body). The name is contained in the signature and analysis of the parse tree is required to find its exact location.
It would be very helpful if a TModel maps definition locations to locations of their names. This should be done in a backwards-compatible manner, so existing type checkers or code consuming TModels do not break.
The text was updated successfully, but these errors were encountered: