Esempio n. 1
1
  public ASTNode rewriteTo() {
    // Declared in VariableDeclaration.jrag at line 139
    if (getNumVariableDecl() == 1) {
      duringVariableDeclaration++;
      ASTNode result = rewriteRule0();
      duringVariableDeclaration--;
      return result;
    }

    // Declared in VariableDeclaration.jrag at line 150
    if (getParent().getParent() instanceof Block
        && ((Block) getParent().getParent()).getStmtListNoTransform() == getParent()
        && getNumVariableDecl() > 1) {
      duringVariableDeclaration++;
      List newList = rewriteBlock_getStmt();
      List list = (List) getParent();
      int i = list.getIndexOfChild(this);
      for (int j = 1; j < newList.getNumChild(); j++)
        list.insertChild(newList.getChildNoTransform(j), ++i);
      duringVariableDeclaration--;
      return newList.getChildNoTransform(0);
    }
    // Declared in VariableDeclaration.jrag at line 154
    if (getParent().getParent() instanceof ForStmt
        && ((ForStmt) getParent().getParent()).getInitStmtListNoTransform() == getParent()
        && getNumVariableDecl() > 1) {
      duringVariableDeclaration++;
      List newList = rewriteForStmt_getInitStmt();
      List list = (List) getParent();
      int i = list.getIndexOfChild(this);
      for (int j = 1; j < newList.getNumChild(); j++)
        list.insertChild(newList.getChildNoTransform(j), ++i);
      duringVariableDeclaration--;
      return newList.getChildNoTransform(0);
    }
    return super.rewriteTo();
  }
  public ASTNode rewriteTo() {
    // Declared in VariableDeclaration.jrag at line 124
    if (getNumVariableDecl() == 1) {
      state().duringVariableDeclaration++;
      ASTNode result = rewriteRule0();
      state().duringVariableDeclaration--;
      return result;
    }

    // Declared in VariableDeclaration.jrag at line 135
    if (getParent().getParent() instanceof TypeDecl
        && ((TypeDecl) getParent().getParent()).getBodyDeclListNoTransform() == getParent()
        && getNumVariableDecl() > 1) {
      state().duringVariableDeclaration++;
      List list = (List) getParent();
      int i = list.getIndexOfChild(this);
      List newList = rewriteTypeDecl_getBodyDecl();
      for (int j = 1; j < newList.getNumChildNoTransform(); j++)
        list.insertChild(newList.getChildNoTransform(j), ++i);
      state().duringVariableDeclaration--;
      return newList.getChildNoTransform(0);
    }
    return super.rewriteTo();
  }