예제 #1
0
 protected void copyForStatement(CASTForStatement copy, CopyStyle style) {
   copy.setInitializerStatement(init == null ? null : init.copy(style));
   copy.setConditionExpression(condition == null ? null : condition.copy(style));
   copy.setIterationExpression(
       iterationExpression == null ? null : iterationExpression.copy(style));
   copy.setBody(body == null ? null : body.copy(style));
   copy.setOffsetAndLength(this);
 }
예제 #2
0
 @Override
 public CPPASTIfStatement copy(CopyStyle style) {
   CPPASTIfStatement copy = new CPPASTIfStatement();
   copy.setConditionDeclaration(condDecl == null ? null : condDecl.copy(style));
   copy.setConditionExpression(condition == null ? null : condition.copy(style));
   copy.setThenClause(thenClause == null ? null : thenClause.copy(style));
   copy.setElseClause(elseClause == null ? null : elseClause.copy(style));
   return copy(copy, style);
 }
예제 #3
0
 @Override
 public CPPASTIfStatement copy(CopyStyle style) {
   CPPASTIfStatement copy = new CPPASTIfStatement();
   copy.setConditionDeclaration(condDecl == null ? null : condDecl.copy(style));
   copy.setConditionExpression(condition == null ? null : condition.copy(style));
   copy.setThenClause(thenClause == null ? null : thenClause.copy(style));
   copy.setElseClause(elseClause == null ? null : elseClause.copy(style));
   copy.setOffsetAndLength(this);
   if (style == CopyStyle.withLocations) {
     copy.setCopyLocation(this);
   }
   return copy;
 }