Package org.eclipse.cdt.core.dom.ast

Examples of org.eclipse.cdt.core.dom.ast.IASTCompoundStatement.addStatement()


  private IASTStatement convertSwitchStatement(final SwitchStatement switchStatement) {
    final ExpressionInfo controller = new ExpressionInfo(switchStatement.getExpression(), typeDeclaration, compilationUnitInfo);
    final IASTCompoundStatement body = f.newCompoundStatement();
    for (final Object statementObject : switchStatement.statements()) {
      final StatementInfo statementInfo = new StatementInfo((Statement) statementObject, typeDeclaration, compilationUnitInfo);
      body.addStatement(statementInfo.getStatement());
    }
    return f.newSwitchStatement(controller.getExpression(), body);
  }

  private IASTStatement convertDoStatement(final DoStatement doStatement) {
View Full Code Here


  private IASTStatement convertBlock(final Block block) {
    final IASTCompoundStatement compoundStatement = f.newCompoundStatement();
    for (final Object statementObject : block.statements()) {
      final StatementInfo statementInfo = new StatementInfo((Statement) statementObject, typeDeclaration, compilationUnitInfo);
      compoundStatement.addStatement(statementInfo.getStatement());
    }
    return compoundStatement;
  }

  public IASTStatement getStatement() {
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.