[clang-tools-extra] [clang-doc] Add Markdown AST node type definitions (PR #205609)
Petr Hosek via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 30 12:04:06 PDT 2026
================
@@ -0,0 +1,89 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Markdown.h"
+
+namespace clang::doc::markdown {
+
+LLVM_DUMP_METHOD void InlineNode::dump() const { print(llvm::errs()); }
+
+void TextNode::print(llvm::raw_ostream &OS) const {
----------------
petrhosek wrote:
I agree that indentation would be nice to have albeit not essential. The other potential readability improvement is to use S-expression format to better visualize the nested tree structure (this is used for example by Swift AST).
https://github.com/llvm/llvm-project/pull/205609
More information about the cfe-commits
mailing list