Working as a software engineer is much more than writing code. There is complexity every area of the job, and that is why we need to keep the code as simple as possible. But that is not an easy job.
Defining the classes of an AST can be cumbersone due to the high amount of nodes and redundant code. Dynamic classes in JS can make this process much easier.