void (ASTNode node, StringBuffer buffer, int indent) { buffer.append(" ".repeat(indent)); buffer.append(node.getElementType()).append("\n"); indent += 2; ASTNode childNode = node.getFirstChildNode(); while (childNode != null) { printAstTypeNamesTree(childNode, buffer, indent); childNode = childNode.getTreeNext(); } }