I have reached a point where I would like to understand more about compilers. The reason for this is that I am working on a JS framework that has become very complex, and I need to find a way to simplify migration of versions for my colleagues.When my team makes an update, all the teams (which I now call customers) that use our framework have to follow. They might have to look at what functions become deprecated, adapt to new signatures and so on.So assuming a function is renamed, it should be possible to rename this function automatically at the customers' codebase with a program that builds and AST, finds the function and replaces it with the new function name.Also, we want to make sure, that our customers do not write smelly code. A trivial example of this would be, to no longer declare variables via "var" but only via "let" or "const". Of course, a tool like ESLint is perfect for this and I would like to write my own rules for ESLint.My question now is, how do I, as a web developer, learn this domain.From what I've found, most books about compiler and AST are directed to low level languages like C or higher ones like Java.But I'm looking for something more directed to web programming. Just to summeraize, my goals are:
* Write migration programs that help customer update theyr code automatically. Where no automatic migration is possible, possibly leave a comment and point out that manual adjustments are necessary.
* Develop a "DevTool" that helps our customers to follow best practices and not write smelly code.I'm curious to what you guys think would be a good way to enter this domain. Just to clarify. I'm not against learning this, by going the - what might be considered - proper way and learning how to write a lowlevel compiler for B to learn the basics. And then move on to more specific compilers for higher languages. I just wanted to see if this achivable in a way, that stays closer to the web domain.