Added error "Unreachable code" for if statements
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / internal / compiler / ast / IfStatement.java
index d0257f3..d76577b 100644 (file)
@@ -25,8 +25,11 @@ public class IfStatement extends Statement {
        public Expression condition;
        public Statement thenStatement;
        public Statement elseStatement;
-
+       public Expression[] elseifConditions;
+       public Statement[] elseifStatements;
+       public boolean checkUnreachable;
        boolean thenExit;
+       
 
        // for local variables table attributes
        int thenInitStateIndex = -1;
@@ -43,6 +46,7 @@ public class IfStatement extends Statement {
                this.thenStatement = thenStatement;
                sourceStart = s;
                sourceEnd = e;
+               checkUnreachable = true;
        }
 
        public IfStatement(
@@ -57,6 +61,7 @@ public class IfStatement extends Statement {
                this.elseStatement = elseStatement;
                sourceEnd = e;
                sourceStart = s;
+               checkUnreachable = true;
        }
 
        public FlowInfo analyseCode(