public AstNode[] nodes;
public HTMLBlock(final AstNode[] nodes) {
- super(nodes[0].sourceStart, nodes[nodes.length-1].sourceEnd);
+ super(nodes[0].sourceStart, nodes[(nodes.length > 0) ? nodes.length - 1 : 0].sourceEnd);
this.nodes = nodes;
}
final StringBuffer buff = new StringBuffer(tabString(tab));
buff.append("?>");
for (int i = 0; i < nodes.length; i++) {
- buff.append(nodes[i].toString(tab +1));
+ buff.append(nodes[i].toString(tab + 1));
}
buff.append("<?php\n");
return buff.toString();