Design 1
•
Operations treat nodes of different types
differently
–
Ex: code generated for assignments is
different than code generated for calls
•
Proposed design: add a method to each
node class to perform a particular
operation on that node type