Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Generator print refactor #2210
This moves all of the printing parts of the code generator into the from the NodePrinter class to the CodeGenerator. I found the code around this rather confusing, since the control flow of printing constantly flip flops between the CodeGenerator and the NodePrinter, and there's a lot of printing in the CodeGenerator anyways, so there's no real clear separation of concerns in the first place. It seems like there was some refactoring going on, that was stopped halfway, and it's now in this confusing state, where NodePrinter doesn't really do much other than add an unneeded layer of indirection.
I'm fine if this gets rejected, in favour of moving more code printing into the NodePrinter.