docs: @Override
      public Expression visitCreator(CreatorContext ctx) {
          ClassNode classNode = this.visitCreatedName(ctx.createdName());
  
          if (asBoolean(ctx.arguments())) { // create instance of class
              Expression arguments = this.visitArguments(ctx.arguments());
              Expression enclosingInstanceExpression = ctx.getNodeMetaData(ENCLOSING_INSTANCE_EXPRESSION);
  
              if (null != enclosingInstanceExpression) {
                  if (arguments instanceof ArgumentListExpression) {
                      ((ArgumentListExpression) arguments).getExpressions().add(0, enclosingInstanceExpression);
                  } else if (arguments instanceof TupleExpression) {
                      throw createParsingFailedException("Creating instance of non-static class does not support named parameters", arguments);
                  } else if (arguments instanceof NamedArgumentListExpression) {
                      throw createParsingFailedException("Unexpected arguments", arguments);
                  } else {
                      throw createParsingFailedException("Unsupported arguments", arguments); // should never reach here
                  }
              }
  
              if (asBoolean(ctx.anonymousInnerClassDeclaration())) {
                  ctx.anonymousInnerClassDeclaration().putNodeMetaData(ANONYMOUS_INNER_CLASS_SUPER_CLASS, classNode);
                  InnerClassNode anonymousInnerClassNode = this.visitAnonymousInnerClassDeclaration(ctx.anonymousInnerClassDeclaration());
  
                  List<InnerClassNode> anonymousInnerClassList = anonymousInnerClassesDefinedInMethodStack.peek();
                  if (null != anonymousInnerClassList) { // if the anonymous class is created in a script, no anonymousInnerClassList is available.
                      anonymousInnerClassList.add(anonymousInnerClassNode);
                  }
  
                  ConstructorCallExpression constructorCallExpression = new ConstructorCallExpression(anonymousInnerClassNode, arguments);
                  constructorCallExpression.setUsingAnonymousInnerClass(true);
  
                  return configureAST(constructorCallExpression, ctx);
              }
  
              return configureAST(
                      new ConstructorCallExpression(classNode, arguments),
                      ctx);
          }
  
          if (asBoolean(ctx.LBRACK()) || asBoolean(ctx.dims())) { // create array
              ArrayExpression arrayExpression;
              List<List<AnnotationNode>> allDimList;
  
              if (asBoolean(ctx.arrayInitializer())) {
                  ClassNode elementType = classNode;
                  allDimList = this.visitDims(ctx.dims());
  
                  for (int i = 0, n = allDimList.size() - 1; i < n; i++) {
                      elementType = elementType.makeArray();
                  }
  
                  arrayExpression =
                          new ArrayExpression(
                              elementType,
                              this.visitArrayInitializer(ctx.arrayInitializer()));
  
              } else {
                  Expression[] empties;
                  List<List<AnnotationNode>> emptyDimList = this.visitDimsOpt(ctx.dimsOpt());
  
                  if (asBoolean(emptyDimList)) {
                      empties = new Expression[emptyDimList.size()];
                      Arrays.fill(empties, ConstantExpression.EMPTY_EXPRESSION);
                  } else {
                      empties = Expression.EMPTY_ARRAY;
                  }
  
                  arrayExpression =
                          new ArrayExpression(
                                  classNode,
                                  null,
                                  Stream.concat(
                                          ctx.expression().stream()
                                                  .map(e -> (Expression) this.visit(e)),
                                          Arrays.stream(empties)
                                  ).collect(Collectors.toList()));
  
  
                  List<List<AnnotationNode>> exprDimList = ctx.annotationsOpt().stream().map(this::visitAnnotationsOpt).collect(Collectors.toList());
                  allDimList = new ArrayList<>(exprDimList);
                  Collections.reverse(emptyDimList);
                  allDimList.addAll(emptyDimList);
                  Collections.reverse(allDimList);
              }
  
              arrayExpression.setType(createArrayType(classNode, allDimList));
  
              return configureAST(arrayExpression, ctx);
          }
  
          throw createParsingFailedException("Unsupported creator: " + ctx.getText(), ctx);
      }