/**
  * Adds the statement to the statement list if it is not null. Otherwise, adds the statement to
  * the translator list.
  *
  * @param stmt the statement to be added
  */
 private void addStatement(Statement stmt) {
   if (stmtList == null) {
     translator.addStatement(stmt);
   } else {
     stmtList.add(stmt);
   }
 }
 /**
  * Adds a list of statements according to {@link #addStatement(Statement)}
  *
  * @param list list of statements to be added
  */
 private void addStatementList(StatementList list) {
   for (int i = 0; i < list.size(); i++) {
     addStatement(list.get(i));
   }
 }