Visitor pattern and compiler code generation, how to get children attributes?
- by LeleDumbo
I'd like to modify my compiler's code generator to use visitor pattern since the current approach must use multiple conditional statement to check the real type of a child before generating the corresponding code. However, I have problems to get children attributes after they're visited. For instance, in binary expression I use this:
LHSCode :=…