Skip to content

How did you learn how to add variable renaming functionality? #16

Answered by Beaglefoot
hamirmahal asked this question in Q&A
Discussion options

You must be logged in to vote

I figured it out on my own. And I'm unaware of any guide that covers such functionality.

Specification just tells you what you need to create in terms of request/response and related interfaces. The implementation is up to you.

It's not that difficult, but might get lengthy depending on your language. You basically need to build a graph of dependencies or who imports who. Then you locate the correct scope within each of you dependent documents. And finally you generate a list of edits.

You need some knowledge of algorithms to do all these steps correctly. At least BFS and DFS graph traversal. Note that if your language supports cyclical dependencies it's up to you to resolve them. You als…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hamirmahal
Comment options

Answer selected by hamirmahal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants