@Override
 public void caseAMethodDecl(AMethodDecl node) {
   inAMethodDecl(node);
   if (node.getN3() != null) {
     node.getN3().apply(this);
   }
   if (node.getEndid() != null) {
     node.getEndid().apply(this);
   }
   if (node.getEnd() != null) {
     node.getEnd().apply(this);
   }
   {
     List<PStmt> copy = new ArrayList<PStmt>(node.getStmt());
     Collections.reverse(copy);
     for (PStmt e : copy) {
       e.apply(this);
     }
   }
   if (node.getN2() != null) {
     node.getN2().apply(this);
   }
   if (node.getBegin() != null) {
     node.getBegin().apply(this);
   }
   {
     List<PVarDecl> copy = new ArrayList<PVarDecl>(node.getVarDecl());
     Collections.reverse(copy);
     for (PVarDecl e : copy) {
       e.apply(this);
     }
   }
   if (node.getN1() != null) {
     node.getN1().apply(this);
   }
   if (node.getIs() != null) {
     node.getIs().apply(this);
   }
   if (node.getOptType() != null) {
     node.getOptType().apply(this);
   }
   if (node.getRPar() != null) {
     node.getRPar().apply(this);
   }
   if (node.getArgumentDeclList() != null) {
     node.getArgumentDeclList().apply(this);
   }
   if (node.getLPar() != null) {
     node.getLPar().apply(this);
   }
   if (node.getStid() != null) {
     node.getStid().apply(this);
   }
   outAMethodDecl(node);
 }
Пример #2
0
  public void setVarDecl(List<PVarDecl> list) {
    this._varDecl_.clear();
    this._varDecl_.addAll(list);
    for (PVarDecl e : list) {
      if (e.parent() != null) {
        e.parent().removeChild(e);
      }

      e.parent(this);
    }
  }
 @Override
 public void caseAClassDef(AClassDef node) {
   inAClassDef(node);
   if (node.getEndid() != null) {
     node.getEndid().apply(this);
   }
   if (node.getEnd() != null) {
     node.getEnd().apply(this);
   }
   {
     List<PMethodDecl> copy = new ArrayList<PMethodDecl>(node.getMethodDecl());
     Collections.reverse(copy);
     for (PMethodDecl e : copy) {
       e.apply(this);
     }
   }
   {
     List<PVarDecl> copy = new ArrayList<PVarDecl>(node.getVarDecl());
     Collections.reverse(copy);
     for (PVarDecl e : copy) {
       e.apply(this);
     }
   }
   if (node.getNewlines() != null) {
     node.getNewlines().apply(this);
   }
   if (node.getIs() != null) {
     node.getIs().apply(this);
   }
   if (node.getInheritsFrom() != null) {
     node.getInheritsFrom().apply(this);
   }
   if (node.getStid() != null) {
     node.getStid().apply(this);
   }
   if (node.getClassKw() != null) {
     node.getClassKw().apply(this);
   }
   outAClassDef(node);
 }