public SqlNode visit(SqlNodeList list) {
   SqlNodeList copy = new SqlNodeList(list.getParserPosition());
   for (SqlNode node : list) {
     copy.add(node.accept(this));
   }
   return copy;
 }
Exemple #2
0
 public boolean equalsDeep(SqlNode node, boolean fail) {
   if (!(node instanceof SqlNodeList)) {
     assert !fail : this + "!=" + node;
     return false;
   }
   SqlNodeList that = (SqlNodeList) node;
   if (this.size() != that.size()) {
     assert !fail : this + "!=" + node;
     return false;
   }
   for (int i = 0; i < list.size(); i++) {
     SqlNode thisChild = list.get(i);
     final SqlNode thatChild = that.list.get(i);
     if (!thisChild.equalsDeep(thatChild, fail)) {
       return false;
     }
   }
   return true;
 }