public String toString(int tab) {
String s = tabString(tab);
- if (expression == null) {
+ if (expression != null) {
return s + "break " + expression.toString();//$NON-NLS-1$
}
return s + "break";//$NON-NLS-1$
buff.append("case ");
buff.append(value.toStringExpression());
buff.append(" :\n");
- for (int i = 0; i < statements.length; i++) {
- Statement statement = statements[i];
- buff.append(statement.toString(tab + 1));
+ if (statements != null) {
+ for (int i = 0; i < statements.length; i++) {
+ Statement statement = statements[i];
+ buff.append(statement.toString(tab + 1));
+ }
}
return buff.toString();
}