コード例 #1
0
 private void visitDo(IASTDoStatement statement) {
   IASTExpression cond = statement.getCondition();
   String hint = ""; // $NON-NLS-1$
   if (cond != null) hint = cond.getRawSignature();
   hint = "do_while( " + hint + " )"; // $NON-NLS-1$ //$NON-NLS-2$
   int startLoc = statement.getFileLocation().getNodeOffset();
   _scopeStack.push(new ScopeInfo(hint, startLoc, statement));
 }
コード例 #2
0
  private void writeDoStatement(IASTDoStatement doStatement) {
    nextCompoundNoNewLine();

    scribe.print(DO);
    writeBodyStatement(doStatement.getBody(), true);
    scribe.print(DO_WHILE);
    doStatement.getCondition().accept(visitor);
    scribe.print(')');
    scribe.printSemicolon();
  }