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);
boolean decoratable = element.decoratable(phase, this.not, null, output, var1, varname, var2b, data);
AddStatement addStatement = element.getStatement(phase, name, this.not, null, var1, varname, "", data);
if (decoratable && addStatement != null) {
if (statementList != null) {
statementList.add(new Statement(phase, false, name, addStatement));
}
} else if (decoratable && element.isElementList()) {
element.generate(phase, false, false, true, this.not, null, name, var1, varname, "", data, statementList);
} else {
String newName = data.addNewVarname(name);
output = data.getOutput(phase, var1, varname, "", null, this.not);
element.generate(phase, false, true, true, false, null, newName, var1, null, "", data, statementList);
if (statementList != null) {
RefStatement refStatement = new RefStatement(newName);
refStatement.setData(this.not, cs, output);
statementList.add(new Statement(phase, false, name, new AddStatement(newName, refStatement)));
}
}
}
}
}