Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Using the Visitor pattern allows for a cleaner implementation of toString().
I have a patch which will remove toString() from all AST classes, and replace it with a single toString() in "SimpleNode" which delegates to a ToStringVisitor to build the String efficiently.
This patch can also be used as an example of how to move other business logic out of the AST classes into their own visitor classes.