if ( showTree ) {
CommonAST.setVerboseStringConversion(true, tokenNames);
ASTFactory factory = new ASTFactory();
AST r = factory.create(0,"AST ROOT");
r.setFirstChild(t);
final ASTFrame frame = new ASTFrame("Groovy AST", r);
frame.setVisible(true);
frame.addWindowListener(
new WindowAdapter() {
public void windowClosing (WindowEvent e) {
frame.setVisible(false); // hide the Frame
frame.dispose();
System.exit(0);
}
}
);
if (verbose) System.out.println(t.toStringList());