[pseudo] Add `clang-pseudo -html-forest=<output.html>`, an HTML forest browser
authorSam McCall <sam.mccall@gmail.com>
Mon, 18 Jul 2022 12:52:11 +0000 (14:52 +0200)
committerSam McCall <sam.mccall@gmail.com>
Tue, 19 Jul 2022 20:32:11 +0000 (22:32 +0200)
commitc91ce941448a8c67268b3c36797cbea9ad711216
tree6c6d6d0aed2b29df9ad31e7c50e3b8d64b98d30b
parent5bce73ba75aa7411128bd9241ee5d3f644067d5a
[pseudo] Add `clang-pseudo -html-forest=<output.html>`, an HTML forest browser

It generates a standalone HTML file with all needed JS/CSS embedded.
This allows navigating the tree both with a tree widget and in the code,
inspecting nodes, and selecting ambiguous alternatives.

Demo: https://htmlpreview.github.io/?https://gist.githubusercontent.com/sam-mccall/03882f7499d293196594e8a50599a503/raw/ASTSignals.cpp.html

Differential Revision: https://reviews.llvm.org/D130004
clang-tools-extra/pseudo/test/html-forest.c [new file with mode: 0644]
clang-tools-extra/pseudo/tool/CMakeLists.txt
clang-tools-extra/pseudo/tool/ClangPseudo.cpp
clang-tools-extra/pseudo/tool/HTMLForest.cpp [new file with mode: 0644]
clang-tools-extra/pseudo/tool/HTMLForest.css [new file with mode: 0644]
clang-tools-extra/pseudo/tool/HTMLForest.html [new file with mode: 0644]
clang-tools-extra/pseudo/tool/HTMLForest.js [new file with mode: 0644]
clang-tools-extra/pseudo/tool/bundle_resources.py [new file with mode: 0644]