Beispiel #1
0
 @Override
 public TypedAST cloneWithChildren(Map<String, TypedAST> newChildren) {
   List<TypedAST> result = new ArrayList<>(newChildren.size());
   for (int i = 0; i < newChildren.size(); i++) {
     result.add(newChildren.get(i + ""));
   }
   return new Sequence(result);
 }
Beispiel #2
0
 @Override
 public Map<String, TypedAST> getChildren() {
   Map<String, TypedAST> childMap = new HashMap<>();
   int i = 0;
   for (TypedAST ast : exps) {
     childMap.put(i++ + "", ast);
   }
   return childMap;
 }