Open arpheno opened 2 years ago
https://www.npmjs.com/package/python-ast this will be required? Do i need to disentangle the TS parsing from the actual implementation of the refactorings?
Although I want to support Go too, loading/calling AST parser of every language from single extension looks bad design. That must be provided by language server instead.
There are two candidate in VSCode API which could power this extension by providing AST-like tokens from language server:
Extensions can call these with the command.
I'll review the feasibility of using these.
While it is simpler if we can use above APIs, AST might be necessary to know the range of "expression".
Another solution is to use ANTLR which can output JS parser for many languages. With this we still add implementation for each language, but we don't need to include or call binaries to grab AST.
Python example: https://github.com/lexanth/python-ast#readme
Tell me what needs to be done roughly and I'll do it.