element.generate(phase, baseDecl, genDecl, genStat, not2, cs, name, var1, var2, var2b, data, statementList);
} else {
if (genDecl) {
output = data.getOutput(phase, var1, var2, var2b, null, not1);
if (statementList != null) {
NewStatement newStatement = new NewStatement("ElementList", name);
newStatement.setData(not1, cs, output);
statementList.add(new Statement(phase, baseDecl, "ElementList", name, newStatement));
}
}
if (genStat) {
AddStatement addStatement = element.getStatement(phase, name, not2, null, var1, null, null, data);
if (addStatement != null) {
if (statementList != null) {
statementList.add(new Statement(phase, false, name, addStatement));
}
} else {
String elementName = data.addNewVarname(name);
element.generate(phase, false, true, true, not2, null, elementName, var1, null, null, data, statementList);
if (statementList != null) {
statementList.add(new Statement(phase, false, name, new AddStatement(elementName, new RefStatement(elementName))));
}
}
}
}
} else {
if (genDecl) {
String output = data.getOutput(phase, var1, var2, var2b, null, not);
if (statementList != null) {
NewStatement newStatement = new NewStatement("Repeat", name);
newStatement.setData(not, cs, output, repeats);
statementList.add(new Statement(phase, baseDecl, "Repeat", name, newStatement));
}
}
if (genStat) {
String output = data.getOutput(phase, var1, var2, varname, null, this.not);