Examples of IASTWhileStatement


Examples of org.eclipse.cdt.core.dom.ast.IASTWhileStatement

      if (stmtStack.size() == 1) parent.Enclose(stmtStack.peek(), elseFlagStack.peek());
        stmtStack.pop();  elseFlagStack.pop();
     
      return PROCESS_SKIP;
    } else if (stmt instanceof IASTWhileStatement) {
      IASTWhileStatement whileStmt = (IASTWhileStatement) stmt;
     
      WhileCounterVisitor whileCounter = new WhileCounterVisitor();
      whileStmt.getBody().accept(whileCounter);
      ExprVisitor condVisitor = new ExprVisitor();
      whileStmt.getCondition().accept(condVisitor);
      //IASTExpression lc = ((IASTBinaryExpression) whileStmt.getCondition()).getOperand1();
      Control whileControl = new Control("W_" + whileCounter.getCounter(), condVisitor.getCond());
     
      Statement fadaWhileStmt = new Statement(whileControl); //factory.create(whileStmt, whileControl);     

      if (!stmtStack.empty()) stmtStack.peek().Enclose(fadaWhileStmt, elseFlagStack.peek());
      stmtStack.push(fadaWhileStmt); elseFlagStack.push(false);
     
      visit(whileStmt.getBody());
     
      if (stmtStack.size() == 1) parent.Enclose(stmtStack.peek(), elseFlagStack.peek());
      stmtStack.pop(); elseFlagStack.pop();
      return PROCESS_SKIP;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.