Interpretation is only one of the possible computations that might be carried out over an abstract syntax tree. These computations are all more or less independent of one another, and thus good software engineering practice requires them to be implemented as modules that are separate from the tree module and separate from each other.
The ``Visitor'' design pattern is applicable under these conditions. ``Visitor'' requires an abstract class that couples arbitrary computation classes to the tree. Each computation is then defined as a subclass of that abstract class. Section 2.2.1 shows how these relationships are established.
Simple expression evaluation is covered in Section 2.2.2, and Section 2.2.3 adds the implementations of variables and assignment. Print statements are the subject of Section 2.2.4, and the remaining rules are wrapped up in Section 2.2.5.