Examples of IASTStatement


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

    modificationHelper = new ASTModificationHelper(stack);
  }

  @Override
  protected void writeBodyStatement(final IASTStatement statement, final boolean isDoStatement) {
    final IASTStatement replacementNode = modificationHelper.getNodeAfterReplacement(statement);
    super.writeBodyStatement(replacementNode, isDoStatement);
  }
View Full Code Here

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

    }

    scribe.print(')');
    scribe.newLines();
    nextCompoundNoNewLine();
    final IASTStatement elseClause = ifStatement.getElseClause();
    writeBodyStatement(ifStatement.getThenClause(), elseClause != null);

    if (elseClause != null) {
      scribe.print(ELSE);
      nextCompoundNoNewLine();
View Full Code Here

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

    if (node instanceof IASTFunctionDefinition) {
      return true;
    }
    if (node instanceof IASTIfStatement) {
      final IASTIfStatement statement = ((IASTIfStatement) node);
      IASTStatement lastClause = statement.getElseClause();
      if (lastClause == null) {
        lastClause = statement.getThenClause();
      }

      if (!(lastClause instanceof IASTCompoundStatement) && !doNodesHaveSameOffset(lastClause, statement)) {
View Full Code Here

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

    final StatementInfo body = new StatementInfo(whileStatement.getBody(), typeDeclaration, compilationUnitInfo);
    return f.newWhileStatement(condition.getExpression(), body.getStatement());
  }

  private IASTStatement convertForStatement(final ForStatement forStatement) {
    IASTStatement init;
    if (forStatement.initializers().isEmpty()) {
      init = f.newDefaultStatement();
    } else {
      final VariableDeclarationExpressionInfo initExpression = new VariableDeclarationExpressionInfo((VariableDeclarationExpression) forStatement.initializers().get(0), compilationUnitInfo);
      final IASTDeclarationStatement declarationStatement = f.newDeclarationStatement(initExpression.getDeclaration());
View Full Code Here

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

      }
     
    } else if (stmt instanceof IASTForStatement) {
      IASTForStatement fstmt = (IASTForStatement) stmt;
     
      IASTStatement initializer = fstmt.getInitializerStatement();

      String initVar;     
      ExprVisitor initExpr = new ExprVisitor();
      ExprVisitor finalExpr = new ExprVisitor();
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.