toTreeString implemented by Visitor pattern
Merge pull request #2266 from davidegrohmann/tree-string-visitor-pattern-cleanup

toTreeString implemented by Visitor pattern