//===-- HTMLForest.cpp - browser-based parse forest explorer //---------------===// // // 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 // //===----------------------------------------------------------------------===// // // The plain text forest node dump (clang-pseudo -print-forest) is useful but // hard to reconcile with the code being examined, especially when it is large. // // HTMLForest produces a self-contained HTML file containing both the code and // the forest representation, linking them interactively with javascript. // At any given time, a single parse tree is shown (ambiguities resolved). // The user can switch between ambiguous alternatives. // // +-------+---------------+ // | | +-----+| // | #tree | #code |#info|| // | | +-----+| // | | | // +-------+---------------+ // // #tree is a hierarchical view of the nodes (nested