return false;
}
- private void dumpList(List list, String name) {
- StringBuffer buff = new StringBuffer(name).append("\n");
- for (int i = 0; i < list.size(); i++) {
- buff.append(list.get(i).toString()).append("\n");
- }
- if (PHPeclipsePlugin.DEBUG) {
- PHPeclipsePlugin.log(1, buff.toString());
- }
- }
-
/**
* This method will analyze the code.
*/
public void analyzeCode() {
+ if (statements != null) {
+ for (int i = 0; i < statements.length; i++) {
+ statements[i].analyzeCode();
+
+ }
+ }
+
final List globalsVars = getOutsideVariable();
final List modifiedVars = getModifiedVariable();
final List parameters = getParameters(new ArrayList());
final List readOrWriteVars = new ArrayList(modifiedVars.size()+usedVars.size());
readOrWriteVars.addAll(modifiedVars);
readOrWriteVars.addAll(usedVars);
-/* dumpList(globalsVars, "outside");
- dumpList(modifiedVars, "modified");
- dumpList(usedVars, "used"); */
-
//look for used variables that were not declared before
findUnusedParameters(readOrWriteVars,parameters);