docs: protected void write(PrintWriter writer, String indent) {
          writer.print("(");
  
          if (!isEmpty()) {
              Token root = getRoot(true);
              int type = root.getType();
              int meaning = root.getMeaning();
  
  
              //
              // Display our type, text, and (optional) meaning
  
              writer.print(Types.getDescription(type));
  
              if (meaning != type) {
                  writer.print(" as ");
                  writer.print(Types.getDescription(meaning));
              }
  
              if (getStartLine() > -1) {
                  writer.print(" at " + getStartLine() + ":" + getStartColumn());
              }
  
              String text = root.getText();
              int length = text.length();
              if (length > 0) {
                  writer.print(": ");
                  if (length > 40) {
                      text = text.substring(0, 17) + "..." + text.substring(length - 17, length);
                  }
  
                  writer.print(" \"");
                  writer.print(text);
                  writer.print("\" ");
              } else if (children() > 0) {
                  writer.print(": ");
              }
  
  
              //
              // Recurse to display the children.
  
              int count = size();
              if (count > 1) {
                  writer.println("");
  
                  String indent1 = indent + "  ";
                  String indent2 = indent + "   ";
                  for (int i = 1; i < count; i++) {
                      writer.print(indent1);
                      writer.print(i);
                      writer.print(": ");
  
                      get(i, true).write(writer, indent2);
                  }
  
                  writer.print(indent);
              }
          }
  
          if (indent.length() > 0) {
              writer.println(")");
          } else {
              writer.print(")");
          }
      }