[SyntaxTree] Extend the syntax tree dump to also cover `NodeRole`
We should see `NodeRole` information in the dump because that exposes how the accessors will behave. Functional changes in the dump: * Surround Leaf tokens with `'` * Append `Node` dumps with `NodeRole` information, except for unknown roles * Append marks to `Node` dumps, instead of prepending Non-functional changes: * `::dumpTokens(llvm::raw_ostream, ArrayRef<syntax::Token>, const SourceManager &SM)` always received as parameter a `syntax::Token *` pointing to `Leaf::token()`. Changed the function to `dumpLeaf(llvm::raw_ostream, syntax::Leaf *, const SourceManager&)` * `dumpTree` acted on a Node, rename to `dumpNode` Differential Revision: https://reviews.llvm.org/D85330
Loading
Please sign in to comment