Examples of IASTCompoundStatement


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

    return switchCase.getExpression() == null ? f.newDefaultStatement() : f.newCaseStatement(new ExpressionInfo(switchCase.getExpression(), typeDeclaration, compilationUnitInfo).getExpression());
  }

  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);
  }
View Full Code Here

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

  private IASTStatement convertExpressionStatement(final ExpressionStatement expressionStatement) {
    return f.newExpressionStatement(new ExpressionInfo(expressionStatement.getExpression(), typeDeclaration, compilationUnitInfo).getExpression());
  }

  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;
  }
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.