@this That makes sense. However, it also complicates my plans at little :(
As part of a current piece of work I'm assigned at work, I'm needing to automatically modify VB6 code by injecting new code based on certain patterns (E.G: Add a method call below the start of every method entry), which I was doing via a series of visitors over the parse tree. Once the modifications are complete, I call getText() on the top level rule to get a string containing the complete source file with all modifications.