public Object visit(Template node) {
            Statement stmt = node.getStatement();
            if (stmt != null) {
                stmt = (Statement)stmt.accept(this);
                if (!mReturnAdded) {
                    Statement[] stmts = new Statement[] {
                        stmt,
                        new ReturnStatement(stmt.getSourceInfo())
                    };
                    stmt = new StatementList(stmt.getSourceInfo(), stmts);
                }
                node.setStatement(stmt);
            }
            else {
                node.setStatement(new ReturnStatement(node.getSourceInfo()));
            }

            return node;
        }